Skip to content

Commit 9fbd7bb

Browse files
Update spack-stack-dev from spack develop as of 2024/10/31 (#1363)
* Update submodule pointer for spack for the changes in Update spack-stack-dev from spack develop as of 2024/10/31 spack#482 (update from spack develop as of 2024/10/31) * Make macOS CI test look like the UBuntu CI tests (split into two steps: first create buildcache environment, then install test environment from the buildcache) * Remove deprecated -a flag from spack buildcache push for all GitHub actions workflows * Add +classic-names to the intel-oneapi-mpi external package definition in GitHub actions. May need to do the same for each of the preconfigured sites when using icc+icpc+ifort. Without +classic-names, it works for icx+icpx+ifort and for ``icx+icpx`+`ifx`. * Updates to configs/common/packages.yaml to remove deprecated variants and pin certain packages to avoid duplicate packages * Update tier2 site config for blackpeark and bump PrgEnv for Narwhal * Bug fix: gsi-env does not depend on esmf, for some reason the concretizer didn't realize this until now * Pin [email protected] for nco template (cxx issues) --------- Co-authored-by: Alex Richert <[email protected]>
1 parent c8dcfb4 commit 9fbd7bb

File tree

13 files changed

+118
-63
lines changed

13 files changed

+118
-63
lines changed

.github/workflows/macos-ci-aarch64.yaml

Lines changed: 53 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
mkdir -p /Users/ec2-user/spack-stack/build-cache
3636
mkdir -p /Users/ec2-user/spack-stack/source-cache
3737
38-
- name: create-env
38+
- name: create-buildcache
3939
run: |
4040
# Get day of week to decide whether to use build caches or not
4141
DOW=$(date +%u)
@@ -56,15 +56,13 @@ jobs:
5656
source ./setup.sh
5757
# Important!
5858
export SPACK_PYTHON=/usr/bin/python3
59-
export ENVNAME=ue-apple-clang-14.0.3
60-
export ENVDIR=$PWD/envs/${ENVNAME}
61-
6259
spack clean -ab
6360
spack bootstrap now
64-
61+
#
62+
export ENVNAME=ue-apple-clang-14.0.3-buildcache
63+
export ENVDIR=$PWD/envs/${ENVNAME}
6564
spack stack create env --site macos.default --template unified-dev --name ${ENVNAME} --compiler apple-clang
6665
spack env activate ${ENVDIR}
67-
spack add ${{ inputs.specs || '' }}
6866
export SPACK_SYSTEM_CONFIG_PATH="${ENVDIR}/site"
6967
7068
# Find external packages
@@ -86,8 +84,11 @@ jobs:
8684
8785
export -n SPACK_SYSTEM_CONFIG_PATH
8886
87+
# For buildcaches
88+
spack config add config:install_tree:padded_length:200
89+
8990
# Set compiler and MPI specs
90-
spack config add "packages:all:providers:mpi:[[email protected].3]"
91+
spack config add "packages:all:providers:mpi:[[email protected].5]"
9192
spack config add "packages:all:compiler:[[email protected]]"
9293
9394
# Add additional variants for MET packages, different from config/common/packages.yaml
@@ -97,8 +98,8 @@ jobs:
9798
# *DH
9899
99100
# Concretize and check for duplicates
100-
spack concretize 2>&1 | tee log.concretize.apple-clang-14.0.3
101-
${SPACK_STACK_DIR}/util/show_duplicate_packages.py -d log.concretize.apple-clang-14.0.3 -i fms -i crtm -i esmf -i mapl
101+
spack concretize 2>&1 | tee log.concretize.apple-clang-14.0.3-buildcache
102+
${SPACK_STACK_DIR}/util/show_duplicate_packages.py -d log.concretize.apple-clang-14.0.3-buildcache -i fms -i crtm -i esmf -i mapl
102103
103104
# Add and update source cache
104105
spack mirror add local-source file:///Users/ec2-user/spack-stack/source-cache/
@@ -121,29 +122,66 @@ jobs:
121122
# base-env
122123
echo "base-env ..."
123124
spack install --fail-fast --source --no-check-signature base-env 2>&1 | tee log.install.apple-clang-14.0.3.base-env
124-
spack buildcache create -a -u /Users/ec2-user/spack-stack/build-cache/ base-env
125+
spack buildcache create -u /Users/ec2-user/spack-stack/build-cache/ base-env
125126
126127
# jedi-base-env
127128
echo "jedi-base-env ..."
128129
spack install --fail-fast --source --no-check-signature jedi-base-env 2>&1 | tee log.install.apple-clang-14.0.3.jedi-base-env
129-
spack buildcache create -a -u /Users/ec2-user/spack-stack/build-cache/ jedi-base-env
130+
spack buildcache create -u /Users/ec2-user/spack-stack/build-cache/ jedi-base-env
131+
132+
# jedi-ufs-env
133+
echo "jedi-ufs-env ..."
134+
spack install --fail-fast --source --no-check-signature jedi-ufs-env 2>&1 | tee log.install.apple-clang-14.0.3.jedi-ufs-env
135+
spack buildcache create -u /Users/ec2-user/spack-stack/build-cache/ jedi-ufs-env
130136
131137
# the rest
132138
echo "unified-env ..."
133139
spack install --fail-fast --source --no-check-signature 2>&1 | tee log.install.apple-clang-14.0.3.unified-env
134-
spack buildcache create -a -u /Users/ec2-user/spack-stack/build-cache/
140+
spack buildcache create -u /Users/ec2-user/spack-stack/build-cache/
135141
136142
# Remove binary cache for next round of concretization
137143
if [ "$USE_BINARY_CACHE" = true ] ; then
138144
spack mirror rm local-binary
139145
fi
140146
147+
# Remove buildcache config settings
148+
spack config remove config:install_tree:padded_length
149+
150+
# Next steps: synchronize source and build cache to a central/combined mirror?
151+
152+
# Cleanup
153+
spack clean -a
154+
spack env deactivate
155+
156+
- name: create-env
157+
run: |
158+
# Set up spack-stack
159+
source ./setup.sh
160+
# Important!
161+
export SPACK_PYTHON=/usr/bin/python3
162+
export BUILDCACHE_ENVNAME=ue-apple-clang-14.0.3-buildcache
163+
export BUILDCACHE_ENVDIR=$PWD/envs/${BUILDCACHE_ENVNAME}
164+
export ENVNAME=ue-apple-clang-14.0.3
165+
export ENVDIR=$PWD/envs/${ENVNAME}
166+
rsync -av --exclude='install' --exclude='spack.lock' --exclude='.spack_db' ${BUILDCACHE_ENVDIR}/ ${ENVDIR}/
167+
spack env activate ${ENVDIR}
168+
169+
# Concretize and check for duplicates
170+
spack concretize --force 2>&1 | tee log.concretize.apple-clang-14.0.3
171+
${SPACK_STACK_DIR}/util/show_duplicate_packages.py -d log.concretize.apple-clang-14.0.3 -i fms -i crtm -i esmf -i mapl
172+
173+
# Add binary cache back in
174+
spack mirror add local-binary file:///Users/ec2-user/spack-stack/build-cache/
175+
echo "Packages in combined spack build caches:"
176+
spack buildcache list
177+
178+
# Install from cache
179+
spack install --fail-fast --source --no-check-signature 2>&1 | tee log.install.apple-clang-14.0.3.unified-env
180+
141181
# Create modules
142182
spack clean -a
143183
spack module lmod refresh -y
144184
spack stack setup-meta-modules
145-
146-
# Next steps: synchronize source and build cache to a central/combined mirror?
147185
spack env deactivate
148186
149187
# Test environment chaining
@@ -160,7 +198,6 @@ jobs:
160198
161199
- name: test-env
162200
run: |
163-
# Set up homebrew and lmod support
164201
eval "$(/opt/homebrew/bin/brew shellenv)"
165202
source /opt/homebrew/opt/lmod/init/profile
166203
@@ -170,7 +207,7 @@ jobs:
170207
171208
module use ${ENVDIR}/install/modulefiles/Core
172209
module load stack-apple-clang/14.0.3
173-
module load stack-openmpi/5.0.3
210+
module load stack-openmpi/5.0.5
174211
module load stack-python/3.11.7
175212
module available
176213

.github/workflows/ubuntu-ci-x86_64-gnu.yaml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,17 +115,22 @@ jobs:
115115
# base-env
116116
echo "base-env ..."
117117
spack install --fail-fast --source --no-check-signature base-env 2>&1 | tee log.install.gnu-11.4.0-buildcache.base-env
118-
spack buildcache create -a -u /home/ubuntu/spack-stack/build-cache/ base-env
118+
spack buildcache create -u /home/ubuntu/spack-stack/build-cache/ base-env
119119
120120
# jedi-base-env
121121
echo "jedi-base-env ..."
122122
spack install --fail-fast --source --no-check-signature jedi-base-env 2>&1 | tee log.install.gnu-11.4.0-buildcache.jedi-base-env
123-
spack buildcache create -a -u /home/ubuntu/spack-stack/build-cache/ jedi-base-env
123+
spack buildcache create -u /home/ubuntu/spack-stack/build-cache/ jedi-base-env
124+
125+
# jedi-ufs-env
126+
echo "jedi-ufs-env ..."
127+
spack install --fail-fast --source --no-check-signature jedi-ufs-env 2>&1 | tee log.install.gnu-11.4.0-buildcache.jedi-ufs-env
128+
spack buildcache create -u /home/ubuntu/spack-stack/build-cache/ jedi-ufs-env
124129
125130
# the rest
126131
echo "${TEMPLATE} ..."
127132
spack install --fail-fast --source --no-check-signature 2>&1 | tee log.install.gnu-11.4.0-buildcache.${TEMPLATE}
128-
spack buildcache create -a -u /home/ubuntu/spack-stack/build-cache/
133+
spack buildcache create -u /home/ubuntu/spack-stack/build-cache/
129134
130135
# Remove binary cache for next round of concretization
131136
if [ "$USE_BINARY_CACHE" = true ] ; then
@@ -145,6 +150,7 @@ jobs:
145150
146151
- name: create-env
147152
run: |
153+
# Set up spack-stack
148154
source ./setup.sh
149155
export BUILDCACHE_ENVNAME=ue-gcc-11.4.0-buildcache
150156
export BUILDCACHE_ENVDIR=$PWD/envs/${BUILDCACHE_ENVNAME}
@@ -153,20 +159,22 @@ jobs:
153159
rsync -av --exclude='install' --exclude='spack.lock' --exclude='.spack_db' ${BUILDCACHE_ENVDIR}/ ${ENVDIR}/
154160
spack env activate ${ENVDIR}
155161
156-
# Concretize
162+
# Concretize and check for duplicates
157163
spack concretize --force 2>&1 | tee log.concretize.gnu-11.4.0
158164
${SPACK_STACK_DIR}/util/show_duplicate_packages.py -d log.concretize.gnu-11.4.0 -i fms -i crtm -i esmf -i mapl
159165
160-
# Add binary cache back in and reindex it
166+
# Add binary cache back in
161167
spack mirror add local-binary file:///home/ubuntu/spack-stack/build-cache/
162168
echo "Packages in combined spack build caches:"
163169
spack buildcache list
164170
165-
# base-env
166-
echo "base-env ..."
171+
# Install from cache
167172
spack install --fail-fast --source --no-check-signature 2>&1 | tee log.install.gnu-11.4.0.unified-env
168173
174+
# Check shared libraries
169175
${SPACK_STACK_DIR}/util/ldd_check.py $SPACK_ENV 2>&1 | tee log.ldd_check
176+
177+
# Create modules
170178
spack clean -a
171179
spack module tcl refresh -y
172180
spack stack setup-meta-modules
@@ -201,7 +209,7 @@ jobs:
201209
202210
module use ${ENVDIR}/install/modulefiles/Core
203211
module load stack-gcc/11.4.0
204-
module load stack-openmpi/5.0.3
212+
module load stack-openmpi/5.0.5
205213
module load stack-python/3.11.7
206214
module available
207215

.github/workflows/ubuntu-ci-x86_64-intel.yaml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
echo " intel-oneapi-mpi:" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
9494
echo " buildable: false" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
9595
echo " externals:" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
96-
echo " - spec: [email protected]%[email protected]" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
96+
echo " - spec: [email protected]%[email protected] +classic-names" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
9797
echo " prefix: /opt/intel/oneapi" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
9898
9999
# Add external Intel MKL and oneAPI runtime
@@ -155,17 +155,22 @@ jobs:
155155
# base-env
156156
echo "base-env ..."
157157
spack install --fail-fast --source --no-check-signature base-env 2>&1 | tee log.install.intel-2021.10.0-buildcache.base-env
158-
spack buildcache create -a -u /home/ubuntu/spack-stack/build-cache/ base-env
158+
spack buildcache create -u /home/ubuntu/spack-stack/build-cache/ base-env
159159
160160
# jedi-base-env
161161
echo "jedi-base-env ..."
162162
spack install --fail-fast --source --no-check-signature jedi-base-env 2>&1 | tee log.install.intel-2021.10.0-buildcache.jedi-base-env
163-
spack buildcache create -a -u /home/ubuntu/spack-stack/build-cache/ jedi-base-env
163+
spack buildcache create -u /home/ubuntu/spack-stack/build-cache/ jedi-base-env
164+
165+
# jedi-ufs-env
166+
echo "jedi-ufs-env ..."
167+
spack install --fail-fast --source --no-check-signature jedi-ufs-env 2>&1 | tee log.install.intel-2021.10.0-buildcache.jedi-ufs-env
168+
spack buildcache create -u /home/ubuntu/spack-stack/build-cache/ jedi-ufs-env
164169
165170
# the rest
166171
echo "unified-env ..."
167172
spack install --fail-fast --source --no-check-signature 2>&1 | tee log.install.intel-2021.10.0-buildcache.unified-env
168-
spack buildcache create -a -u /home/ubuntu/spack-stack/build-cache/
173+
spack buildcache create -u /home/ubuntu/spack-stack/build-cache/
169174
170175
# Remove binary cache for next round of concretization
171176
if [ "$USE_BINARY_CACHE" = true ] ; then
@@ -183,6 +188,7 @@ jobs:
183188
184189
- name: create-env
185190
run: |
191+
# Set up spack-stack
186192
source ./setup.sh
187193
export BUILDCACHE_ENVNAME=ue-intel-2021.10.0-buildcache
188194
export BUILDCACHE_ENVDIR=$PWD/envs/${BUILDCACHE_ENVNAME}
@@ -191,20 +197,22 @@ jobs:
191197
rsync -av --exclude='install' --exclude='spack.lock' --exclude='.spack_db' ${BUILDCACHE_ENVDIR}/ ${ENVDIR}/
192198
spack env activate ${ENVDIR}
193199
194-
# Concretize
200+
# Concretize and check for duplicates
195201
spack concretize --force 2>&1 | tee log.concretize.intel-2021.10.0
196202
${SPACK_STACK_DIR}/util/show_duplicate_packages.py -d log.concretize.intel-2021.10.0 -i fms -i crtm -i esmf -i mapl
197203
198-
# Add binary cache back in and reindex it
204+
# Add binary cache back in
199205
spack mirror add local-binary file:///home/ubuntu/spack-stack/build-cache/
200206
echo "Packages in combined spack build caches:"
201207
spack buildcache list
202208
203-
# base-env
204-
echo "base-env ..."
209+
# Install from cache
205210
spack install --fail-fast --source --no-check-signature 2>&1 | tee log.install.intel-2021.10.0.unified-env
206211
212+
# Check shared libraries
207213
${SPACK_STACK_DIR}/util/ldd_check.py $SPACK_ENV 2>&1 | tee log.ldd_check
214+
215+
# Create modules
208216
spack clean -a
209217
spack module tcl refresh -y
210218
spack stack setup-meta-modules

.github/workflows/ubuntu-ci-x86_64-oneapi.yaml

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -161,17 +161,22 @@ jobs:
161161
# base-env
162162
echo "base-env ..."
163163
spack install --fail-fast --source --no-check-signature base-env 2>&1 | tee log.install.oneapi-2024.2.0-buildcache.base-env
164-
spack buildcache create -a -u /home/ubuntu/spack-stack/build-cache/ base-env
164+
spack buildcache create -u /home/ubuntu/spack-stack/build-cache/ base-env
165165
166166
# jedi-base-env
167167
echo "jedi-base-env ..."
168168
spack install --fail-fast --source --no-check-signature jedi-base-env 2>&1 | tee log.install.oneapi-2024.2.0-buildcache.jedi-base-env
169-
spack buildcache create -a -u /home/ubuntu/spack-stack/build-cache/ jedi-base-env
169+
spack buildcache create -u /home/ubuntu/spack-stack/build-cache/ jedi-base-env
170+
171+
# jedi-ufs-env
172+
echo "jedi-ufs-env ..."
173+
spack install --fail-fast --source --no-check-signature jedi-ufs-env 2>&1 | tee log.install.oneapi-2024.2.0-buildcache.jedi-ufs-env
174+
spack buildcache create -u /home/ubuntu/spack-stack/build-cache/ jedi-ufs-env
170175
171176
# the rest
172177
echo "unified-env ..."
173178
spack install --fail-fast --source --no-check-signature 2>&1 | tee log.install.oneapi-2024.2.0-buildcache.unified-env
174-
spack buildcache create -a -u /home/ubuntu/spack-stack/build-cache/
179+
spack buildcache create -u /home/ubuntu/spack-stack/build-cache/
175180
176181
# Remove binary cache for next round of concretization
177182
if [ "$USE_BINARY_CACHE" = true ] ; then
@@ -189,6 +194,7 @@ jobs:
189194
190195
- name: create-env
191196
run: |
197+
# Set up spack-stack
192198
source ./setup.sh
193199
export BUILDCACHE_ENVNAME=ue-oneapi-2024.2.0-buildcache
194200
export BUILDCACHE_ENVDIR=$PWD/envs/${BUILDCACHE_ENVNAME}
@@ -197,39 +203,27 @@ jobs:
197203
rsync -av --exclude='install' --exclude='spack.lock' --exclude='.spack_db' ${BUILDCACHE_ENVDIR}/ ${ENVDIR}/
198204
spack env activate ${ENVDIR}
199205
200-
# Concretize
206+
# Concretize and check for duplicates
201207
spack concretize --force 2>&1 | tee log.concretize.oneapi-2024.2.0
202208
${SPACK_STACK_DIR}/util/show_duplicate_packages.py -d log.concretize.oneapi-2024.2.0 -i fms -i crtm -i esmf -i mapl
203209
204-
# Add binary cache back in and reindex it
210+
# Add binary cache back in
205211
spack mirror add local-binary file:///home/ubuntu/spack-stack/build-cache/
206212
echo "Packages in combined spack build caches:"
207213
spack buildcache list
208214
209-
# base-env
210-
echo "base-env ..."
215+
# Install from cache
211216
spack install --fail-fast --source --no-check-signature 2>&1 | tee log.install.oneapi-2024.2.0.unified-env
212217
218+
# Check shared libraries
213219
${SPACK_STACK_DIR}/util/ldd_check.py $SPACK_ENV 2>&1 | tee log.ldd_check
220+
221+
# Create modules
214222
spack clean -a
215223
spack module tcl refresh -y
216224
spack stack setup-meta-modules
217225
spack env deactivate
218226
219-
### # Test environment chaining
220-
### echo "Test environment chaining"
221-
### spack stack create env --name chaintest --template empty --site linux.default --upstream ${ENVDIR}/install --compiler intel
222-
### # Retain config from upstream so we don't have to rebuild:
223-
### cp -r ${ENVDIR}/{site,common} $PWD/envs/chaintest/.
224-
### spack env activate ${PWD}/envs/chaintest
225-
### # Pin gmake to avoid duplicate packages (excluded gmake from spack external find above)
226-
### spack config add "packages:gmake:require:'@:4.2'"
227-
### spack add [email protected]%oneapi
228-
### spack concretize | tee envs/chaintest/log.concretize
229-
### unwanted_duplicates=$(( cat envs/chaintest/log.concretize | grep -E '^ - ' | grep -Fv '[email protected]' || true ) | wc -l)
230-
### if [ ${unwanted_duplicates} -gt 0 ]; then echo "Environment chaining test failed"; exit 1; fi
231-
### spack env deactivate
232-
233227
- name: test-env
234228
run: |
235229
source /etc/profile.d/modules.sh

configs/common/packages.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ packages:
102102
# Note: Uncommenting this entry will break
103103
# the container builds.
104104
#require: '@2.11.0'
105+
# To avoid duplicate packages being built
106+
gmake:
107+
require:
108+
- one_of: ['@=4.2.1', '@=4.4.1']
105109
grib-util:
106110
require: '@1.4.0'
107111
gsibec:
@@ -138,6 +142,10 @@ packages:
138142
mapl:
139143
require: '@2.46.3 ~shared ~f2py'
140144
variants: '+pflogger'
145+
# To avoid duplicate packages being built
146+
meson:
147+
require:
148+
- '@1.5.1:'
141149
# If making changes here, also check the Discover site configs and the CI workflows
142150
met:
143151
require: '@11.1.1 +python +grib2'
@@ -170,7 +178,7 @@ packages:
170178
odc:
171179
require: '@1.5.2 ~fortran'
172180
openblas:
173-
require: '@0.3.24 +noavx512'
181+
require: '@0.3.24'
174182
openmpi:
175183
require: '~internal-hwloc +two_level_namespace'
176184
openssl:

0 commit comments

Comments
 (0)