Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/jcsda/spack-stack into f…
Browse files Browse the repository at this point in the history
…eature/version_updates_20230817
  • Loading branch information
climbfuji committed Aug 23, 2023
2 parents 7c5277c + f00d250 commit aa0115a
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 18 deletions.
42 changes: 24 additions & 18 deletions .github/workflows/ubuntu-ci-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ jobs:
echo " intel-oneapi-mpi:" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
echo " buildable: false" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
echo " externals:" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
echo " - spec: intel-oneapi-mpi@2021.4.0%intel@2021.4.0" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
echo " - spec: intel-oneapi-mpi@2021.6.0%intel@2022.1.0" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
echo " prefix: /opt/intel" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
echo " modules:" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
echo " - libfabric-aws/1.16.0~amzn3.0" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
echo " - libfabric-aws/1.16.0~amzn4.0" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
echo " - intelmpi" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
# For GNU
Expand All @@ -94,19 +94,19 @@ jobs:
echo "" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
echo "compilers:" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
echo "- compiler:" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
echo " spec: intel@2021.4.0" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
echo " spec: intel@2022.1.0" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
echo " paths:" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
echo " cc: /opt/intel/oneapi/compiler/2021.4.0/linux/bin/intel64/icc" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
echo " cxx: /opt/intel/oneapi/compiler/2021.4.0/linux/bin/intel64/icpc" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
echo " f77: /opt/intel/oneapi/compiler/2021.4.0/linux/bin/intel64/ifort" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
echo " fc: /opt/intel/oneapi/compiler/2021.4.0/linux/bin/intel64/ifort" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
echo " cc: /opt/intel/oneapi/compiler/2022.1.0/linux/bin/intel64/icc" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
echo " cxx: /opt/intel/oneapi/compiler/2022.1.0/linux/bin/intel64/icpc" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
echo " f77: /opt/intel/oneapi/compiler/2022.1.0/linux/bin/intel64/ifort" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
echo " fc: /opt/intel/oneapi/compiler/2022.1.0/linux/bin/intel64/ifort" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
echo " flags: {}" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
echo " operating_system: ubuntu20.04" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
echo " target: x86_64" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
echo " modules: []" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
echo " environment:" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
echo " prepend_path:" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
echo " LD_LIBRARY_PATH: '/opt/intel/oneapi/compiler/2021.4.0/linux/compiler/lib/intel64_lin'" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
echo " LD_LIBRARY_PATH: '/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin'" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
echo " set:" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
echo " I_MPI_PMI_LIBRARY: '/opt/slurm/lib/libpmi.so'" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
echo " extra_rpaths: []" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
Expand All @@ -119,12 +119,15 @@ jobs:
# *DH
# Set compiler and MPI
spack config add "packages:all:providers:mpi:[intel-oneapi-mpi@2021.4.0]"
spack config add "packages:all:compiler:[intel@2021.4.0]"
spack config add "packages:all:providers:mpi:[intel-oneapi-mpi@2021.6.0]"
spack config add "packages:all:compiler:[intel@2022.1.0]"
sed -i "s/\['\%aocc', '\%apple-clang', '\%gcc', '\%intel'\]/\['\%intel'\]/g" $ENVDIR/spack.yaml
spack concretize 2>&1 | tee log.concretize.intel-2021.4.0
${SPACK_STACK_DIR}/util/show_duplicate_packages.py -d log.concretize.intel-2021.4.0 -i fms -i crtm
# Switch from default tcl to lmod modules
sed -i "s/tcl/lmod/g" $ENVDIR/site/modules.yaml
spack concretize 2>&1 | tee log.concretize.intel-2022.1.0
${SPACK_STACK_DIR}/util/show_duplicate_packages.py -d log.concretize.intel-2022.1.0 -i fms -i crtm
# Add and update source cache
spack mirror add local-source file:///home/ubuntu/spack-stack/source-cache/
Expand All @@ -145,21 +148,21 @@ jobs:
# base-env
echo "base-env ..."
# DH* 20230721 - todo remove --no-checksum
spack install --fail-fast --source --no-check-signature --no-checksum base-env 2>&1 | tee log.install.intel-2021.4.0.base-env
spack install --fail-fast --source --no-check-signature --no-checksum base-env 2>&1 | tee log.install.intel-2022.1.0.base-env
# DH* 20230721 - todo remove || true (this was here all the time, but should not be needed if spack creates buildcaches correctly)
spack buildcache create -a -u /home/ubuntu/spack-stack/build-cache/ || true
# the rest
echo "${{ inputs.template || 'unified-dev' }} ..."
# DH* 20230721 - todo remove --no-checksum
spack install --fail-fast --source --no-check-signature --no-checksum 2>&1 | tee log.install.intel@2021.4.0.${{ inputs.template || 'unified-dev' }}
spack install --fail-fast --source --no-check-signature --no-checksum 2>&1 | tee log.install.intel@2022.1.0.${{ inputs.template || 'unified-dev' }}
# DH* 20230721 - todo remove || true (this was here all the time, but should not be needed if spack creates buildcaches correctly)
spack buildcache create -a -u /home/ubuntu/spack-stack/build-cache/ || true
# Next steps: synchronize source and build cache to a central/combined mirror?
echo "Next steps ..."
spack clean -a
spack module tcl refresh -y
spack module lmod refresh -y
spack stack setup-meta-modules
spack env deactivate
Expand All @@ -177,7 +180,10 @@ jobs:
- name: test-env
run: |
source /etc/profile.d/modules.sh
source /etc/profile.d/z00_lmod.sh
module use /usr/share/modules/modulefiles
module use /opt/intel/mpi/2021.6.0/modulefiles
module use /home/ubuntu/jedi/modulefiles
# DH* 20230302 - to avoid using padded_length for build caches,
# always build in the same environment so that the length of the
Expand All @@ -189,8 +195,8 @@ jobs:
ls -l ${ENVDIR}/install/modulefiles/Core
module use ${ENVDIR}/install/modulefiles/Core
module load stack-intel/2021.4.0
module load stack-intel-oneapi-mpi/2021.4.0
module load stack-intel/2022.1.0
module load stack-intel-oneapi-mpi/2021.6.0
module load stack-python/3.10.8
module available
Expand Down
16 changes: 16 additions & 0 deletions doc/source/NewSiteConfigs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,14 @@ These instructions are meant to be a reference that users can follow to set up t
brew install qt@5
brew install mysql
.. note::
On an Intel based Mac, you will need to also install pkg-config using homebrew.
This is done to work around an issue where libraries (eg, openssl) cannot be properly found during code compilation.

.. code-block:: console
brew install pkg-config # Intel based Mac only
4. Configure your terminal to use the homebrew installed bash

After installing bash with homebrew, you need to change your terminal application's default command to use :code:`$HOMEBREW_ROOT/bin/bash`.
Expand Down Expand Up @@ -220,6 +228,14 @@ Remember to activate the ``lua`` module environment and have MacTeX in your sear
# The texlive bin directory must have been added to PATH (see above)
spack external find --scope system texlive
.. note::
On an Intel based Mac, you need to add the following spack config command to prevent spack from building pkg-config.
This will force spack to use the pkg-config installed by homebrew (see above).

.. code-block:: console
spack config --scope system add packages:pkg-config:buildable:false # Intel based Mac only
5. Find compilers, add to site config's ``compilers.yaml``

.. code-block:: console
Expand Down

0 comments on commit aa0115a

Please sign in to comment.