diff --git a/configs/sites/tier1/derecho/packages.yaml b/configs/sites/tier1/derecho/packages.yaml index 2de33fab5..915ac86f0 100644 --- a/configs/sites/tier1/derecho/packages.yaml +++ b/configs/sites/tier1/derecho/packages.yaml @@ -1,6 +1,7 @@ packages: # Modification of common packages all: + target: [zen3] providers: zlib-api:: [zlib] # Tell esmf that this is not a 'normal' Cray ... diff --git a/configs/sites/tier1/derecho/packages_gcc-13.3.1.yaml b/configs/sites/tier1/derecho/packages_gcc-13.3.1.yaml deleted file mode 100644 index d7494c60b..000000000 --- a/configs/sites/tier1/derecho/packages_gcc-13.3.1.yaml +++ /dev/null @@ -1,42 +0,0 @@ -packages: - all: - require: - - any_of: ['%gcc@=13.3.1'] - when: '%gcc' - mpi: - buildable: false - require: - - cray-mpich@8.1.32 - gcc: - buildable: false - externals: - - spec: gcc@13.3.1 languages:='c,c++,fortran' - prefix: /opt/cray/pe/gcc-native/13 - modules: - - crayenv/25.03 - - PrgEnv-gnu/8.6.0 - - gcc-native/13.2 - extra_attributes: - compilers: - c: /opt/cray/pe/gcc-native/13/bin/gcc - cxx: /opt/cray/pe/gcc-native/13/bin/g++ - fortran: /opt/cray/pe/gcc-native/13/bin/gfortran - environment: - set: - PE_GCC_EXTERNAL: native - # https://github.com/JCSDA/spack-stack/issues/957 - FI_CXI_RX_MATCH_MODE: hybrid - cray-mpich: - buildable: false - externals: - - spec: cray-mpich@8.1.32 +wrappers - prefix: /opt/cray/pe/mpich/8.1.32/ofi/gnu/12.3 - modules: - - crayenv/25.03 - - PrgEnv-gnu/8.6.0 - - gcc-native/13.2 - - craype-network-ofi - - cray-mpich/8.1.32 - - libfabric/1.22.0 - - cray-pals/1.6.1 - diff --git a/configs/sites/tier1/derecho/packages_gcc-14.3.0.yaml b/configs/sites/tier1/derecho/packages_gcc-14.3.0.yaml new file mode 100644 index 000000000..194855140 --- /dev/null +++ b/configs/sites/tier1/derecho/packages_gcc-14.3.0.yaml @@ -0,0 +1,44 @@ +packages: + all: + require: + - any_of: ['%gcc@=14.3.0'] + when: '%gcc' + mpi: + buildable: false + require: + - cray-mpich@8.1.32 + gcc: + buildable: false + externals: + - spec: gcc@14.3.0 languages:='c,c++,fortran' + prefix: /glade/u/apps/common/25.10/spack/opt/spack/gcc/14.3.0/nw2m + modules: + - ncarenv-basic/25.10 + - gcc/14.3.0 + extra_attributes: + compilers: + c: /glade/u/apps/common/25.10/spack/opt/spack/gcc/14.3.0/nw2m/bin/gcc + cxx: /glade/u/apps/common/25.10/spack/opt/spack/gcc/14.3.0/nw2m/bin/g++ + fortran: /glade/u/apps/common/25.10/spack/opt/spack/gcc/14.3.0/nw2m/bin/gfortran + environment: + set: + # https://github.com/JCSDA/spack-stack/issues/957 + FI_CXI_RX_MATCH_MODE: hybrid + remove_path: + LIBRARY_PATH: /glade/u/apps/common/25.10/spack/opt/spack/gcc/12.5.0/hsbg/lib64 + PATH: /glade/u/apps/common/25.10/spack/opt/spack/gcc/12.5.0/hsbg/bin + cray-mpich: + buildable: false + externals: + - spec: cray-mpich@8.1.32 +wrappers + prefix: /opt/cray/pe/mpich/8.1.32/ofi/gnu/12.3 + modules: + - ncarenv-basic/25.10 + - gcc/14.3.0 + - cray-mpich/8.1.32 + - libfabric/1.22.0 + extra_attributes: + environment: + remove_path: + LIBRARY_PATH: /glade/u/apps/common/25.10/spack/opt/spack/gcc/12.5.0/hsbg/lib64 + PATH: /glade/u/apps/common/25.10/spack/opt/spack/gcc/12.5.0/hsbg/bin diff --git a/configs/sites/tier1/derecho/packages_oneapi-2025.3.1.yaml b/configs/sites/tier1/derecho/packages_oneapi-2025.3.1.yaml deleted file mode 100644 index 3d4ba7636..000000000 --- a/configs/sites/tier1/derecho/packages_oneapi-2025.3.1.yaml +++ /dev/null @@ -1,68 +0,0 @@ -packages: - all: - require: - - any_of: ['%intel-oneapi-compilers@=2025.3.1'] - when: '%intel-oneapi-compilers' - - any_of: ['%gcc@=13.3.1'] - when: '%gcc' - mpi: - buildable: false - require: - - cray-mpich@8.1.32 - intel-oneapi-compilers: - buildable: false - externals: - - spec: intel-oneapi-compilers@2025.3.1 - prefix: /glade/work/epicufsrt/contrib/spack-stack/derecho/installs/oneapi-2025.3.1 - modules: - - crayenv/25.03 - - PrgEnv-intel/8.6.0 - - intel/2025.3.1 - extra_attributes: - compilers: - c: /glade/work/epicufsrt/contrib/spack-stack/derecho/installs/oneapi-2025.3.1/compiler/2025.3/bin/icx - cxx: /glade/work/epicufsrt/contrib/spack-stack/derecho/installs/oneapi-2025.3.1/compiler/2025.3/bin/icpx - fortran: /glade/work/epicufsrt/contrib/spack-stack/derecho/installs/oneapi-2025.3.1/compiler/2025.3/bin/ifx - environment: - 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 - gcc: - buildable: false - externals: - - spec: gcc@13.3.1 languages:='c,c++' - prefix: /opt/cray/pe/gcc-native/13 - modules: - - crayenv/25.03 - - PrgEnv-gnu/8.6.0 - - gcc-native/13.2 - extra_attributes: - compilers: - c: /opt/cray/pe/gcc-native/13/bin/gcc - cxx: /opt/cray/pe/gcc-native/13/bin/g++ - fortran: /opt/cray/pe/gcc-native/13/bin/gfortran - environment: - set: - PE_GCC_EXTERNAL: native - # https://github.com/JCSDA/spack-stack/issues/957 - FI_CXI_RX_MATCH_MODE: hybrid - cray-mpich: - buildable: false - externals: - - spec: cray-mpich@8.1.32 +wrappers - prefix: /opt/cray/pe/mpich/8.1.32/ofi/intel/2022.1 - modules: - - crayenv/25.03 - - PrgEnv-intel/8.6.0 - - intel/2025.3.1 - - craype-network-ofi - - cray-mpich/8.1.32 - - libfabric/1.22.0 - - cray-pals/1.6.1 - intel-oneapi-mkl: - buildable: false - externals: - - spec: intel-oneapi-mkl@2025.3 - prefix: /glade/work/epicufsrt/contrib/spack-stack/derecho/installs/oneapi-2025.3.1 diff --git a/configs/sites/tier1/derecho/packages_oneapi-2025.3.2.yaml b/configs/sites/tier1/derecho/packages_oneapi-2025.3.2.yaml new file mode 100644 index 000000000..eda8e9de2 --- /dev/null +++ b/configs/sites/tier1/derecho/packages_oneapi-2025.3.2.yaml @@ -0,0 +1,70 @@ +packages: + all: + require: + - any_of: ['%intel-oneapi-compilers@=2025.3.2'] + when: '%intel-oneapi-compilers' + - any_of: ['%gcc@=14.3.0'] + when: '%gcc' + mpi: + buildable: false + require: + - cray-mpich@8.1.32 + intel-oneapi-compilers: + buildable: false + externals: + - spec: intel-oneapi-compilers@2025.3.2 + prefix: /glade/u/apps/common/25.10/spack/opt/spack/intel-oneapi-compilers/2025.3.2/snvt + modules: + - ncarenv-basic/25.10 + - intel/2025.3.2 + extra_attributes: + compilers: + c: /glade/u/apps/common/25.10/spack/opt/spack/intel-oneapi-compilers/2025.3.2/snvt/compiler/2025.3/bin/icx + cxx: /glade/u/apps/common/25.10/spack/opt/spack/intel-oneapi-compilers/2025.3.2/snvt/compiler/2025.3/bin/icpx + fortran: /glade/u/apps/common/25.10/spack/opt/spack/intel-oneapi-compilers/2025.3.2/snvt/compiler/2025.3/bin/ifx + environment: + 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 + remove_path: + LIBRARY_PATH: /glade/u/apps/common/25.10/spack/opt/spack/gcc/12.5.0/hsbg/lib64 + PATH: /glade/u/apps/common/25.10/spack/opt/spack/gcc/12.5.0/hsbg/bin + gcc: + buildable: false + externals: + - spec: gcc@14.3.0 languages:='c,c++' + prefix: /glade/u/apps/common/25.10/spack/opt/spack/gcc/14.3.0/nw2m + modules: + - ncarenv-basic/25.10 + - gcc/14.3.0 + extra_attributes: + compilers: + c: /glade/u/apps/common/25.10/spack/opt/spack/gcc/14.3.0/nw2m/bin/gcc + cxx: /glade/u/apps/common/25.10/spack/opt/spack/gcc/14.3.0/nw2m/bin/g++ + fortran: /glade/u/apps/common/25.10/spack/opt/spack/gcc/14.3.0/nw2m/bin/gfortran + environment: + remove_path: + LIBRARY_PATH: /glade/u/apps/common/25.10/spack/opt/spack/gcc/12.5.0/hsbg/lib64 + PATH: /glade/u/apps/common/25.10/spack/opt/spack/gcc/12.5.0/hsbg/bin + cray-mpich: + buildable: false + externals: + - spec: cray-mpich@8.1.32 +wrappers + prefix: /opt/cray/pe/mpich/8.1.32/ofi/intel/2022.1 + modules: + - ncarenv-basic/25.10 + - intel/2025.3.2 + - cray-mpich/8.1.32 + - libfabric/1.22.0 + extra_attributes: + environment: + remove_path: + LIBRARY_PATH: /glade/u/apps/common/25.10/spack/opt/spack/gcc/12.5.0/hsbg/lib64 + PATH: /glade/u/apps/common/25.10/spack/opt/spack/gcc/12.5.0/hsbg/bin + intel-oneapi-mkl: + buildable: false + externals: + - spec: intel-oneapi-mkl@2025.3.1 + prefix: /glade/u/apps/derecho/25.10/spack/opt/spack/intel-oneapi-mkl/2025.3.1/intel-oneapi-compilers/2025.3.2/ydfo diff --git a/configs/sites/tier1/derecho/setup.sh b/configs/sites/tier1/derecho/setup.sh index 0d307e730..dfe4de712 100644 --- a/configs/sites/tier1/derecho/setup.sh +++ b/configs/sites/tier1/derecho/setup.sh @@ -1,3 +1 @@ module --force purge -module use /opt/cray/pe/modulefiles -module use /glade/work/epicufsrt/contrib/spack-stack/derecho/installs/oneapi-2025.3.1/modulefiles diff --git a/spack-ext/lib/jcsda-emc/spack-stack/stack/meta_modules.py b/spack-ext/lib/jcsda-emc/spack-stack/stack/meta_modules.py index 843a35bce..0757f59f7 100755 --- a/spack-ext/lib/jcsda-emc/spack-stack/stack/meta_modules.py +++ b/spack-ext/lib/jcsda-emc/spack-stack/stack/meta_modules.py @@ -95,19 +95,26 @@ def envmod_command(module_choice, action, env_name, env_values): elif action == "unset": module_action = "unsetenv" elif action == "append_path": - if module_choice == "lmod": - module_action = "append_path" - else: - module_action = "append-path" + module_action = "append_path" if module_choice == "lmod" else "append-path" elif action == "prepend_path": - if module_choice == "lmod": - module_action = "prepend_path" - else: - module_action = "prepend-path" + module_action = "prepend_path" if module_choice == "lmod" else "prepend-path" + elif action == "remove_path": + module_action = "remove_path" if module_choice == "lmod" else "remove-path" + else: + raise ValueError( + "Unsupported environment modification action '{}' " + "in extra_attributes:environment".format(action) + ) if module_choice == "lmod": - return f'{module_action}("{env_name}", "{env_values}")\n'#.format(module_action, env_name, env_values) + if action == "unset": + return f'{module_action}("{env_name}")\n' + else: + return f'{module_action}("{env_name}", "{env_values}")\n' else: - return f"{module_action} {{{env_name}}} {{{env_values}}}\n"#.format(module_action, env_name, env_values) + if action == "unset": + return f"{module_action} {{{env_name}}}\n" + else: + return f"{module_action} {{{env_name}}} {{{env_values}}}\n" def module_load_command(module_choice, module): @@ -123,10 +130,6 @@ def module_load_command(module_choice, module): def modulepath_prepend_command(module_choice, modulepath): return envmod_command(module_choice, "prepend_path", "MODULEPATH", modulepath) - #if module_choice == "lmod": - # return 'prepend_path("MODULEPATH", "{}")\n'.format(modulepath) - #else: - # return "prepend-path {{MODULEPATH}} {{{}}}\n".format(modulepath) def substitute_config_vars(config_str): @@ -425,7 +428,10 @@ def setup_meta_modules(): if "environment" in compiler.extra_attributes.keys(): for action in compiler.extra_attributes["environment"].keys(): for env_name in compiler.extra_attributes["environment"][action]: - env_values = compiler.extra_attributes["environment"][action][env_name] + if action == "unset": + env_values = None + else: + env_values = compiler.extra_attributes["environment"][action][env_name] compiler_subs["ENVVARS"] += envmod_command( module_choice, action, @@ -623,7 +629,10 @@ def setup_meta_modules(): if "environment" in mpi_provider.extra_attributes.keys(): for action in mpi_provider.extra_attributes["environment"].keys(): for env_name in mpi_provider.extra_attributes["environment"][action]: - env_values = mpi_provider.extra_attributes["environment"][action][env_name] + if action == "unset": + env_values = None + else: + env_values = mpi_provider.extra_attributes["environment"][action][env_name] substitutes["ENVVARS"] += envmod_command( module_choice, action, diff --git a/spack-ext/lib/jcsda-emc/spack-stack/tests/test_setup_meta_modules.py b/spack-ext/lib/jcsda-emc/spack-stack/tests/test_setup_meta_modules.py index 960dbbcb6..f62cf95da 100644 --- a/spack-ext/lib/jcsda-emc/spack-stack/tests/test_setup_meta_modules.py +++ b/spack-ext/lib/jcsda-emc/spack-stack/tests/test_setup_meta_modules.py @@ -56,6 +56,9 @@ def test_setup_meta_modules(): c: /usr/bin/gcc cxx: /usr/bin/g++ fortran: /usr/bin/gfortran + environment: + unset: + - DUMMYVAR mpi: buildable: false openmpi: