Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 15 additions & 23 deletions configs/sites/tier2/aws-ubuntu2404/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ cd /opt/spack-stack
source setup.sh
# Swap default module type for default linux.
sed -i 's/tcl/lmod/g' configs/sites/tier2/linux.default/modules.yaml
sed -i "s/- '%gcc'/- '%gcc_toolchain'/" ./common/packages.yaml
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this snuck into the docs in 2.0 even though it wasn't used.

spack stack create env --site linux.default --template unified-dev --name unified-gcc --compiler gcc
cd envs/unified-gcc
spack env activate -p .
Expand All @@ -145,29 +144,12 @@ spack external find --scope system \
--exclude cmake \
--exclude curl --exclude openssl \
--exclude openssh --exclude python
spack external find --scope system wget
spack external find --scope system grep
spack compiler find --scope system
export SPACK_DISABLE_LOCAL_CONFIG=true
unset SPACK_SYSTEM_CONFIG_PATH
# ACTION: Edit the site/compilers.yaml with the following.
# 1) Delete or comment gcc-13 refs and preserve only gcc-12
# 2) Delete or comment clang refs.
# ACTION: Edit the site/packages.yaml and add these packages
# If not present.
cat << 'EOF' >> $PWD/site/packages.yaml
gcc:
buildable: false
externals:
- spec: gcc@11.4.0
prefix: /usr
qt:
buildable: false
externals:
- spec: qt@5.15.3
prefix: /usr
version: [5.15.3]
EOF

# Continue configuration.
spack config add "packages:all:prefer:['%gcc']"
Expand All @@ -176,6 +158,9 @@ spack config add "packages:fontconfig:variants:+pic"
spack config add "packages:pixman:variants:+pic"
spack config add "packages:cairo:variants:+pic"
spack config add "packages:met:variants:+python +grib2 +graphics +lidar2nc +modis"
spack config add "packages:ewok-env:require:[+ecflow]"
# Pin py-netcdf4
spack config add "packages:py-netcdf4:require:[\"@1.7.2\"]"

# Concretize and install
spack concretize 2>&1 | tee log.concretize
Expand Down Expand Up @@ -285,6 +270,13 @@ spack external find --scope system grep
# and we are using an external module load for this.
# - Disable "buildable" on all intel modules.
cat << 'EOF' >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
intel-oneapi-runtime:
buildable: false
externals:
- spec: intel-oneapi-runtime@2025.3.0
prefix: /opt/intel/oneapi
modules:
- compiler-rt/2025.3.0
Comment on lines +273 to +279
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am very surprised that this still works. I couldn't get anything to concretize without duplicates or errors if I had a non-buildable runtime library for any of the compilers.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting indeed! This is definitely working in my case. Although I did experience that issue with gcc runtime.

$ cat log.concretize  | grep runtime
 -   x4mnxf4          ^gcc-runtime@13.3.0 build_system=generic platform=linux os=ubuntu24.04 target=icelake
[e]  uc6376q      ^intel-oneapi-runtime@2025.3.0 build_system=generic platform=linux os=ubuntu24.04 target=x86_64

intel-oneapi-mkl:
buildable: false
externals:
Expand Down Expand Up @@ -362,10 +354,10 @@ cat << 'EOF' >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
mpi: [intel-oneapi-mpi@2021.17]
met:
variants: +python +grib2 +graphics +lidar2nc +modis
mpi:
openmpi:
buildable: false
mpich:
buildable: false
require:
- intel-oneapi-mpi@2021.17
py-scipy:
require:
#- '%c,cxx,fortran=gcc'
Expand All @@ -383,7 +375,7 @@ EOF
spack concretize 2>&1 | tee log.concretize
${SPACK_STACK_DIR}/util/show_duplicate_packages.py
spack install --fail-fast -j 12 2>&1 | tee log.install
spack module lmod refresh
spack module lmod refresh && \
spack stack setup-meta-modules

