diff --git a/.github/workflows/macos-ci-aarch64.yaml b/.github/workflows/macos-ci-aarch64.yaml index 6db11b222..41a77d735 100644 --- a/.github/workflows/macos-ci-aarch64.yaml +++ b/.github/workflows/macos-ci-aarch64.yaml @@ -28,12 +28,28 @@ jobs: rm -fr * - name: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: true + - name: prepare-directories + run: | + mkdir -p /Users/ec2-user/spack-stack/build-cache + mkdir -p /Users/ec2-user/spack-stack/source-cache + - name: create-env run: | + # Get day of week to decide whether to use build caches or not + DOW=$(date +%u) + # Monday is 1 ... Sunday is 7 + if [[ $DOW == 7 ]]; then + export USE_BINARY_CACHE=false + echo "Ignore existing binary cache for creating buildcache environment" + else + export USE_BINARY_CACHE=true + echo "Use existing binary cache for creating buildcache environment" + fi + # Set up homebrew and lmod support eval "$(/opt/homebrew/bin/brew shellenv)" source /opt/homebrew/opt/lmod/init/profile @@ -42,15 +58,13 @@ jobs: source ./setup.sh # Important! export SPACK_PYTHON=/usr/bin/python3 - - # DH* 20230302 - to avoid using padded_length for build caches, - # always build in the same environment so that the length of the - # path doesn't change - see also other 'DH* 20230302' changes below - #export ENVNAME=${{ inputs.template || 'unified-dev' }}.macos-ci-aarch64 - export ENVNAME=ci-env.macos-ci-aarch64 - # *DH + export ENVNAME=ue-apple-clang-14.0.3 export ENVDIR=$PWD/envs/${ENVNAME} - spack stack create env --site macos.default --template ${{ inputs.template || 'unified-dev' }} --name ${ENVNAME} + + spack clean -ab + spack bootstrap now + + spack stack create env --site macos.default --template unified-dev --name ${ENVNAME} spack env activate ${ENVDIR} spack add ${{ inputs.specs || '' }} export SPACK_SYSTEM_CONFIG_PATH="${ENVDIR}/site" @@ -58,7 +72,7 @@ jobs: # Find external packages spack external find --scope system \ --exclude bison --exclude openssl \ - --exclude python + --exclude curl --exclude python spack external find --scope system perl spack external find --scope system libiconv spack external find --scope system wget @@ -74,11 +88,6 @@ jobs: export -n SPACK_SYSTEM_CONFIG_PATH - # DH* 20230302 - Don't use yet, too many problems - ## For buildcaches - #spack config add config:install_tree:padded_length:true - # *DH - # Set compiler and MPI spack config add "packages:all:providers:mpi:[openmpi@5.0.3]" spack config add "packages:all:compiler:[apple-clang@14.0.3]" @@ -98,11 +107,15 @@ jobs: spack mirror add local-source file:///Users/ec2-user/spack-stack/source-cache/ spack mirror create -a -d /Users/ec2-user/spack-stack/source-cache/ - # Add binary cache and reindex it - spack mirror add local-binary file:///Users/ec2-user/spack-stack/build-cache/ - spack buildcache update-index local-binary - echo "Packages in combined spack build caches:" - spack buildcache list + # Add binary cache if requested + if [ "$USE_BINARY_CACHE" = true ] ; then + set +e + spack mirror add local-binary file:///Users/ec2-user/spack-stack/build-cache/ + spack buildcache update-index local-binary || (echo "No valid binary cache found, proceed without" && spack mirror rm local-binary) + set +e + echo "Packages in spack binary cache:" + spack buildcache list + fi # Break installation up in pieces and create build caches in between # This allows us to "spin up" builds that altogether take longer than @@ -113,16 +126,39 @@ jobs: spack install --fail-fast --source --no-check-signature base-env 2>&1 | tee log.install.apple-clang-14.0.3.base-env spack buildcache create -a -u /Users/ec2-user/spack-stack/build-cache/ base-env + # jedi-base-env + echo "jedi-base-env ..." + spack install --fail-fast --source --no-check-signature jedi-base-env 2>&1 | tee log.install.apple-clang-14.0.3.jedi-base-env + spack buildcache create -a -u /Users/ec2-user/spack-stack/build-cache/ jedi-base-env + # the rest - echo "${{ inputs.template || 'unified-dev' }} ..." - spack install --fail-fast --source --no-check-signature 2>&1 | tee log.install.apple-clang-14.0.3.${{ inputs.template || 'unified-dev' }} + echo "unified-env ..." + spack install --fail-fast --source --no-check-signature 2>&1 | tee log.install.apple-clang-14.0.3.unified-env spack buildcache create -a -u /Users/ec2-user/spack-stack/build-cache/ - # Next steps: synchronize source and build cache to a central/combined mirror? - echo "Next steps ..." + # Remove binary cache for next round of concretization + if [ "$USE_BINARY_CACHE" = true ] ; then + spack mirror rm local-binary + fi + + # Create modules spack clean -a spack module lmod refresh -y spack stack setup-meta-modules + + # Next steps: synchronize source and build cache to a central/combined mirror? + spack env deactivate + + # Test environment chaining + echo "Test environment chaining" + spack stack create env --name chaintest --template empty --site macos.default --upstream $(realpath envs/${ENVNAME}/install) + # Retain config from upstream so we don't have to rebuild: + cp -r $PWD/envs/${ENVNAME}/{site,common} $PWD/envs/chaintest/. + spack env activate ${PWD}/envs/chaintest + spack add nccmp@1.8.9.0%apple-clang + spack concretize | tee envs/chaintest/log.concretize + unwanted_duplicates=$(( cat envs/chaintest/log.concretize | grep -E '^ - ' | grep -Fv 'nccmp@1.8.9.0' || true ) | wc -l) + if [ ${unwanted_duplicates} -gt 0 ]; then echo "Environment chaining test failed"; exit 1; fi spack env deactivate - name: test-env @@ -131,12 +167,7 @@ jobs: eval "$(/opt/homebrew/bin/brew shellenv)" source /opt/homebrew/opt/lmod/init/profile - # DH* 20230302 - to avoid using padded_length for build caches, - # always build in the same environment so that the length of the - # path doesn't change - see also other 'DH* 20230302' changes below - #export ENVNAME=${{ inputs.template || 'unified-dev' }}.macos-ci-aarch64 - export ENVNAME=ci-env.macos-ci-aarch64 - # *DH + export ENVNAME=ue-apple-clang-14.0.3 export ENVDIR=$PWD/envs/${ENVNAME} ls -l ${ENVDIR}/install/modulefiles/Core @@ -146,7 +177,7 @@ jobs: module load stack-python/3.10.13 module available - module load jedi-ufs-env/1.0.0 - module load ewok-env/1.0.0 - module load soca-env/1.0.0 + module load jedi-ufs-env + module load ewok-env + module load soca-env module list diff --git a/.github/workflows/ubuntu-ci-containers-x86_64.yaml b/.github/workflows/ubuntu-ci-containers-x86_64.yaml index 5a8510df8..67c3fc1e4 100644 --- a/.github/workflows/ubuntu-ci-containers-x86_64.yaml +++ b/.github/workflows/ubuntu-ci-containers-x86_64.yaml @@ -71,10 +71,6 @@ jobs: spack stack create ctr --container ${CONTAINER} --specs ${SPECS} cd ${ENVDIR} - # mapl@:2.41 doesn't build with mpich@4 - https://github.com/JCSDA/spack-stack/issues/608 - if [[ "${CONTAINER}" == *"mpich"* ]]; then - sed -i 's/- mapl@/#- mapl@/g' spack.yaml - fi spack containerize > Dockerfile docker build -t ${CONTAINER}-${SPECS} . diff --git a/.github/workflows/ubuntu-ci-x86_64-gnu.yaml b/.github/workflows/ubuntu-ci-x86_64-gnu.yaml index 882e98de9..65fc170d8 100644 --- a/.github/workflows/ubuntu-ci-x86_64-gnu.yaml +++ b/.github/workflows/ubuntu-ci-x86_64-gnu.yaml @@ -28,10 +28,15 @@ jobs: rm -fr * - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: true + - name: prepare-directories + run: | + mkdir -p /home/ubuntu/spack-stack/build-cache/ + mkdir -p /home/ubuntu/spack-stack/source-cache/ + - name: create-buildcache run: | # Get day of week to decide whether to use build caches or not @@ -45,7 +50,7 @@ jobs: echo "Use existing binary cache for creating buildcache environment" fi - # spack-stack setup + # Set up spack-stack source ./setup.sh export ENVNAME=ue-gcc-11.4.0-buildcache export ENVDIR=$PWD/envs/${ENVNAME} @@ -63,7 +68,7 @@ jobs: spack external find --scope system texlive spack external find --scope system mysql - # For GNU + # Find compilers spack compiler find --scope system export -n SPACK_SYSTEM_CONFIG_PATH @@ -89,8 +94,10 @@ jobs: # Add binary cache if requested if [ "$USE_BINARY_CACHE" = true ] ; then + set +e spack mirror add local-binary file:///home/ubuntu/spack-stack/build-cache/ - spack buildcache update-index local-binary + spack buildcache update-index local-binary || (echo "No valid binary cache found, proceed without" && spack mirror rm local-binary) + set +e echo "Packages in spack binary cache:" spack buildcache list fi diff --git a/.github/workflows/ubuntu-ci-x86_64-intel.yaml b/.github/workflows/ubuntu-ci-x86_64-intel.yaml index d6d948d25..39ee01589 100644 --- a/.github/workflows/ubuntu-ci-x86_64-intel.yaml +++ b/.github/workflows/ubuntu-ci-x86_64-intel.yaml @@ -28,10 +28,15 @@ jobs: rm -fr * - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: true + - name: prepare-directories + run: | + mkdir -p /home/ubuntu/spack-stack/build-cache/ + mkdir -p /home/ubuntu/spack-stack/source-cache/ + - name: create-buildcache run: | # Get day of week to decide whether to use build caches or not @@ -45,7 +50,7 @@ jobs: echo "Use existing binary cache for creating buildcache environment" fi - # spack-stack setup + # Set up spack-stack source ./setup.sh export ENVNAME=ue-intel-2021.10.0-buildcache export ENVDIR=$PWD/envs/${ENVNAME} @@ -63,7 +68,7 @@ jobs: spack external find --scope system texlive spack external find --scope system mysql - # For GNU - need to for bootstrapping + # Find compilers spack compiler find --scope system # For Intel @@ -131,8 +136,10 @@ jobs: # Add binary cache if requested if [ "$USE_BINARY_CACHE" = true ] ; then + set +e spack mirror add local-binary file:///home/ubuntu/spack-stack/build-cache/ - spack buildcache update-index local-binary + spack buildcache update-index local-binary || (echo "No valid binary cache found, proceed without" && spack mirror rm local-binary) + set +e echo "Packages in spack binary cache:" spack buildcache list fi diff --git a/configs/common/modules_lmod.yaml b/configs/common/modules_lmod.yaml index e05b611a5..669256ec9 100644 --- a/configs/common/modules_lmod.yaml +++ b/configs/common/modules_lmod.yaml @@ -31,6 +31,7 @@ modules: - fixesproto - flex - freetype + - gcc-runtime - gdbm - googletest - hwloc diff --git a/configs/common/modules_tcl.yaml b/configs/common/modules_tcl.yaml index 8ba6b9e44..88ee132f1 100644 --- a/configs/common/modules_tcl.yaml +++ b/configs/common/modules_tcl.yaml @@ -33,6 +33,7 @@ modules: - fixesproto - flex - freetype + - gcc-runtime - gdbm - googletest - hwloc diff --git a/configs/common/packages.yaml b/configs/common/packages.yaml index 6529428bb..4b32c8d24 100644 --- a/configs/common/packages.yaml +++ b/configs/common/packages.yaml @@ -59,19 +59,16 @@ # config and update the projections for lmod/tcl. # Also, check the acorn and derecho site configs which have esmf modifications. esmf: - version: ['8.6.0'] - variants: ~xerces ~pnetcdf snapshot=none +shared +external-parallelio - #version: ['8.6.1b04'] - #variants: ~xerces ~pnetcdf snapshot=b04 +shared +external-parallelio - #version: ['8.7.0b04'] - #variants: ~xerces ~pnetcdf snapshot=b04 +shared +external-parallelio require: - - any_of: ['fflags="-fp-model precise" cxxflags="-fp-model precise"'] + - any_of: ['@=8.6.1 ~xerces ~pnetcdf snapshot=none +shared +external-parallelio fflags="-fp-model precise" cxxflags="-fp-model precise"'] when: "%intel" message: "Extra ESMF compile options for Intel" - - any_of: [''] + - any_of: ['@=8.6.1 ~xerces ~pnetcdf snapshot=none +shared +external-parallelio'] when: "%gcc" message: "Extra ESMF compile options for GCC" + - any_of: ['@=8.6.1 ~xerces ~pnetcdf snapshot=none +shared +external-parallelio'] + when: "%apple-clang" + message: "Extra ESMF compile options for GCC" fckit: version: ['0.11.0'] variants: +eckit @@ -138,8 +135,11 @@ variants: +pic libyaml: version: ['0.2.5'] + # Newest version of magics needed for oneapi compilers + magics: + require: "@4.15.3:" mapl: - version: ['2.40.3'] + version: ['2.46.2'] variants: +shared +pflogger ~f2py # If making changes here, also check the Discover site configs and the CI workflows met: @@ -195,7 +195,7 @@ parallel-netcdf: version: ['1.12.3'] pflogger: - version: ['1.12.0'] + #version: ['1.12.0'] variants: +mpi pixman: variants: +pic @@ -291,8 +291,8 @@ version: ['2.0.8'] wrf-io: version: ['1.2.0'] - yafyaml: - version: ['1.2.0'] + #yafyaml: + # version: ['1.2.0'] zstd: version: ['1.5.2'] variants: +programs diff --git a/configs/containers/specs/jedi-ci.yaml b/configs/containers/specs/jedi-ci.yaml index a1c3394d4..122a6e685 100644 --- a/configs/containers/specs/jedi-ci.yaml +++ b/configs/containers/specs/jedi-ci.yaml @@ -9,7 +9,7 @@ parallelio@2.6.2, parallel-netcdf@1.12.3, py-eccodes@1.5.0, py-f90nml@1.4.3, py-gitpython@3.1.40, py-h5py@3.8.0, py-numpy@1.22.3, py-pandas@1.5.3, py-pip, py-pyyaml@6.0, py-scipy@1.11.4, py-shapely@1.8.0, py-xarray@2023.7.0, - sp@2.5.0, udunits@2.2.28, w3emc@2.10.0, nco@5.1.6, esmf@8.6.0, mapl@2.40.3, + sp@2.5.0, udunits@2.2.28, w3emc@2.10.0, nco@5.1.6, esmf@8.6.1, mapl@2.46.2, zlib-ng@2.1.5, zstd@1.5.2, odc@1.4.6, shumlib@macos_clang_linux_intel_port, awscli-v2@2.13.22, py-globus-cli@3.16.0, # Added for new CI system 2024/04/30 diff --git a/configs/sites/nautilus/compilers.yaml b/configs/sites/nautilus/compilers.yaml index c9993985d..ced8a48bd 100644 --- a/configs/sites/nautilus/compilers.yaml +++ b/configs/sites/nautilus/compilers.yaml @@ -49,4 +49,23 @@ compilers: - scl/gcc-toolset-12 environment: {} extra_rpaths: [] - +- compiler: + spec: oneapi@2024.1.2 + paths: + cc: /p/app/projects/NEPTUNE/spack-stack/oneapi-2024.1.2/compiler/2024.1/bin/icx + cxx: /p/app/projects/NEPTUNE/spack-stack/oneapi-2024.1.2/compiler/2024.1/bin/icpx + f77: /p/app/projects/NEPTUNE/spack-stack/oneapi-2024.1.2/compiler/2024.1/bin/ifort + fc: /p/app/projects/NEPTUNE/spack-stack/oneapi-2024.1.2/compiler/2024.1/bin/ifort + flags: + fflags: -diag-disable=10448 + operating_system: rhel8 + target: x86_64 + modules: [] + environment: + prepend_path: + PATH: '/opt/rh/gcc-toolset-11/root/usr/bin' + CPATH: '/opt/rh/gcc-toolset-11/root/usr/include' + LD_LIBRARY_PATH: '/opt/scyld/slurm/lib64:/opt/scyld/slurm/lib64/slurm:/opt/rh/gcc-toolset-11/root/usr/lib64:/opt/rh/gcc-toolset-11/root/usr/lib' + append_path: + CPATH: '/p/app/projects/NEPTUNE/spack-stack/oneapi-2024.1.2/compiler/2024.1/opt/compiler/include/intel64' + extra_rpaths: [] diff --git a/configs/sites/nautilus/packages.yaml b/configs/sites/nautilus/packages.yaml index 7f3eab7b8..5dbed2c44 100644 --- a/configs/sites/nautilus/packages.yaml +++ b/configs/sites/nautilus/packages.yaml @@ -1,8 +1,8 @@ packages: all: - compiler:: [intel@2021.5.0, aocc@4.0.0, gcc@12.2.1] + compiler:: [intel@2021.5.0, aocc@4.0.0, gcc@12.2.1, oneapi@2024.1.2] providers: - mpi:: [openmpi@4.1.6, openmpi@5.0.1] + mpi:: [openmpi@4.1.6, openmpi@5.0.1, intel-oneapi-mpi@2021.12] blas:: [intel-oneapi-mkl] fftw-api:: [intel-oneapi-mkl] lapack:: [intel-oneapi-mkl] @@ -14,12 +14,6 @@ packages: ### MPI, Python, MKL mpi: buildable: False - #intel-oneapi-mpi: - # externals: - # - spec: intel-oneapi-mpi@2021.5.1%intel@2021.5.0 - # modules: - # - intel/mpi/2021.5.1 - # prefix: /p/app/compilers/intel/oneapi openmpi: externals: - spec: openmpi@4.1.6%intel@2021.5.0~cuda~cxx~cxx_exceptions~java~memchecker+pmi~static~wrapper-rpath fabrics=ucx schedulers=slurm @@ -37,12 +31,26 @@ packages: modules: - penguin/openmpi/5.0.1/gcc-8.5.0 - slurm + intel-oneapi-mpi: + externals: + - spec: intel-oneapi-mpi@2021.12%oneapi@2024.1.2 + prefix: /p/app/projects/NEPTUNE/spack-stack/oneapi-2024.1.2 intel-oneapi-mkl: externals: - - spec: intel-oneapi-mkl@2022.0.2 + - spec: intel-oneapi-mkl@2022.0.2%intel@2021.5.0 + prefix: /p/app/compilers/intel/oneapi + modules: + - intel-oneapi-mkl@2022.0.2 + - spec: intel-oneapi-mkl@2022.0.2%gcc@12.2.1 prefix: /p/app/compilers/intel/oneapi modules: - intel-oneapi-mkl@2022.0.2 + - spec: intel-oneapi-mkl@2024.1%oneapi@2024.1.2 + prefix: /p/app/projects/NEPTUNE/spack-stack/oneapi-2024.1.2 + intel-oneapi-runtime: + externals: + - spec: intel-oneapi-runtime@2024.1.2%oneapi@2024.1.2 + prefix: /p/app/projects/NEPTUNE/spack-stack/oneapi-2024.1.2 ### Modifications of common packages # Version 2.0.8 doesn't compile on Nautilus @@ -62,6 +70,10 @@ packages: externals: - spec: binutils@2.30.117 prefix: /usr + bison: + externals: + - spec: bison@3.0.4 + prefix: /usr coreutils: externals: - spec: coreutils@8.30 @@ -115,10 +127,11 @@ packages: prefix: /p/app/projects/NEPTUNE/spack-stack/mysql-8.0.31 modules: - mysql/8.0.31 - perl: - externals: - - spec: perl@5.26.3~cpanm+open+shared+threads - prefix: /usr + # Needed to remove for xnrl w/intel, hopefully ok with oneapi + #perl: + # externals: + # - spec: perl@5.26.3~cpanm+open+shared+threads + # prefix: /usr pkgconf: externals: - spec: pkgconf@1.4.2 diff --git a/configs/templates/neptune-dev/spack.yaml b/configs/templates/neptune-dev/spack.yaml index dcaa4efe8..7404d5b6b 100644 --- a/configs/templates/neptune-dev/spack.yaml +++ b/configs/templates/neptune-dev/spack.yaml @@ -6,7 +6,7 @@ spack: include: [] definitions: - - compilers: ['%aocc', '%apple-clang', '%gcc', '%intel'] + - compilers: ['%aocc', '%apple-clang', '%gcc', '%intel', '%oneapi'] - packages: - neptune-env ^esmf@8.7.0b04 snapshot=b04 diff --git a/doc/source/NewSiteConfigs.rst b/doc/source/NewSiteConfigs.rst index 19fbdfea5..e2a3da857 100644 --- a/doc/source/NewSiteConfigs.rst +++ b/doc/source/NewSiteConfigs.rst @@ -13,9 +13,9 @@ It is also instructive to peruse the GitHub actions scripts in ``.github/workflo +-------------------------------------------+----------------------------------------------------------------------+---------------------------+ | Compiler | Versions tested/in use in one or more site configs | Spack compiler identifier | +===========================================+======================================================================+===========================+ -| Intel classic (icc, icpc, ifort) | 2021.3.0 to the latest available version in oneAPI 2023.2.3 [#fn1]_ | ``intel@`` | +| Intel classic (icc, icpc, ifort) | 2021.3.0 to the final version in oneAPI 2023.2.3 [#fn1]_ | ``intel@`` | +-------------------------------------------+----------------------------------------------------------------------+---------------------------+ -| Intel mixed (icx, icpx, ifort) | all versions up to latest available version in oneAPI 2023.1.0 | ``intel@`` | +| Intel mixed (icx, icpx, ifort) | 2024.1.2 | ``oneapi@`` | +-------------------------------------------+----------------------------------------------------------------------+---------------------------+ | GNU (gcc, g++, gfortran) | 9.2.0 to 12.2.0 (note: 13.x.y is **not** yet supported) | ``gcc@`` | +-------------------------------------------+----------------------------------------------------------------------+---------------------------+ @@ -225,7 +225,7 @@ Remember to activate the ``lua`` module environment and have MacTeX in your sear spack external find --scope system \ --exclude bison --exclude openssl \ - --exclude python + --exclude python --exclude gettext spack external find --scope system libiconv spack external find --scope system perl spack external find --scope system wget @@ -381,6 +381,7 @@ The following instructions were used to prepare a basic Red Hat 8 system as it i # Do *not* install MPI with yum, this will be done with spack-stack # Misc + yum -y install binutils-devel yum -y install m4 yum -y install wget # Do not install cmake (it's 3.20.2, which doesn't work with eckit) @@ -397,6 +398,7 @@ The following instructions were used to prepare a basic Red Hat 8 system as it i yum -y install gettext-devel yum -y install texlive # Do not install qt@5 for now + yum -y install bison # Note - only needed for running JCSDA's # JEDI-Skylab system (using R2D2 localhost) @@ -462,6 +464,7 @@ The following instructions were used to prepare a basic Ubuntu 20.04 or 22.04 LT apt install -y libcurl4-openssl-dev apt install -y libssl-dev apt install -y meson + apt install -y bison # Note - only needed for running JCSDA's # JEDI-Skylab system (using R2D2 localhost) @@ -517,7 +520,7 @@ It is recommended to increase the stacksize limit by using ``ulimit -S -s unlimi .. code-block:: console spack external find --scope system \ - --exclude bison --exclude cmake \ + --exclude cmake \ --exclude curl --exclude openssl \ --exclude openssh --exclude python spack external find --scope system wget diff --git a/spack b/spack index 98ddab9e1..8ba0bbae6 160000 --- a/spack +++ b/spack @@ -1 +1 @@ -Subproject commit 98ddab9e1dfbd5b9935b46acd572671108fde56c +Subproject commit 8ba0bbae6698adf7dce525c0cf72c29edf5fb254 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 b56066798..305bcaa8c 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 @@ -166,6 +166,13 @@ def setenv_command(module_choice, key, value): return "setenv {{{}}} {{{}}}\n".format(key, value) +def append_path_command(module_choice, key, value): + if module_choice == "lmod": + return 'append_path("{}", "{}")\n'.format(key, value) + else: + return "append-path {{{}}} {{{}}}\n".format(key, value) + + def prepend_path_command(module_choice, key, value): if module_choice == "lmod": return 'prepend_path("{}", "{}")\n'.format(key, value) @@ -392,6 +399,13 @@ def setup_meta_modules(): "environment" in compiler["compiler"].keys() and compiler["compiler"]["environment"] ): + # append_path + if "append_path" in compiler["compiler"]["environment"].keys(): + for env_name in compiler["compiler"]["environment"]["append_path"]: + env_values = compiler["compiler"]["environment"]["append_path"][env_name] + substitutes["ENVVARS"] += append_path_command( + module_choice, env_name, env_values + ) # prepend_path if "prepend_path" in compiler["compiler"]["environment"].keys(): for env_name in compiler["compiler"]["environment"]["prepend_path"]: diff --git a/spack-ext/lib/jcsda-emc/spack-stack/stack/templates/mpi b/spack-ext/lib/jcsda-emc/spack-stack/stack/templates/mpi index 7d7a9f507..d239fd5d5 100644 --- a/spack-ext/lib/jcsda-emc/spack-stack/stack/templates/mpi +++ b/spack-ext/lib/jcsda-emc/spack-stack/stack/templates/mpi @@ -27,6 +27,13 @@ setenv {MPI_CXX} {@MPICXX@} setenv {MPI_F77} {@MPIF77@} setenv {MPI_F90} {@MPIF90@} +# intel specific mpi wrapper environment variables +setenv {I_MPI_CC} $env(CC) +setenv {I_MPI_CXX} $env(CXX) +setenv {I_MPI_F77} $env(F77) +setenv {I_MPI_F90} $env(FC) +setenv {I_MPI_FC} $env(FC) + # compiler flags and other environment variables @COMPFLAGS@ @ENVVARS@ diff --git a/spack-ext/lib/jcsda-emc/spack-stack/stack/templates/mpi.lua b/spack-ext/lib/jcsda-emc/spack-stack/stack/templates/mpi.lua index c8094af25..bf805321c 100644 --- a/spack-ext/lib/jcsda-emc/spack-stack/stack/templates/mpi.lua +++ b/spack-ext/lib/jcsda-emc/spack-stack/stack/templates/mpi.lua @@ -31,6 +31,13 @@ setenv("MPI_CXX", "@MPICXX@") setenv("MPI_F77", "@MPIF77@") setenv("MPI_F90", "@MPIF90@") +-- intel specific mpi wrapper environment variables +setenv("I_MPI_CC", os.getenv("CC")) +setenv("I_MPI_CXX", os.getenv("CXX")) +setenv("I_MPI_F77", os.getenv("F77")) +setenv("I_MPI_F90", os.getenv("FC")) +setenv("I_MPI_FC", os.getenv("FC")) + -- compiler flags and other environment variables @COMPFLAGS@ @ENVVARS@