diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index 922ec92d0..a847da518 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -6,11 +6,11 @@ on: jobs: test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: true diff --git a/.gitmodules b/.gitmodules index fe8a7fe7e..a93d5bdf1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,7 @@ [submodule "spack"] path = spack url = https://github.com/jcsda/spack - branch = spack-stack-1.9.1 + branch = spack-stack-1.9.3 [submodule "doc/CMakeModules"] path = doc/CMakeModules url = https://github.com/noaa-emc/cmakemodules diff --git a/configs/common/packages.yaml b/configs/common/packages.yaml index 2543dac54..720c53dbb 100644 --- a/configs/common/packages.yaml +++ b/configs/common/packages.yaml @@ -160,12 +160,16 @@ packages: magics: require: "@4.15.3:" mapl: - require: '@2.53.0 ~shared ~f2py' + require: '@2.53 ~shared ~f2py' variants: '+pflogger' met: - require: '@11.1.1 +python +grib2' + require: + - '@12.0.1' + - '+python' + - '+grib2' metplus: - require: '@5.1.0' + require: + - '@6.0.0' metis: require: '+int64 +real64' mpich: @@ -265,9 +269,11 @@ packages: py-urllib3: require: '@1.26.12' qt: - require: '@5' + require: + - '@5' scotch: - require: '@7.0.4 +mpi+metis~shared~threads~mpi_thread+noarch+esmumps' + require: + - '@7.0.4 +mpi+metis~shared~threads~mpi_thread+noarch+esmumps' sfcio: require: '@1.4.2' shumlib: @@ -291,7 +297,7 @@ packages: # See macOS site config for wgrib2 version/variant overrides wgrib2: require: - - '@3.6.0' + - '@3.6.0 +ipolates +netcdf' wrf-io: require: '@1.2.0' zstd: diff --git a/configs/common/packages_oneapi.yaml b/configs/common/packages_oneapi.yaml index f148f1ecf..54398f5a1 100644 --- a/configs/common/packages_oneapi.yaml +++ b/configs/common/packages_oneapi.yaml @@ -24,3 +24,6 @@ packages: qt: require: - '%gcc' + scotch: + require: + - '%gcc' diff --git a/configs/containers/specs/jedi-ci.yaml b/configs/containers/specs/jedi-ci.yaml index 7072243cc..d61dc8ce9 100644 --- a/configs/containers/specs/jedi-ci.yaml +++ b/configs/containers/specs/jedi-ci.yaml @@ -48,7 +48,7 @@ w3emc@2.10.0, nco, esmf@8.8.0, - mapl@2.53.0, + mapl@2.53.4, zlib-ng, zstd, odc@1.5.2, diff --git a/configs/sites/tier1/derecho/compilers.yaml b/configs/sites/tier1/derecho/compilers.yaml index bca611593..cfaf34761 100644 --- a/configs/sites/tier1/derecho/compilers.yaml +++ b/configs/sites/tier1/derecho/compilers.yaml @@ -2,42 +2,32 @@ compilers:: - compiler: spec: oneapi@2024.2.1 paths: - cc: /glade/u/apps/common/23.08/spack/opt/spack/intel-oneapi-compilers/2024.2.1/compiler/2024.2/bin/icx - cxx: /glade/u/apps/common/23.08/spack/opt/spack/intel-oneapi-compilers/2024.2.1/compiler/2024.2/bin/icpx - f77: /glade/u/apps/common/23.08/spack/opt/spack/intel-oneapi-compilers/2024.2.1/compiler/2024.2/bin/ifort - fc: /glade/u/apps/common/23.08/spack/opt/spack/intel-oneapi-compilers/2024.2.1/compiler/2024.2/bin/ifort + cc: /glade/u/apps/casper/24.12/spack/opt/spack/intel-oneapi-compilers/2024.2.1/gcc/12.4.0/iq3b/compiler/2024.2/bin/icx + cxx: /glade/u/apps/casper/24.12/spack/opt/spack/intel-oneapi-compilers/2024.2.1/gcc/12.4.0/iq3b/compiler/2024.2/bin/icpx + f77: /glade/u/apps/casper/24.12/spack/opt/spack/intel-oneapi-compilers/2024.2.1/gcc/12.4.0/iq3b/compiler/2024.2/bin/ifort + fc: /glade/u/apps/casper/24.12/spack/opt/spack/intel-oneapi-compilers/2024.2.1/gcc/12.4.0/iq3b/compiler/2024.2/bin/ifort flags: {} operating_system: sles15 target: x86_64 modules: - - ncarenv/23.09 - - intel-oneapi/2024.2.1 + - ncarenv/24.12 + - intel/2024.2.1 environment: prepend_path: - PATH: '/opt/cray/pe/gcc/12.2.0/snos/bin' - CPATH: '/opt/cray/pe/gcc/12.2.0/snos/include' - LD_LIBRARY_PATH: '/opt/cray/pe/gcc/12.2.0/snos/lib:/opt/cray/pe/gcc/12.2.0/snos/lib64' - set: - # https://github.com/JCSDA/spack-stack/issues/957 - FI_CXI_RX_MATCH_MODE: 'hybrid' - # https://github.com/JCSDA/spack-stack/issues/1012 - I_MPI_EXTRA_FILESYSTEM: 'ON' - extra_rpaths: [] + PATH: '/glade/u/apps/casper/24.12/spack/opt/spack/gcc/12.4.0/5b5c/bin' + CPATH: '/glade/u/apps/casper/24.12/spack/opt/spack/gcc/12.4.0/5b5c/include' + LD_LIBRARY_PATH: '/glade/u/apps/casper/24.12/spack/opt/spack/gcc/12.4.0/5b5c/lib:/glade/u/apps/casper/24.12/spack/opt/spack/gcc/12.4.0/5b5c/lib64' + - compiler: - spec: gcc@12.2.0 + spec: gcc@12.4.0 paths: - cc: /opt/cray/pe/gcc/12.2.0/bin/gcc - cxx: /opt/cray/pe/gcc/12.2.0/bin/g++ - f77: /opt/cray/pe/gcc/12.2.0/bin/gfortran - fc: /opt/cray/pe/gcc/12.2.0/bin/gfortran + cc: /glade/u/apps/casper/24.12/spack/opt/spack/gcc/12.4.0/5b5c/bin/gcc + cxx: /glade/u/apps/casper/24.12/spack/opt/spack/gcc/12.4.0/5b5c/bin/g++ + f77: /glade/u/apps/casper/24.12/spack/opt/spack/gcc/12.4.0/5b5c/bin/gfortran + fc: /glade/u/apps/casper/24.12/spack/opt/spack/gcc/12.4.0/5b5c/bin/gfortran flags: {} operating_system: sles15 target: x86_64 modules: - - ncarenv/23.09 - - gcc/12.2.0 - environment: - set: - # https://github.com/JCSDA/spack-stack/issues/957 - FI_CXI_RX_MATCH_MODE: 'hybrid' - extra_rpaths: [] + - ncarenv/24.12 + - gcc/12.4.0 diff --git a/configs/sites/tier1/derecho/modules.yaml b/configs/sites/tier1/derecho/modules.yaml index 960198ae7..65801706f 100644 --- a/configs/sites/tier1/derecho/modules.yaml +++ b/configs/sites/tier1/derecho/modules.yaml @@ -4,5 +4,4 @@ modules: - lmod lmod: include: - - cray-mpich - python diff --git a/configs/sites/tier1/derecho/packages.yaml b/configs/sites/tier1/derecho/packages.yaml index 11f4d566f..3e452397a 100644 --- a/configs/sites/tier1/derecho/packages.yaml +++ b/configs/sites/tier1/derecho/packages.yaml @@ -1,8 +1,17 @@ packages: +# Modification of common packages all: target: [core2] - -### Modification of common packages + # Use system zlib instead of spack-built zlib-ng + providers: + zlib-api:: [zlib] + zlib-api: + buildable: False + zlib: + buildable: False + externals: + - spec: zlib@1.2.11 + prefix: /usr # Tell esmf that this is not a 'normal' Cray ... esmf: require: @@ -25,10 +34,6 @@ packages: externals: - spec: coreutils@8.32 prefix: /usr - curl: - externals: - - spec: curl@8.1.2+gssapi+ldap+nghttp2 - prefix: /glade/u/apps/derecho/23.09/spack/opt/spack/curl/8.1.2/gcc/7.5.0/uq6y cvs: externals: - spec: cvs@1.12.13 @@ -47,14 +52,12 @@ packages: prefix: /usr git: externals: - - spec: git@2.41.0+tcltk - prefix: /glade/u/apps/derecho/23.09/spack/opt/spack/git/2.41.0/gcc/7.5.0/jgni - - spec: git@2.35.3+tcltk - prefix: /usr + - spec: git@2.47.0 + prefix: /glade/u/apps/casper/24.12/spack/opt/spack/git/2.47.0/gcc/12.4.0/cn62 git-lfs: externals: - - spec: git-lfs@3.3.0 - prefix: /glade/u/apps/derecho/23.09/spack/opt/spack/git-lfs/3.3.0/gcc/7.5.0/u3kh + - spec: git-lfs@3.5.1 + prefix: /glade/u/apps/casper/24.12/spack/opt/spack/git-lfs/3.5.1/gcc/12.4.0/aivb gmake: externals: - spec: gmake@4.2.1 @@ -76,7 +79,7 @@ packages: - spec: m4@1.4.18 prefix: /usr mysql: - buildable: False + buildable: false externals: - spec: mysql@8.0.33 prefix: /glade/work/epicufsrt/contrib/spack-stack/derecho/mysql-8.0.33 @@ -84,9 +87,9 @@ packages: externals: - spec: openssh@8.4p1 prefix: /usr - # spack concretizer gets confused when omitting %gcc from the external spec (a spack bug?) +# spack concretizer gets confused when omitting %gcc from the external spec (a spack bug?) openssl: - buildable: False + buildable: false externals: - spec: openssl@1.1.1l%gcc prefix: /usr @@ -95,9 +98,12 @@ packages: - spec: pkg-config@0.29.2 prefix: /usr qt: - buildable: False + buildable: false externals: - spec: qt@5.14.2 + # Newer versions don't work, some headers are missing + #prefix: /glade/u/apps/casper/24.12/spack/opt/spack/qt/5.14.2/gcc/12.4.0/6suc + #prefix: /glade/u/apps/casper/24.12/spack/opt/spack/qt/5.14.2/gcc/12.4.0/axtw prefix: /glade/u/apps/derecho/23.09/spack/opt/spack/qt/5.14.2/gcc/7.5.0/eqcj sed: externals: diff --git a/configs/sites/tier1/derecho/packages_gcc.yaml b/configs/sites/tier1/derecho/packages_gcc.yaml index 332c6117b..fbc9a9baa 100644 --- a/configs/sites/tier1/derecho/packages_gcc.yaml +++ b/configs/sites/tier1/derecho/packages_gcc.yaml @@ -1,15 +1,16 @@ packages: all: - compiler:: [gcc@12.2.0] + compiler:: [gcc@12.4.0] providers: - mpi:: [cray-mpich@8.1.27] + mpi:: [cray-mpich@8.1.29] mpi: buildable: False cray-mpich: externals: - - spec: cray-mpich@8.1.27%gcc@12.2.0 +wrappers + - spec: cray-mpich@8.1.29%gcc@12.4.0 +wrappers modules: - - craype/2.7.20 - - cray-mpich/8.1.27 + - craype/2.7.31 + - ncarenv/24.12 + - gcc/12.4.0 - libfabric/1.15.2.0 - - cray-pals/1.2.11 + - cray-mpich/8.1.29 diff --git a/configs/sites/tier1/derecho/packages_oneapi.yaml b/configs/sites/tier1/derecho/packages_oneapi.yaml index bfb807e6e..1edce74c5 100644 --- a/configs/sites/tier1/derecho/packages_oneapi.yaml +++ b/configs/sites/tier1/derecho/packages_oneapi.yaml @@ -1,23 +1,24 @@ packages: all: - compiler:: [oneapi@2024.2.1, gcc@12.2.0] + compiler:: [oneapi@2024.2.1, gcc@12.4.0] providers: mpi:: [cray-mpich@8.1.29] mpi: - buildable: False + buildable: false cray-mpich: externals: - spec: cray-mpich@8.1.29%oneapi@2024.2.1 +wrappers modules: - - craype/2.7.20 - - cray-mpich/8.1.29 + - ncarenv/24.12 + - craype/2.7.31 + - intel/2024.2.1 - libfabric/1.15.2.0 - - cray-pals/1.2.11 + - cray-mpich/8.1.29 intel-oneapi-runtime: buildable: False externals: - spec: intel-oneapi-runtime@2024.2.1%oneapi@2024.2.1 - prefix: /glade/u/apps/common/23.08/spack/opt/spack/intel-oneapi-compilers/2024.2.1 + prefix: /glade/u/apps/casper/24.12/spack/opt/spack/intel-oneapi-compilers/2024.2.1/gcc/12.4.0/iq3b/compiler/2024.2 intel-oneapi-mkl: # No intel-oneapi-mkl installed on Derecho, install via spack. # Prefer the version that Intel releases with the above compiler diff --git a/configs/sites/tier1/discover-scu16/compilers.yaml b/configs/sites/tier1/discover-scu16/compilers.yaml deleted file mode 100644 index 949f2b8b5..000000000 --- a/configs/sites/tier1/discover-scu16/compilers.yaml +++ /dev/null @@ -1,51 +0,0 @@ -compilers: -- compiler: - spec: intel@=2021.6.0 - paths: - cc: /usr/local/intel/oneapi/2021/compiler/2022.1.0/linux/bin/intel64/icc - cxx: /usr/local/intel/oneapi/2021/compiler/2022.1.0/linux/bin/intel64/icpc - f77: /usr/local/intel/oneapi/2021/compiler/2022.1.0/linux/bin/intel64/ifort - fc: /usr/local/intel/oneapi/2021/compiler/2022.1.0/linux/bin/intel64/ifort - flags: - ldflags: '-L/usr/local/other/gcc/11.2.0/lib64' - operating_system: sles12 - target: x86_64 - modules: - - comp/intel/2021.6.0 - environment: - prepend_path: - PATH: '/usr/local/other/gcc/11.2.0/bin' - CPATH: '/usr/local/other/gcc/11.2.0/include' - LD_LIBRARY_PATH: '/usr/local/intel/oneapi/2021/compiler/2022.1.0/linux/compiler/lib/intel64_lin:/usr/local/other/gcc/11.2.0/lib64' - set: - I_MPI_ROOT: '/usr/local/intel/oneapi/2021/mpi/2021.6.0' - extra_rpaths: [] -- compiler: - spec: gcc@=12.1.0 - paths: - cc: /usr/local/other/gcc/12.1.0/bin/gcc - cxx: /usr/local/other/gcc/12.1.0/bin/g++ - f77: /usr/local/other/gcc/12.1.0/bin/gfortran - fc: /usr/local/other/gcc/12.1.0/bin/gfortran - flags: {} - operating_system: sles12 - target: x86_64 - modules: - - comp/gcc/12.1.0 - environment: {} - extra_rpaths: [] -# Needed for Intel backend -- compiler: - spec: gcc@=11.2.0 - paths: - cc: /usr/local/other/gcc/11.2.0/bin/gcc - cxx: /usr/local/other/gcc/11.2.0/bin/g++ - f77: /usr/local/other/gcc/11.2.0/bin/gfortran - fc: /usr/local/other/gcc/11.2.0/bin/gfortran - flags: {} - operating_system: sles12 - target: x86_64 - modules: - - comp/gcc/11.2.0 - environment: {} - extra_rpaths: [] diff --git a/configs/sites/tier1/discover-scu16/modules.yaml b/configs/sites/tier1/discover-scu16/modules.yaml deleted file mode 100644 index 65801706f..000000000 --- a/configs/sites/tier1/discover-scu16/modules.yaml +++ /dev/null @@ -1,7 +0,0 @@ -modules: - default: - enable:: - - lmod - lmod: - include: - - python diff --git a/configs/sites/tier1/discover-scu16/packages.yaml b/configs/sites/tier1/discover-scu16/packages.yaml deleted file mode 100644 index 217347278..000000000 --- a/configs/sites/tier1/discover-scu16/packages.yaml +++ /dev/null @@ -1,166 +0,0 @@ -packages: -### Modification of common packages - # Problems building shared hdf-eos2 with Intel, not needed - hdf-eos2: - variants: ~shared - # Explicitly requested by GMAO collaborators - met: - variants: +python +grib2 +graphics +lidar2nc +modis - # xnnpack option doesn't build on this system - py-torch: - variants: ~xnnpack -### All other external packages listed alphabetically - autoconf: - externals: - - spec: autoconf@2.69 - prefix: /usr - automake: - externals: - - spec: automake@1.13.4 - prefix: /usr - bash: - externals: - - spec: bash@4.3.48 - prefix: /usr/local - berkeley-db: - externals: - - spec: berkeley-db@4.8.30 - prefix: /usr - ccache: - externals: - - spec: ccache@3.1.9 - prefix: /usr - cpio: - externals: - - spec: cpio@2.11 - prefix: /usr - diffutils: - externals: - - spec: diffutils@3.3 - prefix: /usr - file: - externals: - - spec: file@5.22 - prefix: /usr - findutils: - externals: - - spec: findutils@4.5.12 - prefix: /usr - flex: - # Must set buildable: false to avoid duplicate packages - buildable: false - externals: - - spec: flex@2.6.4 - prefix: /usr - gawk: - externals: - - spec: gawk@4.1.0 - prefix: /usr - gettext: - externals: - - spec: gettext@0.19.2 - prefix: /usr - ghostscript: - externals: - - spec: ghostscript@9.26 - prefix: /usr - git: - externals: - - spec: git@2.12.3+tcltk - prefix: /usr - - spec: git@2.30.2+tcltk - prefix: /usr/local/other/git/2.30.2 - modules: - - git/2.30.2 - git-lfs: - externals: - - spec: git-lfs@3.0.2 - prefix: /usr/local/other/git-lfs/3.0.2 - modules: - - git-lfs/3.0.2 - gmake: - externals: - - spec: gmake@4.0 - prefix: /usr - grep: - externals: - - spec: grep@2.16 - prefix: /usr - groff: - externals: - - spec: groff@1.22.2 - prefix: /usr - hwloc: - externals: - - spec: hwloc@1.11.5rc2-git - prefix: /usr - krb5: - externals: - - spec: krb5@1.12.5 - prefix: /usr/lib/mit - libfuse: - externals: - - spec: libfuse@2.9.3 - prefix: /usr - libxpm: - externals: - - spec: libxpm@4.11.0 - prefix: /usr - m4: - externals: - - spec: m4@1.4.16 - prefix: /usr - ncurses: - externals: - - spec: ncurses@5.9.20140201+termlib abi=6 - prefix: /usr - # Old re2c on Discover unable to build newer versions of ninja - ninja: - version:: ['1.10.2'] - perl: - externals: - - spec: perl@5.18.2~cpanm+shared+threads - prefix: /usr - pkg-config: - externals: - - spec: pkg-config@0.28 - prefix: /usr - qt: - buildable: False - externals: - - spec: qt@5.15.2 - prefix: /discover/swdev/jcsda/spack-stack/qt-5.15.2/5.15.2/gcc_64 - rsync: - externals: - - spec: rsync@3.1.0 - prefix: /usr - ruby: - externals: - - spec: ruby@2.1.9 - prefix: /usr - sed: - externals: - - spec: sed@4.2.2 - prefix: /usr - texinfo: - externals: - - spec: texinfo@4.13 - prefix: /usr - texlive: - externals: - - spec: texlive@20130530 - prefix: /usr - wget: - externals: - - spec: wget@1.20.3 - prefix: /usr/local/other/wget/1.20.3 - modules: - - wget/1.20.3 - xz: - externals: - - spec: xz@5.0.5 - prefix: /usr - zip: - externals: - - spec: zip@3.0 - prefix: /usr diff --git a/configs/sites/tier1/discover-scu16/packages_gcc.yaml b/configs/sites/tier1/discover-scu16/packages_gcc.yaml deleted file mode 100644 index f3f07103d..000000000 --- a/configs/sites/tier1/discover-scu16/packages_gcc.yaml +++ /dev/null @@ -1,14 +0,0 @@ -packages: - all: - compiler:: [gcc@12.1.0] - providers: - mpi:: [openmpi@4.1.3] - mpi: - buildable: False - openmpi: - externals: - - spec: openmpi@4.1.3%gcc@12.1.0 ~cuda~cxx~cxx_exceptions~java~memchecker+pmi~static~wrapper-rpath - fabrics=ucx schedulers=slurm - prefix: /discover/swdev/gmao_SIteam/MPI/openmpi/4.1.3/gcc-12.1.0 - modules: - - mpi/openmpi/4.1.3/gcc-12.1.0 diff --git a/configs/sites/tier1/discover-scu16/packages_intel.yaml b/configs/sites/tier1/discover-scu16/packages_intel.yaml deleted file mode 100644 index a0f857ac8..000000000 --- a/configs/sites/tier1/discover-scu16/packages_intel.yaml +++ /dev/null @@ -1,17 +0,0 @@ -packages: - all: - compiler:: [intel@2021.6.0,gcc@11.2.0] - providers: - mpi:: [intel-oneapi-mpi@2021.6.0] - mpi: - buildable: False - intel-oneapi-mpi: - externals: - - spec: intel-oneapi-mpi@2021.6.0%intel@2021.6.0 +classic-names - prefix: /usr/local/intel/oneapi/2021 - modules: - - mpi/impi/2021.6.0 - intel-oneapi-mkl: - externals: - - spec: intel-oneapi-mkl@2022.2.0%intel@2021.6.0 - prefix: /usr/local/intel/oneapi/2021 diff --git a/configs/sites/tier1/gaea-c6/compilers.yaml b/configs/sites/tier1/gaea-c6/compilers.yaml index 774275d9f..ae0bdc7cb 100644 --- a/configs/sites/tier1/gaea-c6/compilers.yaml +++ b/configs/sites/tier1/gaea-c6/compilers.yaml @@ -1,4 +1,30 @@ compilers: +- compiler: + spec: oneapi@2024.2.1 + paths: + cc: cc + cxx: CC + f77: ftn + fc: ftn + flags: {} + operating_system: sles15 + target: x86_64 + modules: + - PrgEnv-intel/8.6.0 + - intel/2024.2 + - craype/2.7.34 + - cray-libsci/24.11.0 + - libfabric/1.20.1 + environment: + prepend_path: + LD_LIBRARY_PATH: '/opt/cray/libfabric/1.20.1/lib64:/opt/cray/pe/libsci/24.07.0/INTEL/2023.2/x86_64/lib:/usr/lib64/gcc/x86_64-suse-linux/12:/opt/intel/oneapi/compiler/2024.2/lib' + set: + # OpenSUSE on Gaea C6 sets CONFIG_SITE so + # Automake-based builds are installed in lib64 + # which confuses some packages. + CONFIG_SITE: '' + extra_rpaths: + - /opt/intel/oneapi/compiler/2024.2/lib - compiler: spec: intel@2023.2.0 paths: @@ -10,6 +36,7 @@ compilers: cflags: "-gcc-name=/usr/bin/gcc-12" cxxflags: "-gxx-name=/usr/bin/g++-12 -gcc-name=/usr/bin/gcc-12 -static-libstdc++" fflags: "-gcc-name=/usr/bin/gcc-12" + target: x86_64 operating_system: sles15 modules: - PrgEnv-intel/8.5.0 @@ -34,10 +61,18 @@ compilers: fc: /usr/bin/gfortran-12 flags: {} operating_system: sles15 + target: x86_64 modules: - - PrgEnv-gnu/8.5.0 + - PrgEnv-gnu/8.6.0 - gcc-native/12.3 - - craype/2.7.30 + - craype/2.7.34 - libfabric/1.20.1 - environment: {} - extra_rpaths: [] + #- cray-libsci/24.11.0 + - libfabric/1.20.1 + #environment: {} + environment: + prepend_path: + LD_LIBRARY_PATH: '/opt/cray/libfabric/1.20.1/lib64:/opt/cray/pe/libsci/24.07.0/INTEL/2023.2/x86_64/lib:/usr/lib64/gcc/x86_64-suse-linux/12:/opt/intel/oneapi/compiler/2024.2/lib' + #extra_rpaths: [] + extra_rpaths: + - /opt/intel/oneapi/compiler/2024.2/lib diff --git a/configs/sites/tier1/gaea-c6/packages.yaml b/configs/sites/tier1/gaea-c6/packages.yaml index 08d512e36..03364d66b 100644 --- a/configs/sites/tier1/gaea-c6/packages.yaml +++ b/configs/sites/tier1/gaea-c6/packages.yaml @@ -28,11 +28,6 @@ packages: externals: - spec: binutils@2.41-150100.7.46.1 prefix: /usr - cmake: - buildable: false - externals: - - spec: cmake@3.27.9 - modules: [cmake/3.27.9] coreutils: externals: - spec: coreutils@8.32 diff --git a/configs/sites/tier1/gaea-c6/packages_gcc.yaml b/configs/sites/tier1/gaea-c6/packages_gcc.yaml new file mode 100644 index 000000000..f7cc32465 --- /dev/null +++ b/configs/sites/tier1/gaea-c6/packages_gcc.yaml @@ -0,0 +1,18 @@ +packages: + all: + compiler:: [gcc@12.3.0] + providers: + mpi:: [cray-mpich@8.1.32] + mpi: + buildable: False + cray-mpich: + externals: + - spec: cray-mpich@8.1.32 + prefix: /opt/cray/pe/mpich/8.1.32/ofi/gnu/12.3 + modules: + - craype-network-ofi + - cray-mpich/8.1.32 + gcc-runtime: + externals: + - spec: gcc-runtime@12.3.0%gcc@12.3.0 + prefix: /usr diff --git a/configs/sites/tier1/gaea-c6/packages_oneapi.yaml b/configs/sites/tier1/gaea-c6/packages_oneapi.yaml new file mode 100644 index 000000000..a6e0a9aae --- /dev/null +++ b/configs/sites/tier1/gaea-c6/packages_oneapi.yaml @@ -0,0 +1,41 @@ +packages: + all: + compiler:: [oneapi@2024.2.1, gcc@12.3.0] + providers: + mpi:: [cray-mpich@8.1.32] +### MPI, Python, MKL + mpi: + buildable: False + cray-mpich: + buildable: False + externals: + - spec: cray-mpich@8.1.32%oneapi@2024.2.1 ~wrappers + prefix: /opt/cray/pe/mpich/8.1.32/ofi/intel/2022.1 + modules: + - cray-mpich/8.1.32 + - craype-network-ofi + intel-oneapi-runtime: + buildable: False + externals: + - spec: intel-oneapi-runtime@2024.2.1%oneapi@2024.2.1 + prefix: /opt/intel/oneapi/compiler/2024.2 + intel-oneapi-mkl: + buildable: False + externals: + - spec: intel-oneapi-mkl@2023.2.0%oneapi@2024.2.1 + prefix: /opt/intel/oneapi + +### Modification of common packages + bison: + require: + - '%gcc' + ectrans: + require:: + - '@1.2.0 +mkl ~fftw' + gsibec: + require:: + - '@1.2.1 ~mkl' + py-numpy: + require:: + - '@1.26' + - '^openblas' diff --git a/configs/sites/tier1/hera/compilers.yaml b/configs/sites/tier1/hera/compilers.yaml index 4bb5ba4ef..7f7617cc0 100644 --- a/configs/sites/tier1/hera/compilers.yaml +++ b/configs/sites/tier1/hera/compilers.yaml @@ -8,6 +8,7 @@ compilers: fc: /apps/oneapi/compiler/2022.0.2/linux/bin/intel64/ifort flags: {} operating_system: rocky8 + target: x86_64 modules: - intel/2022.1.2 environment: @@ -17,17 +18,23 @@ compilers: CPATH: '/apps/gnu/gcc-9.2.0/include' extra_rpaths: [] - compiler: - spec: gcc@13.2.0 + spec: gcc@13.3.0 paths: - cc: /apps/gnu/gcc-13.2.0/bin/gcc - cxx: /apps/gnu/gcc-13.2.0/bin/g++ - f77: /apps/gnu/gcc-13.2.0/bin/gfortran - fc: /apps/gnu/gcc-13.2.0/bin/gfortran + cc: /contrib/spack-stack/installs/gnu/13.3.0/bin/gcc + cxx: /contrib/spack-stack/installs/gnu/13.3.0/bin/g++ + f77: /contrib/spack-stack/installs/gnu/13.3.0/bin/gfortran + fc: /contrib/spack-stack/installs/gnu/13.3.0/bin/gfortran flags: {} operating_system: rocky8 + target: x86_64 modules: - - gnu/13.2.0 - environment: {} + - gnu/13.3.0 + environment: + prepend_path: + MODULEPATH: '/contrib/spack-stack/installs/gnu/modulefiles' + PATH: '/contrib/spack-stack/installs/ucx/ucx-1.20.0/bin' + LD_LIBRARY_PATH: '/contrib/spack-stack/installs/ucx/ucx-1.20.0/lib' + PKG_CONFIG_PATH: '/contrib/spack-stack/installs/ucx/ucx-1.20.0/lib/pkgconfig' extra_rpaths: [] - compiler: spec: oneapi@2024.2.1 @@ -38,6 +45,7 @@ compilers: fc: /apps/oneapi/compiler/2024.2/bin/ifort flags: {} operating_system: rocky8 + target: x86_64 modules: - intel/2024.2.1 environment: diff --git a/configs/sites/tier1/hera/packages.yaml b/configs/sites/tier1/hera/packages.yaml index ac6cad40e..c7808255a 100644 --- a/configs/sites/tier1/hera/packages.yaml +++ b/configs/sites/tier1/hera/packages.yaml @@ -1,7 +1,17 @@ packages: all: + # https://github.com/JCSDA/spack-stack/issues/1781 # To support hecflow01 - target: [haswell] + #target: [haswell] + providers: + zlib-api:: [zlib] + zlib-api: + buildable: False + zlib: + buildable: False + externals: + - spec: zlib@1.2.11 + prefix: /usr autoconf: externals: - spec: autoconf@2.69 @@ -101,10 +111,10 @@ packages: mysql: buildable: False externals: - - spec: mysql@8.0.31 - prefix: /scratch1/NCEPDEV/global/spack-stack/apps/mysql-8.0.31 + - spec: mysql@8.0.36 + prefix: /contrib/spack-stack/installs/mysql/8.0.36 modules: - - mysql/8.0.31 + - mysql/8.0.36 ncurses: externals: - spec: ncurses@5.9.20130511+termlib abi=5 @@ -120,7 +130,7 @@ packages: qt: externals: - spec: qt@5.12.6 - prefix: /scratch1/NCEPDEV/nems/role.epic/installs/qt-5.12.6/qtbase + prefix: /contrib/spack-stack/installs/qt-5.12.6/qtbase rsync: externals: - spec: rsync@3.1.2 diff --git a/configs/sites/tier1/hera/packages_gcc.yaml b/configs/sites/tier1/hera/packages_gcc.yaml index 23e55c774..df907fe3f 100644 --- a/configs/sites/tier1/hera/packages_gcc.yaml +++ b/configs/sites/tier1/hera/packages_gcc.yaml @@ -1,13 +1,14 @@ packages: all: - compiler:: [gcc@13.2.0] + compiler:: [gcc@13.3.0] providers: mpi:: [openmpi@4.1.6] mpi: buildable: False openmpi: externals: - - spec: openmpi@4.1.6~atomics~cuda~cxx~cxx_exceptions~gpfs~internal-hwloc~internal-libevent~internal-pmix~java+legacylaunchers~lustre~memchecker~openshmem~orterunprefix+pmi+romio+rsh~singularity+static+vt+wrapper-rpath fabrics=ucx schedulers=slurm + - spec: openmpi@4.1.6~cuda~cxx~cxx_exceptions~java+lustre~memchecker+pmi~static~wrapper-rpath schedulers=slurm fabrics=ucx + prefix: /contrib/spack-stack/installs/openmpi/4.1.6 modules: - - gnu/13.2.0 + - gnu/13.3.0 - openmpi/4.1.6 diff --git a/configs/sites/tier1/hera/packages_intel.yaml b/configs/sites/tier1/hera/packages_intel.yaml index ad7ec6512..f5bc6fc10 100644 --- a/configs/sites/tier1/hera/packages_intel.yaml +++ b/configs/sites/tier1/hera/packages_intel.yaml @@ -32,6 +32,3 @@ packages: require:: - '^openblas' # *DH - zlib-ng: - require: - - '~shared' diff --git a/configs/sites/tier1/hera/packages_oneapi.yaml b/configs/sites/tier1/hera/packages_oneapi.yaml index f70c19f2d..7bd73cab6 100644 --- a/configs/sites/tier1/hera/packages_oneapi.yaml +++ b/configs/sites/tier1/hera/packages_oneapi.yaml @@ -1,6 +1,6 @@ packages: all: - compiler:: [oneapi@2024.2.1] + compiler:: [oneapi@2024.2.1, gcc@13.3.0] providers: mpi:: [intel-oneapi-mpi@2021.13] # Remove the next three lines to switch to intel-oneapi-mkl @@ -35,9 +35,6 @@ packages: - '@1.26' - '^openblas' # *DH - zlib-ng: - require: - - '~shared' cdo: require: - '@2.3.0' diff --git a/configs/sites/tier1/hercules/compilers.yaml b/configs/sites/tier1/hercules/compilers.yaml index 81a374ef6..efe9f2712 100644 --- a/configs/sites/tier1/hercules/compilers.yaml +++ b/configs/sites/tier1/hercules/compilers.yaml @@ -42,16 +42,18 @@ compilers: I_MPI_EXTRA_FILESYSTEM: 'ON' extra_rpaths: [] - compiler: - spec: gcc@12.2.0 + spec: gcc@13.3.0 paths: - cc: /apps/spack-managed/gcc-11.3.1/gcc-12.2.0-7cu3qahzhsxpauy4jlnsbcqmlbkxbbbo/bin/gcc - cxx: /apps/spack-managed/gcc-11.3.1/gcc-12.2.0-7cu3qahzhsxpauy4jlnsbcqmlbkxbbbo/bin/g++ - f77: /apps/spack-managed/gcc-11.3.1/gcc-12.2.0-7cu3qahzhsxpauy4jlnsbcqmlbkxbbbo/bin/gfortran - fc: /apps/spack-managed/gcc-11.3.1/gcc-12.2.0-7cu3qahzhsxpauy4jlnsbcqmlbkxbbbo/bin/gfortran + cc: /apps/contrib/spack-stack/gnu/installs/gnu/13.3.0/bin/gcc + cxx: /apps/contrib/spack-stack/gnu/installs/gnu/13.3.0/bin/g++ + f77: /apps/contrib/spack-stack/gnu/installs/gnu/13.3.0/bin/gfortran + fc: /apps/contrib/spack-stack/gnu/installs/gnu/13.3.0/bin/gfortran flags: {} operating_system: rocky9 target: x86_64 modules: - - gcc/12.2.0 - environment: {} + - gnu/13.3.0 + environment: + prepend_path: + MODULEPATH: '/apps/contrib/spack-stack/modulefiles' extra_rpaths: [] diff --git a/configs/sites/tier1/hercules/packages.yaml b/configs/sites/tier1/hercules/packages.yaml index 28b8ce48c..15b47d90b 100644 --- a/configs/sites/tier1/hercules/packages.yaml +++ b/configs/sites/tier1/hercules/packages.yaml @@ -1,6 +1,6 @@ packages: # For addressing https://github.com/JCSDA/spack-stack/issues/1355 - # Use system zlib instead of spack-built zlib-ng + # Use system zlib instead of spack-built zlib-ng all: providers: zlib-api:: [zlib] @@ -9,9 +9,10 @@ packages: zlib: buildable: False externals: - - spec: zlib@1.2.11 - prefix: /usr - + - spec: zlib@1.2.13 + prefix: /apps/spack-managed/gcc-11.3.1/zlib-1.2.13-ltp4c3zzde3zi3gf7x4b7c7nj5ww4i4g + modules: + - zlib/1.2.13 autoconf: externals: - spec: autoconf@2.69 @@ -79,11 +80,10 @@ packages: externals: - spec: m4@1.4.19 prefix: /usr - # Don't use, issues with py-cryptography - #openssl: - # externals: - # - spec: openssl@3.0.1 - # prefix: /usr + openssl: + externals: + - spec: openssl@3.0.1 + prefix: /usr pkgconf: externals: - spec: pkgconf@1.7.3 @@ -96,10 +96,10 @@ packages: externals: - spec: subversion@1.14.1 prefix: /usr - tar: - externals: - - spec: tar@1.34 - prefix: /usr + #tar: + # externals: + # - spec: tar@1.34 + # prefix: /usr texinfo: externals: - spec: texinfo@6.7 diff --git a/configs/sites/tier1/hercules/packages_gcc.yaml b/configs/sites/tier1/hercules/packages_gcc.yaml index befa2ad68..835c8dd72 100644 --- a/configs/sites/tier1/hercules/packages_gcc.yaml +++ b/configs/sites/tier1/hercules/packages_gcc.yaml @@ -1,17 +1,17 @@ packages: all: - compiler:: [gcc@12.2.0] + compiler:: [gcc@13.3.0] providers: - mpi:: [openmpi@4.1.4] + mpi:: [openmpi@4.1.6] mpi: buildable: False openmpi: externals: - - spec: openmpi@4.1.4%gcc@12.2.0 ~atomics~cuda~cxx~cxx_exceptions~gpfs~internal-hwloc~internal-libevent~internal-pmix~java~legacylaunchers~lustre~memchecker~openshmem~orterunprefix+pmi+romio+rsh~singularity+static+vt+wrapper-rpath fabrics=none romio-filesystem=none schedulers=slurm - prefix: /apps/spack-managed/gcc-12.2.0/openmpi-4.1.4-hf3dkf6r56x3klzcgs3u7esgt3fhnk63 + - spec: openmpi@4.1.6~atomics~cuda~cxx~cxx_exceptions~java+legacylaunchers~lustre~memchecker~openshmem~orterunprefix+pmi+romio+rsh~singularity+static+vt+wrapper-rpath fabrics=ucx schedulers=slurm + prefix: /apps/contrib/spack-stack/openmpi/installs/openmpi/4.1.6 modules: - - gcc/12.2.0 - - openmpi/4.1.4 + - gnu/13.3.0 + - openmpi/4.1.6 ectrans: require:: @@ -23,6 +23,3 @@ packages: require:: - '@1.26' - '^openblas' - zlib-ng: - require: - - '~shared' diff --git a/configs/sites/tier1/nas/README.md b/configs/sites/tier1/nas/README.md new file mode 100644 index 000000000..b3f570619 --- /dev/null +++ b/configs/sites/tier1/nas/README.md @@ -0,0 +1,131 @@ +# How to build spack-stack at NAS + +In the commands below some will be run on login nodes (with internet access) and some +on compute nodes as, at NAS, you aren't allowed more than 2 processes on a login node. + +## Clone spack-stack + +``` +git clone --recursive https://github.com/JCSDA/spack-stack.git -b release/1.9.0 spack-stack-1.9.3 +``` + +## Grab interactive node + +Since NAS limits you to 2 processes on a login node, you'll need to grab an interactive node. For example: +``` +qsub -I -V -X -l select=1:ncpus=128:mpiprocs=128:model=mil_ait -l walltime=12:00:00 -W group_list=s1873 -m b -N Interactive +``` +will get you a Milan node for 12 hours + +## Setup spack-stack on each node + +We will start on a login node with internet access. This is mainly needed for the +`spack mirror create` command which downloads all the source code for the packages. + +``` +cd spack-stack-1.9.3 +. setup.sh +``` + +## Create environments + +We create two different environments, one for oneAPI and one for GCC. The commands below +are used to create the environments. You only need to do this once. + +### oneAPI + +To create the oneAPI environment, do: + +``` +spack stack create env --name ue-oneapi-2024.2.0 --template unified-dev --site nas --compiler oneapi +cd envs/ue-oneapi-2024.2.0 +``` + +### GCC + +To create the GCC environment, do: + +``` +spack stack create env --name ue-gcc-12.3.0 --template unified-dev --site nas --compiler gcc +cd envs/ue-gcc-12.3.0 +``` + +## Activate environment + +Now enter the spack environment you just created: + +``` +spack env activate . +``` + +NOTE: You need to make sure you do this in *any* terminal where you want to do any commmand +below with this environment. + +## Concretize and create source cache + +``` +spack concretize 2>&1 | tee log.concretize +``` + +## Create source cache (LOGIN NODE ONLY) + +Because this step downloads all the source code for all packages and all versions, it +should be done on a login node with internet access. + +``` +spack mirror create -a -d /nobackup/gmao_SIteam/spack-stack/source-cache +``` + +NOTE: Make sure you are in an environment when you run that `spack mirror create` command. Otherwise, +you will download *EVERY* package and *EVERY* version in spack! + +## Install packages + +Our install process will actually have (at least) three steps. This is because of the `crtm` package +which requires internet access at build time. + +### Install crtm dependencies (COMPUTE NODE) + +``` +spack install -j 10 --verbose --fail-fast --show-log-on-error --no-check-signature --only dependencies crtm 2>&1 | tee log.install.crtm_dependencies +``` + +### Install crtm (LOGIN NODE) + +``` +spack install -j 2 --verbose --fail-fast --show-log-on-error --no-check-signature crtm 2>&1 | tee log.install.crtm +``` + +Note we are only using 2 processes here because NAS limits you to 2 processes on a login node. + +### Install rest of packages (COMPUTE NODE) + +``` +spack install -j 10 --verbose --fail-fast --show-log-on-error --no-check-signature 2>&1 | tee log.install.after_crtm +``` + +NOTE: You might need to run the `spack install` command multiple times because sometimes +it just fails. But then you run it more and more and it will eventually succeed. + +### Packages needing internet access to build + +If you encounter other packages that need internet access to build, you can install them with: + +``` +spack install -j 2 --verbose --fail-fast --show-log-on-error --no-check-signature |& tee log.install. +``` + +Then, once that package is built, you can go back to the compute node and run the `spack install` command again. + +## Update module files and setup meta-modules + +``` +spack module tcl refresh -y +spack stack setup-meta-modules +``` + +## Deactivate environment + +``` +spack env deactivate +``` diff --git a/configs/sites/tier1/nas/compilers.yaml b/configs/sites/tier1/nas/compilers.yaml new file mode 100644 index 000000000..6842f9719 --- /dev/null +++ b/configs/sites/tier1/nas/compilers.yaml @@ -0,0 +1,57 @@ +compilers: +- compiler: + spec: oneapi@=2024.2.0 + paths: + cc: /nobackup/gmao_SIteam/intel/oneapi/compiler/2024.2/bin/icx + cxx: /nobackup/gmao_SIteam/intel/oneapi/compiler/2024.2/bin/icpx + f77: /nobackup/gmao_SIteam/intel/oneapi/compiler/2024.2/bin/ifort + fc: /nobackup/gmao_SIteam/intel/oneapi/compiler/2024.2/bin/ifort + flags: {} + operating_system: rhel8 + target: x86_64 + modules: + - comp-intel/2024.2.0-ifort + environment: + prepend_path: + PATH: '/nobackup/gmao_SIteam/gcc/gcc-12.3.0-TOSS4/bin' + CPATH: '/nobackup/gmao_SIteam/gcc/gcc-12.3.0-TOSS4/include' + LD_LIBRARY_PATH: '/nobackup/gmao_SIteam/intel/oneapi/compiler/2024.2/lib/:/nobackup/gmao_SIteam/gcc/gcc-12.3.0-TOSS4/lib64' + set: + MPI_COLL_REPRODUCIBLE: 'yes' + MPI_MEMMAP_OFF: 'yes' + MPI_XPMEM_ENABLED: 'yes' + MPI_LAUNCH_TIMEOUT: '40' + MPI_COMM_MAX: '1024' + MPI_GROUP_MAX: '1024' + MPI_BUFS_PER_PROC: '256' + unset: + - MPI_NUM_MEMORY_REGIONS + - SUPPRESS_XPMEM_TRIM_THRESH + - PMI_RANK + extra_rpaths: [] +- compiler: + spec: gcc@=12.3.0 + paths: + cc: /nobackup/gmao_SIteam/gcc/gcc-12.3.0-TOSS4/bin/gcc + cxx: /nobackup/gmao_SIteam/gcc/gcc-12.3.0-TOSS4/bin/g++ + f77: /nobackup/gmao_SIteam/gcc/gcc-12.3.0-TOSS4/bin/gfortran + fc: /nobackup/gmao_SIteam/gcc/gcc-12.3.0-TOSS4/bin/gfortran + flags: {} + operating_system: rhel8 + target: x86_64 + modules: + - comp-gcc/12.3.0-TOSS4 + environment: + set: + OMPI_MCA_mpi_preconnect_all: 1 + OMPI_MCA_coll_tuned_bcast_algorithm: 7 + OMPI_MCA_coll_tuned_scatter_algorithm: 2 + OMPI_MCA_coll_tuned_reduce_scatter_algorithm: 3 + OMPI_MCA_coll_tuned_allreduce_algorithm: 3 + OMPI_MCA_coll_tuned_allgather_algorithm: 4 + OMPI_MCA_coll_tuned_allgatherv_algorithm: 3 + OMPI_MCA_coll_tuned_gather_algorithm: 1 + OMPI_MCA_coll_tuned_barrier_algorithm: 0 + OMPI_MCA_coll_tuned_use_dynamic_rules: 1 + OMPI_MCA_sharedfp: '^lockedfile,individual' + extra_rpaths: [] diff --git a/configs/sites/tier1/discover-scu16/config.yaml b/configs/sites/tier1/nas/config.yaml similarity index 100% rename from configs/sites/tier1/discover-scu16/config.yaml rename to configs/sites/tier1/nas/config.yaml diff --git a/configs/sites/tier1/discover-scu16/mirrors.yaml b/configs/sites/tier1/nas/mirrors.yaml similarity index 68% rename from configs/sites/tier1/discover-scu16/mirrors.yaml rename to configs/sites/tier1/nas/mirrors.yaml index 596a615bf..2be6fcc16 100644 --- a/configs/sites/tier1/discover-scu16/mirrors.yaml +++ b/configs/sites/tier1/nas/mirrors.yaml @@ -1,7 +1,7 @@ mirrors: local-source: fetch: - url: file:///discover/swdev/jcsda/spack-stack/source-cache + url: file:///nobackup/gmao_SIteam/spack-stack/source-cache access_pair: - null - null @@ -9,7 +9,7 @@ mirrors: profile: null endpoint_url: null push: - url: file:///discover/swdev/jcsda/spack-stack/source-cache + url: file:///nobackup/gmao_SIteam/spack-stack/source-cache access_pair: - null - null diff --git a/configs/sites/tier1/nas/modules.yaml b/configs/sites/tier1/nas/modules.yaml new file mode 100644 index 000000000..aeb254c2e --- /dev/null +++ b/configs/sites/tier1/nas/modules.yaml @@ -0,0 +1,8 @@ +modules: + default: + enable:: + - tcl + tcl: + include: + # List of packages for which we need modules that are blacklisted by default + - python diff --git a/configs/sites/tier1/nas/packages.yaml b/configs/sites/tier1/nas/packages.yaml new file mode 100644 index 000000000..7aed2e62e --- /dev/null +++ b/configs/sites/tier1/nas/packages.yaml @@ -0,0 +1,102 @@ +packages: + all: + target: [x86_64_v3] +### Modification of common packages + # Problems building shared hdf-eos2 with Intel, not needed + hdf-eos2: + variants: ~shared + met: + variants: +python +grib2 +graphics +lidar2nc +modis +### All other external packages listed alphabetically + automake: + externals: + - spec: automake@1.16.1 + prefix: /usr + binutils: + externals: + - spec: binutils@2.30.125~gold~headers + prefix: /usr + bison: + externals: + - spec: bison@3.0.4 + prefix: /usr + coreutils: + externals: + - spec: coreutils@8.30 + prefix: /usr + diffutils: + externals: + - spec: diffutils@3.6 + prefix: /usr + findutils: + externals: + - spec: findutils@4.6.0 + prefix: /usr + flex: + externals: + - spec: flex@2.6.1+lex + prefix: /usr + gawk: + externals: + - spec: gawk@4.2.1 + prefix: /usr + gh: + externals: + - spec: gh@2.78.0 + prefix: /nobackup/gmao_SIteam/gh/2.78.0 + git: + externals: + - spec: git@2.43.5~tcltk + prefix: /usr + git-lfs: + externals: + - spec: git-lfs@3.7.0 + prefix: /nobackup/gmao_SIteam/git-lfs/3.7.0 + gmake: + externals: + - spec: gmake@4.2.1 + prefix: /usr + grep: + externals: + - spec: grep@3.1 + prefix: /usr + groff: + externals: + - spec: groff@1.22.3 + prefix: /usr + libtool: + externals: + - spec: libtool@2.4.6 + prefix: /usr + m4: + externals: + - spec: m4@1.4.18 + prefix: /usr + perl: + externals: + - spec: perl@5.26.3~cpanm+opcode+open+shared+threads + prefix: /usr + pkgconf: + externals: + - spec: pkgconf@1.4.2 + prefix: /usr + sed: + externals: + - spec: sed@4.5 + prefix: /usr + subversion: + externals: + - spec: subversion@1.14.1 + prefix: /usr + tar: + externals: + - spec: tar@1.30 + prefix: /usr + wget: + externals: + - spec: wget@1.19.5 + prefix: /usr + zlib: + externals: + - spec: zlib@1.2.11 + prefix: /usr diff --git a/configs/sites/tier1/nas/packages_gcc.yaml b/configs/sites/tier1/nas/packages_gcc.yaml new file mode 100644 index 000000000..a84dd36bc --- /dev/null +++ b/configs/sites/tier1/nas/packages_gcc.yaml @@ -0,0 +1,39 @@ +packages: + all: + compiler:: [gcc@12.3.0] + providers: + mpi:: [openmpi@4.1.8] + mpi: + buildable: False + openmpi: + externals: + - spec: openmpi@4.1.8%gcc@=12.3.0~cuda~cxx~cxx_exceptions~java~memchecker+pmi~static~wrapper-rpath+lustre + fabrics=ucx schedulers=tm + prefix: /nobackup/gmao_SIteam/MPI/openmpi/4.1.8/gcc-12.3.0 + environment: + set: + OPAL_PREFIX: /nobackup/gmao_SIteam/MPI/openmpi/4.1.8/gcc-12.3.0 + UCX_MAX_EAGER_LANES: 1 + UCX_MAX_RNDV_LANES: 1 + OMPI_MCA_pml: ucx + OMPI_MCA_btl: ^openib + OMPI_MCA_oob_tcp_listen_mode: listen_thread + OMPI_MCA_oob_tcp_if_include: ib0,ib1 + OMPI_MCA_btl_tcp_if_include: ib0,ib1 + OMPI_MCA_opal_warn_on_missing_libcuda: 0 + UCX_IB_SUBNET_PREFIX: fec0:0000:0000:0008 + OMPI_MCA_shmem_mmap_enable_nfs_warning: 0 + OPENMPI: /nobackup/gmao_SIteam/MPI/openmpi/4.1.8/gcc-12.3.0 + prepend_path: + PATH: /nobackup/gmao_SIteam/MPI/openmpi/4.1.8/gcc-12.3.0/bin + LIBRARY_PATH: /nobackup/gmao_SIteam/MPI/openmpi/4.1.8/gcc-12.3.0/lib + LD_LIBRARY_PATH: /nobackup/gmao_SIteam/MPI/openmpi/4.1.8/gcc-12.3.0/lib + CPATH: /nobackup/gmao_SIteam/MPI/openmpi/4.1.8/gcc-12.3.0/include + FPATH: /nobackup/gmao_SIteam/MPI/openmpi/4.1.8/gcc-12.3.0/include + MANPATH: /nobackup/gmao_SIteam/MPI/openmpi/4.1.8/gcc-12.3.0/share/man + # MAT: I cannot figure out how to get hdf-eos2 to build with GCC on NAS + # When I try, it dies with an error trying to *patch* the code! + # This turns off the variants of met that need it + met: + variants:: + - '+python +grib2 +graphics' diff --git a/configs/sites/tier1/nas/packages_oneapi.yaml b/configs/sites/tier1/nas/packages_oneapi.yaml new file mode 100644 index 000000000..5ec68c87f --- /dev/null +++ b/configs/sites/tier1/nas/packages_oneapi.yaml @@ -0,0 +1,15 @@ +packages: + all: + compiler:: [oneapi@2024.2.0,gcc@12.3.0] + providers: + mpi:: [mpt@2.30] + mpi: + buildable: False + mpt: + externals: + - spec: mpt@2.30%oneapi@=2024.2.0 + prefix: /nasa/hpe/mpt/2.30_rhel810 + intel-oneapi-mkl: + externals: + - spec: intel-oneapi-mkl@2024.2.0%oneapi@2024.2.0 + prefix: /nobackup/gmao_SIteam/intel/oneapi diff --git a/configs/sites/tier1/noaa-aws/README.md b/configs/sites/tier1/noaa-aws/README.md index 1910fb757..bfa6938a4 100644 --- a/configs/sites/tier1/noaa-aws/README.md +++ b/configs/sites/tier1/noaa-aws/README.md @@ -1,6 +1,6 @@ # Provisiong ParallelWorks AWS clusters -## Steps to perform before installing spack-stack version 1.8.0 +## Steps to perform before installing spack-stack version 1.9.3 sudo su - chmod 777 /contrib @@ -14,24 +14,16 @@ sudo su - chmod 777 /contrib module purge -module unuse /opt/cray/craype/default/modulefiles -module unuse /opt/cray/modulefiles -### For noaa-aws, run the line below as well: -module unuse /opt/intel/impi/2019.5.281/intel64/modulefiles -module load gnu -module load intel/2023.2.0 -module load impi/2023.2.0 -module unload gnu cd /contrib/spack-stack-rocky8/ -git clone --recursive https://github.com/JCSDA/spack-stack -b release/1.8.0 spack-stack-1.8.0 -cd spack-stack-1.8.0 +git clone --recursive https://github.com/JCSDA/spack-stack -b release/1.9.0 spack-stack-1.9.3 +cd spack-stack-1.9.3 . setup.sh -spack stack create env --name ue-intel-2021.10.0 --template unified-dev --site noaa-aws --compiler intel -cd envs/ue-intel-2021.10.0 +spack stack create env --name ue-oneapi-2024.2.1 --template unified-dev --site noaa-aws --compiler oneapi +cd envs/ue-oneapi-2024.2.1 spack env activate . spack concretize 2>&1 | tee log.concretize -spack install --verbose 2>&1 | tee log.install +spack install --verbose --fail-fast --show-log-on-error --no-check-signature 2>&1 | tee log.install spack module lmod refresh -y spack stack setup-meta-modules @@ -40,12 +32,12 @@ spack stack setup-meta-modules sudo su - chmod 777 /contrib -cd /contrib/spack-stack-rocky8/spack-stack-1.8.0 +cd /contrib/spack-stack-rocky8/spack-stack-1.9.3 . setup.sh -spack stack create env --name gsi-intel-2021.10.0 --template gsi-addon-dev --site noaa-aws --upstream /contrib/spack-stack-rocky8/spack-stack-1.8.0/envs/ue-intel-2021.10.0/install --compiler intel -cd envs/gsi-intel-2021.10.0 +spack stack create env --name gsi-oneapi-2024.2.1 --template gsi-addon-dev --site noaa-aws --upstream /contrib/spack-stack-rocky8/spack-stack-1.9.3/envs/ue-oneapi-2024.2.1/install --compiler oneapi +cd envs/gsi-oneapi-2024.2.1 spack env activate . spack concretize 2>&1 | tee log.concretize -spack install --verbose 2>&1 | tee log.install +spack install --verbose --fail-fast --show-log-on-error --no-check-signature 2>&1 | tee log.install spack module lmod refresh --upstream-modules spack stack setup-meta-modules diff --git a/configs/sites/tier1/noaa-aws/compilers.yaml b/configs/sites/tier1/noaa-aws/compilers.yaml index 4bb5ba4ef..b43e86403 100644 --- a/configs/sites/tier1/noaa-aws/compilers.yaml +++ b/configs/sites/tier1/noaa-aws/compilers.yaml @@ -8,6 +8,7 @@ compilers: fc: /apps/oneapi/compiler/2022.0.2/linux/bin/intel64/ifort flags: {} operating_system: rocky8 + target: x86_64 modules: - intel/2022.1.2 environment: @@ -25,6 +26,7 @@ compilers: fc: /apps/gnu/gcc-13.2.0/bin/gfortran flags: {} operating_system: rocky8 + target: x86_64 modules: - gnu/13.2.0 environment: {} @@ -38,6 +40,7 @@ compilers: fc: /apps/oneapi/compiler/2024.2/bin/ifort flags: {} operating_system: rocky8 + target: x86_64 modules: - intel/2024.2.1 environment: diff --git a/configs/sites/tier1/noaa-aws/packages.yaml b/configs/sites/tier1/noaa-aws/packages.yaml index 622bab8e7..efc91305b 100644 --- a/configs/sites/tier1/noaa-aws/packages.yaml +++ b/configs/sites/tier1/noaa-aws/packages.yaml @@ -1,4 +1,14 @@ packages: + all: + providers: + zlib-api:: [zlib] + zlib-api: + buildable: False + zlib: + buildable: False + externals: + - spec: zlib@1.2.11 + prefix: /usr bash: externals: - spec: bash@4.4.20 diff --git a/configs/sites/tier1/noaa-aws/packages_oneapi.yaml b/configs/sites/tier1/noaa-aws/packages_oneapi.yaml index f70c19f2d..b103ce146 100644 --- a/configs/sites/tier1/noaa-aws/packages_oneapi.yaml +++ b/configs/sites/tier1/noaa-aws/packages_oneapi.yaml @@ -35,9 +35,6 @@ packages: - '@1.26' - '^openblas' # *DH - zlib-ng: - require: - - '~shared' cdo: require: - '@2.3.0' diff --git a/configs/sites/tier1/noaa-azure/README.md b/configs/sites/tier1/noaa-azure/README.md index eff315412..3275b3ef2 100644 --- a/configs/sites/tier1/noaa-azure/README.md +++ b/configs/sites/tier1/noaa-azure/README.md @@ -1,6 +1,6 @@ # Provisiong ParallelWorks Azure clusters -## Steps to perform before installing spack-stack version 1.8.0 +## Steps to perform before installing spack-stack version 1.9.3 sudo su - chmod 777 /contrib @@ -14,22 +14,16 @@ sudo su - chmod 777 /contrib module purge -module unuse /opt/cray/craype/default/modulefiles -module unuse /opt/cray/modulefiles -module load gnu -module load intel/2023.2.0 -module load impi/2023.2.0 -module unload gnu cd /contrib/spack-stack-rocky8/ -git clone --recursive https://github.com/JCSDA/spack-stack -b release/1.8.0 spack-stack-1.8.0 -cd spack-stack-1.8.0 +git clone --recursive https://github.com/JCSDA/spack-stack -b release/1.9.0 spack-stack-1.9.3 +cd spack-stack-1.9.3 . setup.sh -spack stack create env --name ue-intel-2021.10.0 --template unified-dev --site noaa-azure --compiler intel -cd envs/ue-intel-2021.10.0 +spack stack create env --name ue-oneapi-2024.2.1 --template unified-dev --site noaa-azure --compiler oneapi +cd envs/ue-oneapi-2024.2.1 spack env activate . spack concretize 2>&1 | tee log.concretize -spack install --verbose 2>&1 | tee log.install +spack install --verbose --fail-fast --show-log-on-error --no-check-signature 2>&1 | tee log.install spack module lmod refresh -y spack stack setup-meta-modules @@ -38,12 +32,12 @@ spack stack setup-meta-modules sudo su - chmod 777 /contrib -cd /contrib/spack-stack-rocky8/spack-stack-1.8.0 +cd /contrib/spack-stack-rocky8/spack-stack-1.9.3 . setup.sh -spack stack create env --name gsi-intel-2021.10.0 --template gsi-addon-dev --site noaa-azure --upstream /contrib/spack-stack-rocky8/spack-stack-1.8.0/envs/ue-intel-2021.10.0/install --compiler intel -cd envs/gsi-intel-2021.10.0 +spack stack create env --name gsi-oneapi-2024.2.1 --template gsi-addon-dev --site noaa-azure --upstream /contrib/spack-stack-rocky8/spack-stack-1.9.3/envs/ue-oneapi-2024.2.1/install --compiler oneapi +cd envs/gsi-oneapi-2024.2.1 spack env activate . spack concretize 2>&1 | tee log.concretize -spack install --verbose 2>&1 | tee log.install +spack install --verbose --fail-fast --show-log-on-error --no-check-signature 2>&1 | tee log.install spack module lmod refresh --upstream-modules spack stack setup-meta-modules diff --git a/configs/sites/tier1/noaa-azure/compilers.yaml b/configs/sites/tier1/noaa-azure/compilers.yaml index 4bb5ba4ef..b43e86403 100644 --- a/configs/sites/tier1/noaa-azure/compilers.yaml +++ b/configs/sites/tier1/noaa-azure/compilers.yaml @@ -8,6 +8,7 @@ compilers: fc: /apps/oneapi/compiler/2022.0.2/linux/bin/intel64/ifort flags: {} operating_system: rocky8 + target: x86_64 modules: - intel/2022.1.2 environment: @@ -25,6 +26,7 @@ compilers: fc: /apps/gnu/gcc-13.2.0/bin/gfortran flags: {} operating_system: rocky8 + target: x86_64 modules: - gnu/13.2.0 environment: {} @@ -38,6 +40,7 @@ compilers: fc: /apps/oneapi/compiler/2024.2/bin/ifort flags: {} operating_system: rocky8 + target: x86_64 modules: - intel/2024.2.1 environment: diff --git a/configs/sites/tier1/noaa-azure/packages.yaml b/configs/sites/tier1/noaa-azure/packages.yaml index ad7016e92..2d3de9b46 100644 --- a/configs/sites/tier1/noaa-azure/packages.yaml +++ b/configs/sites/tier1/noaa-azure/packages.yaml @@ -1,4 +1,14 @@ packages: + all: + providers: + zlib-api:: [zlib] + zlib-api: + buildable: False + zlib: + buildable: False + externals: + - spec: zlib@1.2.11 + prefix: /usr bash: externals: - spec: bash@4.4.20 diff --git a/configs/sites/tier1/noaa-azure/packages_oneapi.yaml b/configs/sites/tier1/noaa-azure/packages_oneapi.yaml index f70c19f2d..b103ce146 100644 --- a/configs/sites/tier1/noaa-azure/packages_oneapi.yaml +++ b/configs/sites/tier1/noaa-azure/packages_oneapi.yaml @@ -35,9 +35,6 @@ packages: - '@1.26' - '^openblas' # *DH - zlib-ng: - require: - - '~shared' cdo: require: - '@2.3.0' diff --git a/configs/sites/tier1/noaa-gcloud/README.md b/configs/sites/tier1/noaa-gcloud/README.md index f0fab7b91..dafdf0939 100644 --- a/configs/sites/tier1/noaa-gcloud/README.md +++ b/configs/sites/tier1/noaa-gcloud/README.md @@ -1,6 +1,6 @@ # Provisiong ParallelWorks GCP clusters -## Steps to perform before installing spack-stack version 1.8.0 +## Steps to perform before installing spack-stack version 1.9.3 sudo su - chmod 777 /contrib @@ -14,22 +14,16 @@ sudo su - chmod 777 /contrib module purge -module unuse /opt/cray/craype/default/modulefiles -module unuse /opt/cray/modulefiles -module load gnu -module load intel/2023.2.0 -module load impi/2023.2.0 -module unload gnu cd /contrib/spack-stack-rocky8/ -git clone --recursive https://github.com/JCSDA/spack-stack -b release/1.8.0 spack-stack-1.8.0 -cd spack-stack-1.8.0 +git clone --recursive https://github.com/JCSDA/spack-stack -b release/1.9.0 spack-stack-1.9.3 +cd spack-stack-1.9.3 . setup.sh -spack stack create env --name ue-intel-2021.10.0 --template unified-dev --site noaa-gcloud --compiler intel -cd envs/ue-intel-2021.10.0 +spack stack create env --name ue-oneapi-2024.2.1 --template unified-dev --site noaa-gcloud --compiler oneapi +cd envs/ue-oneapi-2024.2.1 spack env activate . spack concretize 2>&1 | tee log.concretize -spack install --verbose 2>&1 | tee log.install +spack install --verbose --fail-fast --show-log-on-error --no-check-signature 2>&1 | tee log.install spack module lmod refresh -y spack stack setup-meta-modules @@ -38,11 +32,12 @@ spack stack setup-meta-modules sudo su - chmod 777 /contrib -cd /contrib/spack-stack-rocky8/spack-stack-1.8.0 +cd /contrib/spack-stack-rocky8/spack-stack-1.9.3 . setup.sh -spack stack create env --name gsi-intel-2021.10.0 --template gsi-addon-dev --site noaa-gcloud --upstream /contrib/spack-stack-rocky8/spack-stack-1.8.0/envs/ue-intel-2021.10.0/install --compiler intel -cd envs/gsi-intel-2021.10.0 +spack stack create env --name gsi-oneapi-2024.2.1 --template gsi-addon-dev --site noaa-gcloud --upstream /contrib/spack-stack-rocky8/spack-stack-1.9.3/envs/ue-oneapi-2024.2.1/install --compiler oneapi +cd envs/gsi-oneapi-2024.2.1 +spack env activate . spack concretize 2>&1 | tee log.concretize -spack install --verbose 2>&1 | tee log.install +spack install --verbose --fail-fast --show-log-on-error --no-check-signature 2>&1 | tee log.install spack module lmod refresh --upstream-modules spack stack setup-meta-modules diff --git a/configs/sites/tier1/noaa-gcloud/compilers.yaml b/configs/sites/tier1/noaa-gcloud/compilers.yaml index 4bb5ba4ef..b43e86403 100644 --- a/configs/sites/tier1/noaa-gcloud/compilers.yaml +++ b/configs/sites/tier1/noaa-gcloud/compilers.yaml @@ -8,6 +8,7 @@ compilers: fc: /apps/oneapi/compiler/2022.0.2/linux/bin/intel64/ifort flags: {} operating_system: rocky8 + target: x86_64 modules: - intel/2022.1.2 environment: @@ -25,6 +26,7 @@ compilers: fc: /apps/gnu/gcc-13.2.0/bin/gfortran flags: {} operating_system: rocky8 + target: x86_64 modules: - gnu/13.2.0 environment: {} @@ -38,6 +40,7 @@ compilers: fc: /apps/oneapi/compiler/2024.2/bin/ifort flags: {} operating_system: rocky8 + target: x86_64 modules: - intel/2024.2.1 environment: diff --git a/configs/sites/tier1/noaa-gcloud/packages.yaml b/configs/sites/tier1/noaa-gcloud/packages.yaml index ad7016e92..2d3de9b46 100644 --- a/configs/sites/tier1/noaa-gcloud/packages.yaml +++ b/configs/sites/tier1/noaa-gcloud/packages.yaml @@ -1,4 +1,14 @@ packages: + all: + providers: + zlib-api:: [zlib] + zlib-api: + buildable: False + zlib: + buildable: False + externals: + - spec: zlib@1.2.11 + prefix: /usr bash: externals: - spec: bash@4.4.20 diff --git a/configs/sites/tier1/noaa-gcloud/packages_oneapi.yaml b/configs/sites/tier1/noaa-gcloud/packages_oneapi.yaml index f70c19f2d..b103ce146 100644 --- a/configs/sites/tier1/noaa-gcloud/packages_oneapi.yaml +++ b/configs/sites/tier1/noaa-gcloud/packages_oneapi.yaml @@ -35,9 +35,6 @@ packages: - '@1.26' - '^openblas' # *DH - zlib-ng: - require: - - '~shared' cdo: require: - '@2.3.0' diff --git a/configs/sites/tier1/orion/packages.yaml b/configs/sites/tier1/orion/packages.yaml index c14c9a705..8d438bab3 100644 --- a/configs/sites/tier1/orion/packages.yaml +++ b/configs/sites/tier1/orion/packages.yaml @@ -9,9 +9,10 @@ packages: zlib: buildable: False externals: - - spec: zlib@1.2.11 - prefix: /usr - + - spec: zlib@1.2.13 + prefix: /apps/spack-managed/gcc-11.3.1/zlib-1.2.13-ltp4c3zzde3zi3gf7x4b7c7nj5ww4i4g + modules: + - zlib/1.2.13 autoconf: externals: - spec: autoconf@2.69 @@ -90,11 +91,10 @@ packages: externals: - spec: openssh@8.7p1 prefix: /usr - # Don't use, issues with py-cryptography - #openssl: - # externals: - # - spec: openssl@3.0.1 - # prefix: /usr + openssl: + externals: + - spec: openssl@3.0.1 + prefix: /usr perl: externals: - spec: perl@5.32.1~cpanm+opcode+open+shared+threads @@ -111,10 +111,10 @@ packages: externals: - spec: subversion@1.14.1 prefix: /usr - tar: - externals: - - spec: tar@1.34 - prefix: /usr + #tar: + # externals: + # - spec: tar@1.34 + # prefix: /usr wget: externals: - spec: wget@1.21.1 diff --git a/configs/sites/tier1/ursa/compilers.yaml b/configs/sites/tier1/ursa/compilers.yaml index 9ede62d18..2dcc19022 100644 --- a/configs/sites/tier1/ursa/compilers.yaml +++ b/configs/sites/tier1/ursa/compilers.yaml @@ -8,6 +8,7 @@ compilers: fc: /apps/spack-2024-12/linux-rocky9-x86_64/gcc-11.4.1/intel-oneapi-compilers-2024.2.1-oqhstbmawnrsdw472p4pjsopj547o6xs/compiler/2024.2/bin/ifort flags: {} operating_system: rocky9 + target: x86_64 modules: - intel-oneapi-compilers/2024.2.1 environment: @@ -26,6 +27,22 @@ compilers: fc: /usr/bin/gfortran flags: {} operating_system: rocky9 + target: x86_64 modules: [] environment: {} extra_rpaths: [] + +- compiler: + spec: gcc@12.4.0 + paths: + cc: /apps/spack-2024-12/linux-rocky9-x86_64/gcc-11.4.1/gcc-12.4.0-dsgnou52lpn2tus6mohdmcw5mjqmqrhj/bin/gcc + cxx: /apps/spack-2024-12/linux-rocky9-x86_64/gcc-11.4.1/gcc-12.4.0-dsgnou52lpn2tus6mohdmcw5mjqmqrhj/bin/g++ + f77: /apps/spack-2024-12/linux-rocky9-x86_64/gcc-11.4.1/gcc-12.4.0-dsgnou52lpn2tus6mohdmcw5mjqmqrhj/bin/gfortran + fc: /apps/spack-2024-12/linux-rocky9-x86_64/gcc-11.4.1/gcc-12.4.0-dsgnou52lpn2tus6mohdmcw5mjqmqrhj/bin/gfortran + flags: {} + operating_system: rocky9 + target: x86_64 + modules: + - gcc/12.4.0 + environment: {} + extra_rpaths: [] diff --git a/configs/sites/tier1/ursa/packages_gcc.yaml b/configs/sites/tier1/ursa/packages_gcc.yaml index d6c5aa362..5774c127d 100644 --- a/configs/sites/tier1/ursa/packages_gcc.yaml +++ b/configs/sites/tier1/ursa/packages_gcc.yaml @@ -1,6 +1,6 @@ packages: all: - compiler:: [gcc@11.4.1] + compiler:: [gcc@12.4.0] providers: mpi:: [openmpi@4.1.6] mpi: @@ -8,17 +8,10 @@ packages: openmpi: externals: - spec: openmpi@4.1.6~atomics~cuda~cxx~cxx_exceptions~gpfs~internal-hwloc~internal-libevent~internal-pmix~java+legacylaunchers~lustre~memchecker~openshmem~orterunprefix+pmi+romio+rsh~singularity+static+vt+wrapper-rpath fabrics=ucx schedulers=slurm - prefix: /apps/spack-2024-12/linux-rocky9-x86_64/gcc-11.4.1/openmpi-4.1.6-auzmzlihoo7n6g254nqkguxtzrdzkyqv + prefix: /apps/spack-2024-12/linux-rocky9-x86_64/gcc-11.4.1/openmpi-4.1.6-2dkf6t23iyw4xodxruh72yvmrhhvyoms modules: - openmpi/4.1.6 - - ectrans: - require:: - - '~mkl +fftw' - gsibec: - require:: - - '~mkl' - py-numpy: - require:: - - '@1.26' - - '^openblas' + gcc-runtime: + externals: + - spec: gcc-runtime@12.4.0%gcc@12.4.0 + prefix: /usr diff --git a/configs/sites/tier1/ursa/packages_oneapi.yaml b/configs/sites/tier1/ursa/packages_oneapi.yaml index cf3502aa2..f44e67167 100644 --- a/configs/sites/tier1/ursa/packages_oneapi.yaml +++ b/configs/sites/tier1/ursa/packages_oneapi.yaml @@ -1,6 +1,6 @@ packages: all: - compiler:: [oneapi@2024.2.1] + compiler:: [oneapi@2024.2.1,gcc@11.4.1] providers: mpi:: [intel-oneapi-mpi@2021.13] # Change as appropriate to switch to intel-oneapi-mkl @@ -16,22 +16,20 @@ packages: modules: - intel-oneapi-mpi/2021.13.1 prefix: /apps/spack-2024-12/linux-rocky9-x86_64/oneapi-2024.2.1/intel-oneapi-mpi-2021.13.1-ss72gbndvat3oz22sa6lhmlbjkeabrn4 - + intel-oneapi-mkl: + externals: + - spec: intel-oneapi-mkl@2024.2.1%oneapi@2024.2.1 + modules: + - intel-oneapi-mkl/2024.2.1 + prefix: /apps/spack-2024-12/linux-rocky9-x86_64/gcc-11.4.1/intel-oneapi-mkl-2024.2.1-srqwrbzwo2k7hxuuhlrxttburs5jvlat intel-oneapi-runtime: externals: - spec: intel-oneapi-runtime@2024.2.1%oneapi@2024.2.1 prefix: /apps/spack-2024-12/linux-rocky9-x86_64/gcc-11.4.1/intel-oneapi-compilers-2024.2.1-oqhstbmawnrsdw472p4pjsopj547o6xs/compiler/2024.2 modules: - compiler-rt/2024.2.1 + gcc-runtime: + externals: + - spec: gcc-runtime@11.4.1%gcc@11.4.1 + prefix: /usr - # If using intel-oneapi-mkl, make appropriate changes below - ectrans: - require:: - - '~mkl +fftw' - gsibec: - require:: - - '~mkl' - py-numpy: - require:: - - '@1.26' - - '^openblas' diff --git a/configs/sites/tier1/wcoss2/compilers.yaml b/configs/sites/tier1/wcoss2/compilers.yaml index 8721b0e9d..772000f92 100644 --- a/configs/sites/tier1/wcoss2/compilers.yaml +++ b/configs/sites/tier1/wcoss2/compilers.yaml @@ -43,3 +43,49 @@ compilers: CONFIG_SITE: '' unset: [PYTHONPATH] extra_rpaths: [] +- compiler: + spec: oneapi@2024.2.1 + paths: + cc: cc + cxx: CC + f77: ftn + fc: ftn + flags: + cflags: '--gcc-toolchain=/opt/cray/pe/gcc/12.1.0/snos/' + fflags: '-gcc-name=/opt/cray/pe/gcc/12.1.0/snos/bin/gcc -gxx-name=/opt/cray/pe/gcc/12.1.0/snos/bin/g++' + cxxflags: '--gcc-toolchain=/opt/cray/pe/gcc/12.1.0/snos/' + operating_system: sles15 + modules: + - PrgEnv-intel/8.3.3 + - craype/2.7.17 + - intel-oneapi/2024.2 + - libfabric + environment: + prepend_path: + PATH: /opt/cray/pe/gcc/12.1.0/snos/bin + LD_LIBRARY_PATH: /opt/cray/pe/gcc/12.1.0/snos/lib64 + LIBRARY_PATH: /opt/cray/pe/gcc/12.1.0/snos/lib64 + CPATH: /opt/cray/pe/gcc/12.1.0/snos/include + set: + # OpenSUSE on WCOSS2 machines sets CONFIG_SITE so + # Automake-based builds are installed in lib64 + # which confuses some packages. + CONFIG_SITE: '' + extra_rpaths: [] +- compiler: + spec: gcc@12.1.0 + paths: + cc: /opt/cray/pe/gcc/12.1.0/snos/bin/gcc + cxx: /opt/cray/pe/gcc/12.1.0/snos/bin/g++ + f77: /opt/cray/pe/gcc/12.1.0/snos/bin/gfortran + fc: /opt/cray/pe/gcc/12.1.0/snos/bin/gfortran + flags: {} + operating_system: sles15 + modules: [] + environment: + set: + # OpenSUSE on WCOSS2 machines sets CONFIG_SITE so + # Automake-based builds are installed in lib64 + # which confuses some packages. + CONFIG_SITE: '' + extra_rpaths: [] diff --git a/configs/sites/tier1/wcoss2/packages.yaml b/configs/sites/tier1/wcoss2/packages.yaml index 8cedff6af..c19223565 100644 --- a/configs/sites/tier1/wcoss2/packages.yaml +++ b/configs/sites/tier1/wcoss2/packages.yaml @@ -1,14 +1,6 @@ packages: # - ### Set compiler. - # - all: - prefer: ['%intel@19.1.3.304'] - compiler:: [intel@19.1.3.304] - providers: - mpi: [cray-mpich] - # - ### Strictly set virtual package providers. + ### Strictly set virtual package providers (+disable mkl). # mpi: buildable: False @@ -21,16 +13,8 @@ require: openblas jpeg: require: libjpeg-turbo - # - ### External packages. - # - cray-mpich: - externals: - - spec: cray-mpich@8.1.9~wrappers - modules: - - libfabric - - craype-network-ofi - - cray-mpich/8.1.9 + intel-oneapi-mkl: + buildable: false # ### Individual package settings. # Use `require::` to override require's from {common,site}/packages.yaml, @@ -44,7 +28,6 @@ cdo: require: - 'grib2=none' # avoids eccodes/grib-api dependency - - '%intel' - any_of: ["@2.2.2"] when: "%intel@2022.0.2.262" message: "2.3.0 is the last version to use C++17" @@ -72,13 +55,13 @@ - snapshot=none # make sure spack-stack doesn't accidentally give us a beta snapshot - '~python' flex: - require: '@2.6.4' - gcc-runtime: - require: '%gcc' + require: ['@2.6.4'] gdal: variants: ~curl gettext: - version: ['0.19.7'] + require: + - any_of: ['@0.19.7'] + when: '%intel@19.1.3.304' git-lfs: require: '%gcc' glib: @@ -88,27 +71,29 @@ gsibec: require:: - '@1.2.1 ~mkl' - harfbuzz: - require: '%gcc' + icu4c: + require: ['%gcc'] libffi: - require: '@3.3' + require: + - any_of: ['@3.3'] + when: '%intel' libunistring: - require: '@:1.0' + require: + - any_of: ['@:1.0'] + when: '%intel' mapl: require: - ~pflogger ~fargparse ~extdata2g # minimize dependencies netcdf-c: 'require:': +mpi ~parallel-netcdf ~dap ~blosc ~szip build_system=autotools # disabling dap prevents network access; disabling blosc and szip reduces dependencies patchelf: - version: ['0.13.1'] + require: + - any_of: ['@0.13.1'] + when: '%intel' py-cython:: - require: '@0.29.36' - py-numpy: - require:: - - '^[virtuals=lapack,blas] openblas' - - '@:1.25' - - any_of: ['@:1.24'] - when: '%intel@:19' + require: + - any_of: ['@0.29.36'] + when: '%intel' py-pandas: 'require:': ~excel # minimize dependencies py-scipy: @@ -116,9 +101,17 @@ - any_of: ["@1.10.1"] when: '%intel@:19' py-setuptools: - require: '@63.4.3' # avoid duplicate build deps + require: ['@63.4.3'] # avoid duplicate build deps rhash: - version: ['1.3.5'] + require: + - any_of: ['@1.3.5'] + when: '%intel' subversion: require: - ~serf +pic # avoid serf dependency + zlib-ng: + require: ['+compat ~new_strategies'] + crtm: + require: ['@2.4.0.1 +fix'] + scotch: + require:: ['@7.0.7 +mpi+metis~shared~threads~mpi_thread+noarch+esmumps build_system=cmake'] diff --git a/configs/sites/tier1/wcoss2/packages_intel.yaml b/configs/sites/tier1/wcoss2/packages_intel.yaml new file mode 100644 index 000000000..660802761 --- /dev/null +++ b/configs/sites/tier1/wcoss2/packages_intel.yaml @@ -0,0 +1,40 @@ +packages: + # + ### Set compilers & MPI provider for metamodule generation. + # + all: + compiler:: [intel@19.1.3.304] + providers: + mpi:: [cray-mpich] + # + ### External packages. + # + cray-mpich: + externals: + - spec: cray-mpich@8.1.9~wrappers + modules: + - libfabric + - craype-network-ofi + - cray-mpich/8.1.9 + # + ### Set GCC version. + # + gcc-runtime: + require: ['%gcc@10.2.0'] + # + ### Package settings. + # + harfbuzz: + require: ['%gcc'] + ecflow: + require:: + - '@5.11.4' + - '+ui' + - 'cflags="-no-ipo" cxxflags="-no-ipo"' + - '^boost %gcc' + - '%intel' + py-numpy:: + require:: + - '^[virtuals=lapack,blas] openblas' + - '@1.26' + - '%gcc' diff --git a/configs/sites/tier1/wcoss2/packages_oneapi.yaml b/configs/sites/tier1/wcoss2/packages_oneapi.yaml new file mode 100644 index 000000000..56437b7b7 --- /dev/null +++ b/configs/sites/tier1/wcoss2/packages_oneapi.yaml @@ -0,0 +1,52 @@ +packages: + # + ### Set compilers & MPI provider for metamodule generation. + # + all: + compiler:: [oneapi@2024.2.1] + providers: + mpi:: [cray-mpich] + gcc-runtime: + require: '%gcc@12.1.0' + cray-mpich: + externals: + - spec: cray-mpich@8.1.29~wrappers + modules: + - libfabric + - craype-network-ofi + - cray-mpich/8.1.29 + - cray-pals + bison: + require: ['%gcc'] + cairo: + require: ['+fc'] + ectrans: + require:: + - '@1.2.0 ~mkl +fftw' + elfutils: + require: ['@0.191'] + gsibec: + require:: + - '@1.2.1 ~mkl' + subversion: + require: ['%gcc'] + cmake: + require: ['%gcc'] + proj: + require: ['@9.4.1'] + libtiff: + require: ['build_system=cmake'] + ninja: + require: ['~re2c %gcc'] + pixman: + require: ['build_system=meson'] + apr: + require: ['@:1.6', '%gcc'] + glib: + require: ['%gcc'] + zlib-ng: + require: ['cflags="-static-intel"', 'cxxflags="-static-intel"'] + py-numpy:: + require:: + - '^[virtuals=lapack,blas] openblas' + - '@1.26' diff --git a/configs/templates/nco/spack.yaml b/configs/templates/nco/spack.yaml index e14f7c125..c72a3aa67 100644 --- a/configs/templates/nco/spack.yaml +++ b/configs/templates/nco/spack.yaml @@ -14,18 +14,18 @@ spack: specs: - awscli - bacio - - boost %intel + - boost - bufr - cdo - cfitsio - cmake - - crtm + - crtm@=2.4.0.1 - curl - - ecflow ^boost%gcc + - ecflow - eckit - ecmwf-atlas - eigen - - esmf + - esmf@8.8.0 - fckit - fms - g2 @@ -53,7 +53,7 @@ spack: - libxml2 - libxrender - madis - - mapl + - mapl@2.53.4 ^esmf@8.8.0 - mbedtls - met - metis diff --git a/configs/templates/skylab-dev/spack.yaml b/configs/templates/skylab-dev/spack.yaml index f29430cb5..11c056e6b 100644 --- a/configs/templates/skylab-dev/spack.yaml +++ b/configs/templates/skylab-dev/spack.yaml @@ -28,7 +28,7 @@ spack: # Mapl with various esmf tags - mapl@2.53.0 ^esmf@8.6.1 - - mapl@2.53.0 ^esmf@8.8.0 + - mapl@2.53.4 ^esmf@8.8.0 # Various esmf tags (list all to avoid duplicate packages) - esmf@=8.6.1 snapshot=none diff --git a/configs/templates/unified-dev/spack.yaml b/configs/templates/unified-dev/spack.yaml index a56a37dbc..25dd2210d 100644 --- a/configs/templates/unified-dev/spack.yaml +++ b/configs/templates/unified-dev/spack.yaml @@ -11,7 +11,7 @@ spack: - ewok-env +ecflow ~cylc - ai-env - geos-gcm-env ^esmf@=8.6.1 - - global-workflow-env ^esmf@=8.6.1 ^crtm@=3.1.1-build1 + - global-workflow-env ^esmf@=8.6.1 ^crtm@=3.1.1-build1 ^crtm-fix@=3.1.1.3 - gmao-swell-env - gsi-env ^crtm@=3.1.1-build1 - jedi-fv3-env @@ -24,17 +24,18 @@ spack: - neptune-env ^esmf@=8.8.0 - neptune-python-env ^esmf@=8.8.0 - soca-env - - ufs-srw-app-env ^esmf@=8.8.0 ^crtm@=3.1.1-build1 - - ufs-weather-model-env ^esmf@=8.8.0 ^crtm@=3.1.1-build1 + - ufs-srw-app-env ^esmf@=8.8.0 ^crtm@=3.1.1-build1 ^crtm-fix@=3.1.1.3 + - ufs-weather-model-env ^esmf@=8.8.0 ^crtm@=3.1.1-build1 ^crtm-fix@=3.1.1.3 # Various crtm tags (list all to avoid duplicate packages) - crtm@2.4.0.1 - crtm@v2.4.1-jedi - - crtm@3.1.1-build1 + - crtm@3.1.1-build1 ^crtm-fix@=3.1.1.3 + - crtm-fix@3.1.1.3 # Mapl with various esmf tags - mapl@2.53.0 ^esmf@8.6.1 - - mapl@2.53.0 ^esmf@8.8.0 + - mapl@2.53.4 ^esmf@8.8.0 # Various esmf tags (list all to avoid duplicate packages) - esmf@=8.6.1 snapshot=none @@ -42,6 +43,7 @@ spack: # MADIS for WCOSS2 decoders. - madis@4.5 + - sp@2.5.0 specs: - matrix: diff --git a/doc/source/PreConfiguredSites.rst b/doc/source/PreConfiguredSites.rst index db6621535..d4b10603e 100644 --- a/doc/source/PreConfiguredSites.rst +++ b/doc/source/PreConfiguredSites.rst @@ -50,9 +50,9 @@ Pre-configured sites (tier 1) | MSU +-----------------------+--------------------+--------------------------------------------------------+-----------------+ | | Orion | Intel | ``/apps/contrib/spack-stack/`` | EPIC / JCSDA | +---------------------+-----------------------+--------------------+--------------------------------------------------------+-----------------+ -| | Discover SCU16 | GCC, Intel | ``/gpfsm/dswdev/jcsda/spack-stack/scu16/`` | JCSDA | -| NASA +-----------------------+--------------------+--------------------------------------------------------+-----------------+ | | Discover SCU17 | GCC, Intel | ``/gpfsm/dswdev/jcsda/spack-stack/scu17/`` | JCSDA | +| NASA +-----------------------+--------------------+--------------------------------------------------------+-----------------+ +| | NAS | GCC, Intel | ``/nobackup/gmao_SIteam/spack-stack/`` | GMAO | +---------------------+-----------------------+--------------------+--------------------------------------------------------+-----------------+ | NCAR-Wyoming + Derecho | GCC, Intel | ``/glade/work/epicufsrt/contrib/spack-stack/derecho/`` | EPIC / JCSDA | +---------------------+-----------------------+--------------------+--------------------------------------------------------+-----------------+ @@ -108,6 +108,7 @@ The following is required for building new spack environments with any supported # Edit /path/to/env/install/modulefiles/Core/stack-oneapi/.lua # Change: + # -- prerequisite modules # load("spack-managed-x86-64_v3") # load("intel-oneapi-compilers/2024.2.1") # prereq("spack-managed-x86-64_v3") @@ -116,10 +117,10 @@ to .. code-block:: console - # -- load("spack-managed-x86-64_v3") + # -- prerequisite modules # prepend_path("MODULEPATH", "/apps/spack-managed-x86_64_v3-v1.0/modulefiles/Core:/apps/other/modulefiles:/apps/containers/modulefiles:/apps/licensed/modulefiles") # load("intel-oneapi-compilers/2024.2.1") - # -- prereq("spack-managed-x86-64_v3" + # prereq("intel-oneapi-compilers/2024.2.1") and @@ -140,11 +141,7 @@ to .. code-block:: console # -- prerequisite modules - # -- load("spack-managed-x86-64_v3") - # load("intel-oneapi-compilers/2024.2.1") # load("intel-oneapi-mpi/2021.13.1") - # -- prereq("spack-managed-x86-64_v3") - # prereq("intel-oneapi-compilers/2024.2.1") # prereq("intel-oneapi-mpi/2021.13.1") .. _Preconfigured_Sites_Hercules: @@ -168,6 +165,7 @@ The following is required for building new spack environments with any supported # Edit /path/to/env/install/modulefiles/Core/stack-oneapi/.lua # Change: + # -- prerequisite modules # load("spack-managed-x86-64_v3") # load("intel-oneapi-compilers/2024.2.1") # prereq("spack-managed-x86-64_v3") @@ -176,10 +174,10 @@ to .. code-block:: console - # -- load("spack-managed-x86-64_v3") + # -- prerequisite modules # prepend_path("MODULEPATH", "/apps/spack-managed-x86_64_v3-v1.0/modulefiles/Core:/apps/other/modulefiles:/apps/containers/modulefiles:/apps/licensed/modulefiles") # load("intel-oneapi-compilers/2024.2.1") - # -- prereq("spack-managed-x86-64_v3" + # prereq("intel-oneapi-compilers/2024.2.1") and @@ -200,17 +198,13 @@ to .. code-block:: console # -- prerequisite modules - # -- load("spack-managed-x86-64_v3") - # load("intel-oneapi-compilers/2024.2.1") # load("intel-oneapi-mpi/2021.13.1") - # -- prereq("spack-managed-x86-64_v3") - # prereq("intel-oneapi-compilers/2024.2.1") # prereq("intel-oneapi-mpi/2021.13.1") -.. _Preconfigured_Sites_Discover_SCU16: +.. _Preconfigured_Sites_Discover_SCU17: ------------------------------ -NASA Discover SCU16 +NASA Discover SCU17 ------------------------------ The following is required for building new spack environments with any supported compiler on this platform. @@ -218,14 +212,13 @@ The following is required for building new spack environments with any supported .. code-block:: console module purge - module use /discover/swdev/gmao_SIteam/modulefiles-SLES12 - module use /discover/swdev/jcsda/spack-stack/scu16/modulefiles - module load miniconda/3.9.7 + module use /discover/swdev/gmao_SIteam/modulefiles-SLES15 + module use /discover/swdev/jcsda/spack-stack/scu17/modulefiles -.. _Preconfigured_Sites_Discover_SCU17: +.. _Preconfigured_Sites_NAS: ------------------------------ -NASA Discover SCU17 +NASA NAS ------------------------------ The following is required for building new spack environments with any supported compiler on this platform. @@ -233,8 +226,7 @@ The following is required for building new spack environments with any supported .. code-block:: console module purge - module use /discover/swdev/gmao_SIteam/modulefiles-SLES15 - module use /discover/swdev/jcsda/spack-stack/scu17/modulefiles + module use /nobackup/gmao_SIteam/modulefiles .. _Preconfigured_Sites_Narwhal: @@ -401,11 +393,6 @@ The following is required for building new spack environments with any supported .. code-block:: console module purge - # ignore that the sticky module ncarenv/... is not unloaded - export LMOD_TMOD_FIND_FIRST=yes - module load ncarenv/23.09 - module use /glade/work/epicufsrt/contrib/spack-stack/derecho/modulefiles - .. _Preconfigured_Sites_Acorn: @@ -488,10 +475,10 @@ The following is required for building new spack environments with Intel on this .. code-block:: console - # These modules should be loaded by default, if not load (swap) with: - module load PrgEnv-intel/8.5.0 - module load intel-classic/2023.2.0 - module load cray-mpich/8.1.30 + # These modules may not be loaded by default, if not load (swap) them: + module load PrgEnv-intel/8.6.0 + module load intel/2024.2 + module load cray-mpich/8.1.32 .. note:: diff --git a/doc/source/conf.py b/doc/source/conf.py index 5068bbc6e..1d6f2c470 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -27,7 +27,7 @@ version = '1.9' # The full version, including alpha/beta/rc tags -release = '1.9.1' +release = '1.9.3' numfig = True diff --git a/spack b/spack index ab2da2468..814f4371d 160000 --- a/spack +++ b/spack @@ -1 +1 @@ -Subproject commit ab2da2468530a580a8100faedf79f66f2cf178fd +Subproject commit 814f4371d65683e88fd738190150977dfb1e6727 diff --git a/util/fetch_go_deps.py b/util/fetch_go_deps.py new file mode 100755 index 000000000..53246c433 --- /dev/null +++ b/util/fetch_go_deps.py @@ -0,0 +1,116 @@ +#!/usr/bin/env spack-python +# +# Run this script in an active, concretized Spack environment to fetch Go +# dependencies and store them in $GOMODCACHE. You must either run it with +# 'spack-python' or have 'spack-python' in your $PATH. Ensure $GOMODCACHE has +# the same value when 'spack install' is run. +# +# For each spec that depends on 'go' and/or is specified by the user, it will +# attempt to use that spec's 'go' dependency to execute 'go mod download', but +# will fall back to searching for 'go' in $PATH if that dependency has not +# already been installed. +# +# Alex Richert, Apr 2025 +# + +import os +import argparse + +from spack.environment import active_environment +from spack.error import SpackError +from spack.installer import PackageInstaller +from spack.spec import Spec +from spack.util.executable import Executable, which +from llnl.util.filesystem import working_dir + +parser = argparse.ArgumentParser( + description="Fetch Go dependencies for packages in a Spack environment" +) +parser.add_argument( + "--spec", "-s", + nargs="+", + default=[], + help="Additional specs for which to fetch go dependencies", +) +parser.add_argument( + "--install-go", + action="store_true", + help="Install go dependency if not already installed", +) +parser.add_argument( + "--only-listed", "-o", + action="store_true", + help="Only fetch user-provided specs (no auto-detection of go dependents)", +) + +args = parser.parse_args() + +# Load the current environment +env = active_environment() +if not env: + raise SpackError("No active Spack environment") + +gomodcache = os.getenv("GOMODCACHE") +if not gomodcache: + raise SpackError("GOMODCACHE must be set") + +user_specs = [] +for spec_str in args.spec: + try: + user_specs.append(Spec(spec_str)) + except Exception as e: + print(f"Warning: Invalid spec '{spec_str}': {e}") + +# Find each spec that depends on 'go' or is in the user-specified package list +for spec in env.all_specs(): + if not spec.concrete: + continue + + # Check if the package depends on go or is user specified + is_user_specified = False + for user_spec in user_specs: + if spec.satisfies(user_spec): + is_user_specified = True + break + if is_user_specified: + fetch_it = True + elif not args.only_listed: + fetch_it = any(dep.name == 'go' for dep in spec.dependencies()) + else: + fetch_it = False + + if fetch_it: + print(f"Processing: {spec.name}@{spec.version}/{spec.dag_hash()}") + + # Check if package actually has a go dependency + if 'go' not in spec: + print(f" Warning: {spec.name} does not have a 'go' dependency, skipping") + continue + + pkg = spec.package + pkg.do_stage() + + # Install go dependency if requested and not already installed + go_dep = spec["go"] + dep_go_path = os.path.join(go_dep.prefix.bin, "go") + + if not which(dep_go_path) and args.install_go: + print(f" Installing go dependency: {go_dep}") + installer = PackageInstaller([go_dep.package]) + installer.install() + + # Now try to use the go dependency's go executable + if which(dep_go_path): + go_exe = Executable(dep_go_path) + elif which("go"): + go_exe = Executable("go") + else: + raise SpackError("Could not find 'go' executable") + + # Execute go mod download + with working_dir(pkg.stage.source_path): + if os.path.isfile("go.mod"): + go_exe("mod", "download") + print(f" Successfully fetched dependencies for {spec.name}") + else: + print(f" No go.mod for {spec.name}") diff --git a/util/filter_spack_compilers.py b/util/filter_spack_compilers.py new file mode 100755 index 000000000..94db94ef3 --- /dev/null +++ b/util/filter_spack_compilers.py @@ -0,0 +1,136 @@ +#!/usr/bin/env python3 +# +# Run "./filter_spack_compilers.py --help" for documentation. NOTE: This script +# will be of no use after +# https://github.com/spack/spack/commit/5b3942a48935ee4aeef724b4a28c9666a75821c4 +# and the deprecation of compilers.yaml. Use with +# https://github.com/spack/spack/commit/a9c879d53e758f67cdbf4cec919425cb2a3a1082 +# or prior commits. +# + +import argparse +import os +import re +import sys + + +def parse_arguments(): + """Parse and return command line arguments.""" + parser = argparse.ArgumentParser( + prog='filter_spack_compilers.py', + description='Inclusively or exclusively delete compilers from compilers.yaml or spack.yaml.', + epilog='Written by Alex Richert, March 2025', + ) + parser.add_argument('yamlfile', help='Input YAML file (compilers.yaml or spack.yaml)') + parser.add_argument('compilerspecs', nargs='+', help='Compiler specs to keep/remove') + + inc_or_exc_group = parser.add_mutually_exclusive_group(required=True) + inc_or_exc_group.add_argument('--remove', action='store_true', + help='Remove specified compiler specs') + inc_or_exc_group.add_argument('--keep-only', action='store_true', + help='Remove all compiler specs except those specified') + inc_or_exc_group.add_argument('--keep-only-this-version', action='store_true', + help='Remove all compiler specs of the same name(s) specified (i.e., have only one version of intel)') + + parser.add_argument('--use-ruamel', action='store_true', + help='Use ruamel.yaml (preserves comments) instead of standard yaml module') + + return parser.parse_args() + + +def load_yaml_file(filename, use_ruamel=False): + """Load and return YAML file contents using either standard yaml or ruamel.yaml.""" + if use_ruamel: + try: + from ruamel.yaml import YAML + yaml_parser = YAML(typ='rt') + yaml_parser.default_flow_style = False + + with open(filename, 'r') as file: + raw_yaml_data = yaml_parser.load(file) + except ImportError: + print("Error: ruamel.yaml module not available. Install with,, e.g., 'pip install ruamel.yaml'") + sys.exit(1) + else: + # Use standard yaml module + import yaml + + with open(filename, 'r') as file: + raw_yaml_data = yaml.safe_load(file) + yaml_parser = yaml # For consistency in return values + + # Handle both spack.yaml and compilers.yaml formats + if 'spack' in raw_yaml_data.keys(): + yaml_data = raw_yaml_data['spack'] + is_spack_yaml = True + else: + yaml_data = raw_yaml_data + is_spack_yaml = False + + return yaml_parser, raw_yaml_data, yaml_data, is_spack_yaml + + +def filter_compilers(yaml_data, args): + """Filter compilers based on command line arguments.""" + + # In the future, `spack.spec.Spec("foo@1.2.3").satisfies("foo@1")` may provide + # a more robust way to match specs. + + # Change "@=" to "@" to make sure we don't miss anything. For matching purposes + # we'll treat the two as equivalent. + args.compilerspecs = [x.replace("@=", "@") for x in args.compilerspecs] + + n_compilers = len(yaml_data['compilers']) + + for i in range(n_compilers-1, -1, -1): + compiler_spec = yaml_data['compilers'][i]['compiler']['spec'].replace("@=", "@") + + if args.keep_only_this_version: + names = [re.sub('@.*', '', x) for x in args.compilerspecs] + compiler_name = re.sub('@.*', '', compiler_spec) + if (compiler_name in names) and (compiler_spec not in args.compilerspecs): + del yaml_data['compilers'][i] + continue + + if (compiler_spec in args.compilerspecs) and args.remove: + del yaml_data['compilers'][i] + continue + + if (compiler_spec not in args.compilerspecs) and args.keep_only: + del yaml_data['compilers'][i] + + return yaml_data + + +def save_yaml_file(yaml_parser, yaml_data, raw_yaml_data, yamlfile, is_spack_yaml, use_ruamel=False): + """Save modified YAML data back to file with backup of original.""" + if is_spack_yaml: + raw_yaml_data['spack'] = yaml_data + output_data = raw_yaml_data + else: + output_data = yaml_data + + # Create backup of original file + bkp_path = yamlfile + '.bkp' + os.rename(yamlfile, bkp_path) + + # Write updated file + with open(yamlfile, 'w') as outputfile: + if use_ruamel: + # ruamel.yaml has its own dump method + yaml_parser.dump(output_data, outputfile) + else: + # Standard yaml module is already imported in yaml_parser + yaml_parser.dump(output_data, outputfile, sort_keys=False, default_flow_style=False) + + +def main(): + """Main function to run the script.""" + args = parse_arguments() + yaml_parser, raw_yaml_data, yaml_data, is_spack_yaml = load_yaml_file(args.yamlfile, args.use_ruamel) + yaml_data = filter_compilers(yaml_data, args) + save_yaml_file(yaml_parser, yaml_data, raw_yaml_data, args.yamlfile, is_spack_yaml, args.use_ruamel) + + +if __name__ == "__main__": + main() diff --git a/util/parallel_install.sh b/util/parallel_install.sh index 0156bd664..06e5504c4 100755 --- a/util/parallel_install.sh +++ b/util/parallel_install.sh @@ -42,7 +42,7 @@ echo "Installing with $n_instances instances and $n_threads threads in environme for i in $(seq $n_instances); do cmd="spack install -j $n_threads $*" - echo $cmd | tee ${SPACK_ENV}/log.install.proc${i} + echo $cmd | tee -a ${SPACK_ENV}/log.install.proc${i} $cmd &>> ${SPACK_ENV}/log.install.proc${i} & pids+=($!) done