cat << 'EOF' >> /etc/profile.d/z01_lmod.sh
Expand Down Expand Up @@ -443,7 +435,7 @@ cd jedi-bundle
mkdir build && cd build
ecbuild ../
make update
make -j10
make -j10 2>&1 | tee log.make
ctest
```

Expand Down
72 changes: 41 additions & 31 deletions configs/sites/tier2/aws-ubuntu2404/packages.yaml
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Future changes to this file will be easier to parse as I'm now maintaining them in alphabetical order (if you squint)

Original file line number Diff line number Diff line change
@@ -1,66 +1,76 @@
packages:
gmake:
buildable: false
autoconf:
externals:
- spec: gmake@4.3
- spec: autoconf@2.71
prefix: /usr
grep:
automake:
externals:
- spec: grep@3.11
- spec: automake@1.16.5
prefix: /usr
wget:
binutils:
externals:
- spec: wget@1.21.4
- spec: binutils@2.42+gold~headers
prefix: /usr
perl:
coreutils:
externals:
- spec: perl@5.38.2~cpanm+opcode+open+shared+threads
- spec: coreutils@9.4
prefix: /usr
diffutils:
externals:
- spec: diffutils@3.10
prefix: /usr
findutils:
externals:
- spec: findutils@4.9.0
prefix: /usr
coreutils:
flex:
externals:
- spec: coreutils@9.4
- spec: flex@2.6.4+lex
prefix: /usr
pkgconf:
gawk:
externals:
- spec: pkgconf@1.8.1
- spec: gawk@5.2.1
prefix: /usr
libtool:
gettext:
externals:
- spec: libtool@2.4.7
- spec: gettext@0.21
prefix: /usr
autoconf:
git:
externals:
- spec: autoconf@2.71
- spec: git@2.43.0~tcltk
prefix: /usr
automake:
git-lfs:
externals:
- spec: automake@1.16.5
- spec: git-lfs@3.4.1
prefix: /usr
gawk:
gmake:
externals:
- spec: gawk@5.2.1
- spec: gmake@4.3
prefix: /usr
git:
groff:
externals:
- spec: git@2.43.0~tcltk
- spec: groff@1.23.0
prefix: /usr
flex:
libtool:
externals:
- spec: flex@2.6.4+lex
- spec: libtool@2.4.7
prefix: /usr
sed:
m4:
externals:
- spec: sed@4.9
- spec: m4@1.4.19
prefix: /usr
diffutils:
perl:
externals:
- spec: diffutils@3.10
- spec: perl@5.38.2~cpanm+opcode+open+shared+threads
prefix: /usr
groff:
pkgconf:
externals:
- spec: groff@1.23.0
- spec: pkgconf@1.8.1
prefix: /usr
sed:
externals:
- spec: sed@4.9
prefix: /usr
tar:
externals:
- spec: tar@1.35
6 changes: 5 additions & 1 deletion configs/sites/tier2/aws-ubuntu2404/packages_gcc.yaml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know you were using toolchains originally, and maybe that's why you didn't need

all:
require:
- any_of: ['%intel-oneapi-compilers@=2025.3.0']
when: '%intel-oneapi-compilers'
- any_of: ['%gcc@=11.2.0']
when: '%gcc'
or the equivalent for gcc?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately yes. This PR is kind of a mix. The real site config uses toolchains but that included a number of changes (including changes to the configs/common/...) that would have broken other sites if they were submitted.

So this PR is me doing my best to submit the ec2 config changes without breaking every other site simultaneously.

Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
packages:
gcc:
buildable: false
externals:
- spec: gcc@13.3.0 languages:='c,c++,fortran'
prefix: /usr
Expand All @@ -8,4 +9,7 @@ packages:
c: /usr/bin/gcc
cxx: /usr/bin/g++
fortran: /usr/bin/gfortran
buildable: false
gcc-runtime:
externals:
- spec: gcc-runtime@13.3.0
prefix: /usr