-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable ubuntu-ci-x86_64-intel.yaml and update from ubuntu-ci-x86_64-g…
…nu.yaml
- Loading branch information
Showing
2 changed files
with
84 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,8 +74,6 @@ jobs: | |
spack config add config:install_tree:padded_length:200 | ||
# Set compiler and MPI | ||
# Set compiler and MPI - for GNU | ||
spack config add "packages:all:providers:mpi:[[email protected]]" | ||
spack config add "packages:all:compiler:[[email protected]]" | ||
sed -i "s/\['\%aocc', '\%apple-clang', '\%gcc', '\%intel'\]/\['\%gcc'\]/g" $ENVDIR/spack.yaml | ||
|
@@ -128,6 +126,10 @@ jobs: | |
# Next steps: synchronize source and build cache to a central/combined mirror? | ||
# Cleanup | ||
spack clean -a | ||
spack env deactivate | ||
- name: create-env | ||
run: | | ||
source ./setup.sh | ||
|
@@ -140,6 +142,7 @@ jobs: | |
# Concretize | ||
spack concretize --force 2>&1 | tee log.concretize.gnu-11.4.0 | ||
${SPACK_STACK_DIR}/util/show_duplicate_packages.py -d log.concretize.gnu-11.4.0 -i fms -i crtm -i esmf -i mapl | ||
# Add binary cache back in and reindex it | ||
spack mirror add local-binary file:///home/ubuntu/spack-stack/build-cache/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,10 +32,22 @@ jobs: | |
with: | ||
submodules: true | ||
|
||
- name: create-env | ||
- name: create-buildcache | ||
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 | ||
# spack-stack setup | ||
source ./setup.sh | ||
export ENVNAME=ue-intel-2021.10.0 | ||
export ENVNAME=ue-intel-2021.10.0-buildcache | ||
export ENVDIR=$PWD/envs/${ENVNAME} | ||
spack stack create env --site linux.default --template unified-dev --name ${ENVNAME} | ||
spack env activate ${ENVDIR} | ||
|
@@ -58,7 +70,6 @@ jobs: | |
# For Intel | ||
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: [email protected]" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml | ||
echo " paths:" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml | ||
|
@@ -113,49 +124,98 @@ jobs: | |
spack config add "modules:default:tcl:exclude:[ecflow]" | ||
# Concretize and check for duplicates | ||
spack concretize 2>&1 | tee log.concretize.intel-2021.10.0 | ||
${SPACK_STACK_DIR}/util/show_duplicate_packages.py -d log.concretize.intel-2021.10.0 -i fms -i crtm -i esmf -i mapl | ||
spack concretize 2>&1 | tee log.concretize.intel-2021.10.0-buildcache | ||
${SPACK_STACK_DIR}/util/show_duplicate_packages.py -d log.concretize.intel-2021.10.0-buildcache -i fms -i crtm -i esmf -i mapl | ||
# Add and update source cache | ||
spack mirror add local-source file:///home/ubuntu/spack-stack/source-cache/ | ||
spack mirror create -a -d /home/ubuntu/spack-stack/source-cache/ | ||
# Add binary cache and reindex it | ||
spack mirror add local-binary file:///home/ubuntu/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 | ||
spack mirror add local-binary file:///home/ubuntu/spack-stack/build-cache/ | ||
spack buildcache update-index local-binary | ||
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 | ||
# six hours, and/or fail later in the build process. | ||
# base-env | ||
echo "base-env ..." | ||
spack install --fail-fast --source --no-check-signature base-env 2>&1 | tee log.install.intel-2021.10.0.base-env | ||
spack install --fail-fast --source --no-check-signature base-env 2>&1 | tee log.install.intel-2021.10.0-buildcache.base-env | ||
spack buildcache create -a -u /home/ubuntu/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.intel-2021.10.0.jedi-base-env | ||
spack install --fail-fast --source --no-check-signature jedi-base-env 2>&1 | tee log.install.intel-2021.10.0-buildcache.jedi-base-env | ||
spack buildcache create -a -u /home/ubuntu/spack-stack/build-cache/ jedi-base-env | ||
# the rest | ||
echo "unified-env ..." | ||
spack install --fail-fast --source --no-check-signature 2>&1 | tee log.install.intel-2021.10.0.unified-env | ||
spack install --fail-fast --source --no-check-signature 2>&1 | tee log.install.intel-2021.10.0-buildcache.unified-env | ||
spack buildcache create -a -u /home/ubuntu/spack-stack/build-cache/ | ||
# Remove binary cache for next round of concretization | ||
if [ "$USE_BINARY_CACHE" = true ] ; then | ||
spack mirror rm local-binary | ||
fi | ||
# Remove buildcache config settings | ||
spack config remove config:install_tree:padded_length | ||
# Next steps: synchronize source and build cache to a central/combined mirror? | ||
echo "Next steps ..." | ||
### Don't think this works when using config padded length stuff for creating build caches? | ||
### '${SPACK_STACK_DIR}/util/ldd_check.py $SPACK_ENV 2>&1 | tee log.ldd_check | ||
# Cleanup | ||
spack clean -a | ||
spack env deactivate | ||
- name: create-env | ||
run: | | ||
source ./setup.sh | ||
export BUILDCACHE_ENVNAME=ue-intel-2021.10.0-buildcache | ||
export BUILDCACHE_ENVDIR=$PWD/envs/${BUILDCACHE_ENVNAME} | ||
export ENVNAME=ue-intel-2021.10.0 | ||
export ENVDIR=$PWD/envs/${ENVNAME} | ||
rsync -av --exclude='install' --exclude='spack.lock' --exclude='.spack_db' ${BUILDCACHE_ENVDIR}/ ${ENVDIR}/ | ||
spack env activate ${ENVDIR} | ||
# Concretize | ||
spack concretize --force 2>&1 | tee log.concretize.intel-2021.10.0 | ||
${SPACK_STACK_DIR}/util/show_duplicate_packages.py -d log.concretize.intel-2021.10.0 -i fms -i crtm -i esmf -i mapl | ||
# Add binary cache back in and reindex it | ||
spack mirror add local-binary file:///home/ubuntu/spack-stack/build-cache/ | ||
echo "Packages in combined spack build caches:" | ||
spack buildcache list | ||
# base-env | ||
echo "base-env ..." | ||
spack install --fail-fast --source --no-check-signature 2>&1 | tee log.install.intel-2021.10.0.unified-env | ||
${SPACK_STACK_DIR}/util/ldd_check.py $SPACK_ENV 2>&1 | tee log.ldd_check | ||
spack clean -a | ||
spack module tcl refresh -y | ||
spack stack setup-meta-modules | ||
spack env deactivate | ||
# Test environment chaining | ||
echo "Test environment chaining" | ||
spack stack create env --name chaintest --template empty --site linux.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 [email protected]%gcc | ||
spack concretize | tee envs/chaintest/log.concretize | ||
unwanted_duplicates=$(( cat envs/chaintest/log.concretize | grep -E '^ - ' | grep -Fv '[email protected]' || true ) | wc -l) | ||
if [ ${unwanted_duplicates} -gt 0 ]; then echo "Environment chaining test failed"; exit 1; fi | ||
spack env deactivate | ||
- name: test-env | ||
run: | | ||
source /etc/profile.d/modules.sh | ||
module use /home/ubuntu/spack-stack/modulefiles | ||
export ENVNAME=ue-intel-2021.10.0 | ||
|
@@ -168,7 +228,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 |