From f75bc7558bf4f0cc01eb13d7f3a61eacb0be421f Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Wed, 17 Jun 2026 13:11:27 -0700 Subject: [PATCH 01/17] Temporarily disable pushing the changes output to the PR branch Signed-off-by: Alec Scott --- .github/workflows/outputs.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/outputs.yml b/.github/workflows/outputs.yml index 716c520ae5..f5b97f15b9 100644 --- a/.github/workflows/outputs.yml +++ b/.github/workflows/outputs.yml @@ -51,11 +51,11 @@ jobs: run: | git diff HEAD outputs/ - - name: Push modified files to branch - if: ( github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork ) - run: | - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - git add outputs/ - git commit -m "Update generated outputs on behalf of [@${{ github.actor }}]" - git push + # - name: Push modified files to branch + # if: ( github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork ) + # run: | + # git config user.name "github-actions[bot]" + # git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + # git add outputs/ + # git commit -m "Update generated outputs on behalf of [@${{ github.actor }}]" + # git push From d2d313cf5dacf5c1c93946157cdca00d13430801 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Thu, 18 Jun 2026 08:51:29 -0700 Subject: [PATCH 02/17] Bump container to use Ubuntu 26.04 Signed-off-by: Alec Scott --- container/Dockerfile | 8 ++++---- container/packages.yaml | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/container/Dockerfile b/container/Dockerfile index 28f870265e..c67fbe742f 100644 --- a/container/Dockerfile +++ b/container/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/spack/tutorial-ubuntu-22.04 +FROM ghcr.io/spack/tutorial-ubuntu-26.04 ENV DEBIAN_FRONTEND=noninteractive @@ -13,12 +13,12 @@ RUN apt-get update -y && \ vim \ rclone -# Remove GCC 12 from container -RUN apt-get remove -y gcc-12 +# Remove GCC 14 from container +RUN apt-get remove -y gcc-14 # Download the buildcache RUN mkdir /mirror -RUN rclone copy :s3:spack-binaries/v2025.11.0/tutorial /mirror +RUN rclone copy :s3:spack-binaries/develop/tutorial /mirror RUN chmod -R go+r /mirror diff --git a/container/packages.yaml b/container/packages.yaml index 87d61bd1cc..a076e47d1e 100644 --- a/container/packages.yaml +++ b/container/packages.yaml @@ -1,4 +1,5 @@ packages: all: - target: [x86_64_v3] - + target: + - x86_64_v2 + variants: ~nls From 478a53b3bd8c457f88a6f880086696927ff1cc36 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Thu, 18 Jun 2026 09:24:33 -0700 Subject: [PATCH 03/17] Cut the develop cache down from 8GB to 3GB Signed-off-by: Alec Scott --- container/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container/Dockerfile b/container/Dockerfile index c67fbe742f..dd7d5c67c1 100644 --- a/container/Dockerfile +++ b/container/Dockerfile @@ -18,7 +18,7 @@ RUN apt-get remove -y gcc-14 # Download the buildcache RUN mkdir /mirror -RUN rclone copy :s3:spack-binaries/develop/tutorial /mirror +RUN rclone copy --max-age 9d :s3:spack-binaries/develop/tutorial /mirror RUN chmod -R go+r /mirror From 1d3390cda2dffa2823d8c94e9039f2bfc7d17f29 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Thu, 18 Jun 2026 09:42:44 -0700 Subject: [PATCH 04/17] Enforce Spack owns /home/spack Signed-off-by: Alec Scott --- container/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/container/Dockerfile b/container/Dockerfile index dd7d5c67c1..f89937c875 100644 --- a/container/Dockerfile +++ b/container/Dockerfile @@ -27,7 +27,8 @@ COPY config.yaml /etc/spack/config.yaml COPY concretizer.yaml /etc/spack/concretizer.yaml RUN useradd -ms /bin/bash spack && \ - chmod -R go+r /etc/spack + chmod -R go+r /etc/spack && \ + chown -R spack:spack /home/spack USER spack From c65df379cb2a84a956897fe11f4fab137cd2e38a Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Thu, 18 Jun 2026 11:53:53 -0700 Subject: [PATCH 05/17] Allow all users to read/write to container cached home Signed-off-by: Alec Scott --- .github/workflows/outputs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/outputs.yml b/.github/workflows/outputs.yml index f5b97f15b9..3a6f0b5088 100644 --- a/.github/workflows/outputs.yml +++ b/.github/workflows/outputs.yml @@ -43,7 +43,7 @@ jobs: - name: Re-generate outputs from tutorial scripts run: | chmod -R a+w outputs - mkdir spack-home && sudo chown -R 1000:1000 spack-home + mkdir spack-home && sudo chmod -R a+rwx spack-home DOCKER_RUN_OPTS="-e COLUMNS=94 -e COLIFY_SIZE=24x94 -v $(pwd)/spack-home:/home/spack" make -C outputs -j $(nproc) DOCKER_RUN_OPTS="$DOCKER_RUN_OPTS" container=ghcr.io/spack/tutorial From c39e1052a86006f5f4ea63f39cd51b5a002720d5 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Thu, 18 Jun 2026 15:03:00 -0700 Subject: [PATCH 06/17] Swap to releases/v1.2 Signed-off-by: Alec Scott --- container/Dockerfile | 5 ++--- outputs/defs.sh | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/container/Dockerfile b/container/Dockerfile index f89937c875..3c631b124b 100644 --- a/container/Dockerfile +++ b/container/Dockerfile @@ -18,7 +18,7 @@ RUN apt-get remove -y gcc-14 # Download the buildcache RUN mkdir /mirror -RUN rclone copy --max-age 9d :s3:spack-binaries/develop/tutorial /mirror +RUN rclone copy --max-age 10d :s3:spack-binaries/develop/tutorial /mirror RUN chmod -R go+r /mirror @@ -27,8 +27,7 @@ COPY config.yaml /etc/spack/config.yaml COPY concretizer.yaml /etc/spack/concretizer.yaml RUN useradd -ms /bin/bash spack && \ - chmod -R go+r /etc/spack && \ - chown -R spack:spack /home/spack + chmod -R go+r /etc/spack USER spack diff --git a/outputs/defs.sh b/outputs/defs.sh index b9527403a8..f988db1877 100755 --- a/outputs/defs.sh +++ b/outputs/defs.sh @@ -14,8 +14,8 @@ fi raw_outputs="${PROJECT}/raw" # used by scripts -tutorial_branch=releases/v1.1 -packages_release=v2025.11.0 +tutorial_branch=releases/v1.2 +packages_release=develop print_status() { printf "\n%b: %s\n\n" "\033[1;35m$1\033[0m" "$2" From b438ae45c1010d8a0437dca63fbe2a9db97cf7c5 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Thu, 18 Jun 2026 17:23:17 -0700 Subject: [PATCH 07/17] Update to use --yes-to-all for importing keys Signed-off-by: Alec Scott --- outputs/basics.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/outputs/basics.sh b/outputs/basics.sh index db2e3a26b7..47437d9f37 100755 --- a/outputs/basics.sh +++ b/outputs/basics.sh @@ -31,7 +31,7 @@ example basics/gmake "spack install gmake" example basics/compiler-list "spack compilers" example basics/mirror "spack mirror add tutorial /mirror" -example basics/mirror "spack buildcache keys --install --trust" +example basics/mirror "spack buildcache keys --install --trust --yes-to-all" example basics/zlib-clang "spack install zlib-ng %clang" From 6d119607e6b20680acb2fa932669b0b86d0d7cfb Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 18 Jun 2026 20:30:42 -0700 Subject: [PATCH 08/17] Update the basics section Signed-off-by: Alec Scott --- outputs/basics.sh | 80 ++++++++++++++++++++++------------------------- 1 file changed, 38 insertions(+), 42 deletions(-) diff --git a/outputs/basics.sh b/outputs/basics.sh index 47437d9f37..c7c6ccc2b2 100755 --- a/outputs/basics.sh +++ b/outputs/basics.sh @@ -9,7 +9,7 @@ project="$(dirname "$0")" export SPACK_COLOR=never -# basic installation +# Setting Up Spack example basics/clone "git clone --depth=2 --branch=$tutorial_branch https://github.com/spack/spack.git ~/spack" example basics/clone "cd ~/spack" @@ -21,61 +21,64 @@ spack config add "config:suppress_gpg_warnings:true" example basics/source-setup ". share/spack/setup-env.sh" -# spack list +spack repo update + +# Installing Packages example basics/list "spack list" example basics/list-py "spack list 'py-*'" # spack install -example basics/gmake "spack install gmake" +example --tee basics/gmake "spack install gmake" example basics/compiler-list "spack compilers" -example basics/mirror "spack mirror add tutorial /mirror" example basics/mirror "spack buildcache keys --install --trust --yes-to-all" -example basics/zlib-clang "spack install zlib-ng %clang" - +# The Spec Syntax example basics/versions-zlib "spack versions zlib-ng" -example basics/zlib-2.0.7 "spack install zlib-ng@2.0.7" -example basics/zlib-gcc-10 "spack install zlib-ng %gcc@10" +example --tee basics/zlib-2.0.7 "spack install zlib-ng@2.0.7" -example basics/zlib-O3 "spack install zlib-ng@2.0.7 cflags=-O3" - -example basics/find "spack find" -example basics/find-lf "spack find -lf" +example basics/info-zlib "spack info --no-dependencies --no-versions zlib-ng" -example basics/tcl "spack install tcl" +example --tee basics/zlib-ipo "spack install zlib-ng +ipo" +example --tee basics/zlib-build-type "spack install zlib-ng build_type=Debug" -example basics/tcl-zlib-clang "spack install tcl ^zlib-ng@2.0.7 %clang" +example --tee basics/zlib-clang "spack install zlib-ng %clang" +example --tee basics/zlib-gcc-14 "spack install zlib-ng %gcc@14" -zlib_hash=$(spack find --format "{hash:3}" zlib-ng cflags=-O3) -example basics/tcl-zlib-hash "spack install tcl ^/${zlib_hash}" +example basics/spec-tcl-zlib-clang "spack spec -l tcl ^zlib-ng@2.0.7 %clang" +example --tee basics/tcl-zlib-clang "spack install tcl ^zlib-ng@2.0.7 %clang" -example basics/find-ldf "spack find -ldf" +# Refer to the zlib-ng@2.0.7 %clang build we just installed by its hash +zlib_hash=$(spack find --format "{hash:3}" zlib-ng@2.0.7 %clang) +example basics/spec-tcl-zlib-hash "spack spec tcl ^/${zlib_hash}" example basics/graph-tcl "spack graph tcl" +example basics/providers-mpi "spack providers mpi" example basics/hdf5-spec "spack spec hdf5" -example basics/hdf5 "spack install hdf5" -example basics/hdf5-no-mpi "spack install hdf5~mpi" - -example basics/hdf5-hl-mpi "spack install hdf5+hl+mpi ^mpich" - -example basics/find-ldf-2 "spack find -ldf" - -example basics/trilinos "spack install trilinos" - -example basics/trilinos-hdf5 "spack install trilinos +hdf5 ^hdf5+hl+mpi ^mpich" +example --tee basics/hdf5 "spack install hdf5" +example --tee basics/hdf5-no-mpi "spack install hdf5~mpi" -example basics/find-d-trilinos "spack find -d trilinos" - -example basics/graph-trilinos "spack graph trilinos" +example --tee basics/hdf5-mpich "spack install hdf5 ^mpich" +example basics/spec-hdf5-compilers "spack spec hdf5 %c,cxx=clang %fortran=gcc" +# Querying Installations +example basics/find "spack find" +example basics/find-l "spack find -l" example basics/find-d-tcl "spack find -d tcl" +example basics/find-dep-mpich "spack find ^mpich" +example basics/find-px "spack find -px" +# A Realistic Example +example --tee basics/trilinos "spack install trilinos" +example --tee basics/trilinos-hdf5 "spack install trilinos +hdf5 ^mpich" +example basics/trilinos-find-mpich "spack find ^mpich" + +# Uninstalling Packages example basics/find-zlib "spack find zlib-ng" -example basics/uninstall-zlib "spack uninstall -y zlib-ng %gcc@10" +example basics/uninstall-zlib "spack uninstall -y zlib-ng %gcc@14" example basics/find-lf-zlib "spack find -lf zlib-ng" @@ -88,18 +91,11 @@ example --expect-error basics/uninstall-ambiguous "spack uninstall trilinos" trilinos_hash="$(spack find --format '{hash:3}' trilinos ^openmpi)" echo y | example basics/uninstall-specific "spack uninstall /$trilinos_hash" -example basics/find-dep-mpich "spack find ^mpich" - -example basics/find-O3 "spack find cflags=-O3" - -example basics/find-px "spack find -px" - -example basics/compilers "spack compilers" - -example basics/install-gcc-12.1.0 "spack install gcc@12" +# Customizing Compilers +example --tee basics/install-gcc-16 "spack install gcc@16" example basics/compilers-2 "spack compilers" -example basics/spec-zziplib "spack spec zziplib %gcc@12" +example basics/spec-zziplib "spack spec zziplib %gcc@16" -echo y | example basics/compiler-uninstall 'spack uninstall gcc@12' +example basics/compiler-uninstall 'spack uninstall -y gcc@16' From 4f1a0cd548929de1aa1ee491cdaef53fc8b553e3 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 18 Jun 2026 20:36:01 -0700 Subject: [PATCH 09/17] Update the environments section Signed-off-by: Alec Scott --- outputs/environments.sh | 141 +++++++++++++++------------------------- 1 file changed, 52 insertions(+), 89 deletions(-) diff --git a/outputs/environments.sh b/outputs/environments.sh index 321a09cacc..0fa9ab168b 100755 --- a/outputs/environments.sh +++ b/outputs/environments.sh @@ -11,34 +11,10 @@ export SPACK_COLOR=never . "$project/init_spack.sh" . share/spack/setup-env.sh -#### -# Introduction for "basic" installation if basics section not being used -#### -#example environments/clone "git clone --depth=100 --branch=$tutorial_branch https://github.com/spack/spack.git ~/spack" -#example environments/clone "cd ~/spack" - -#cd ~/spack || exit -#export SPACK_ROOT=~/spack - -#. share/spack/setup-env.sh -#spack config add "config:suppress_gpg_warnings:true" - -#example environments/source-setup ". share/spack/setup-env.sh" - -#example environments/gmake "spack install gmake" - -#example environments/gmake-1 "spack install gmake@4.3" - -#example environments/find-gmake "spack find -p gmake" - -#example environments/ls-dot-spack 'ls "$(spack location -i gmake@4.4)/.spack"' - -#example environments/mirror "spack mirror add tutorial /mirror" +# spack mirror add --unsigned tutorial /mirror #example environments/mirror "spack buildcache keys --install --trust" -#### -# Usual Environment output -#### +# Working with Environments example environments/find-no-env-1 "spack find" @@ -58,64 +34,25 @@ spack env deactivate example environments/env-status-2 "spack env status" example environments/env-status-2 "spack find" -example --tee environments/env-fail-install-1 "spack env activate myproject" spack env activate myproject -example --expect-error environments/env-fail-install-1 "spack install tcl" example environments/env-add-1 "spack add tcl" example environments/env-add-1 "spack add trilinos" -example environments/env-add-1 "spack find" -example environments/env-install-1 "spack install" +example environments/env-add-find-1 "spack find" -example environments/find-env-2 "spack find" +example environments/env-concretize-1 "spack concretize" -example environments/use-tcl-1 "which tclsh" +example environments/env-find-c-1 "spack find -c" -example environments/env-create-2 "spack env create myproject2" -example --tee environments/env-create-2 "spack env activate myproject2" -spack env activate myproject2 -example environments/env-create-2 "spack add scr trilinos" -example environments/env-create-2 "spack install" -example environments/env-create-2 "spack find" +example --tee environments/env-install-1 "spack install" -example --expect-error environments/env-uninstall-1 "spack uninstall -y trilinos" -example environments/env-uninstall-1 "spack find" +example environments/find-env-2 "spack find" -example environments/env-remove-1 "spack remove trilinos" -example environments/env-remove-1 "spack find" -example environments/env-remove-1 "spack concretize" -example environments/env-remove-1 "spack find" +example environments/use-tcl-1 "which tclsh" -example --tee environments/env-swap-1 "spack env activate myproject" +example --tee environments/show-mpicc-1 "spack env activate myproject" spack env activate myproject -example environments/env-swap-1 "spack find" - -example environments/config-get-1 'EDITOR=cat spack config edit' - -# The file is edited by hand here -# We mock that by using `spack config add` -spack config add packages:mpi:require:[mpich] - -example environments/concretize-f-1 "spack concretize --force" -# spack install - -example --tee environments/incremental-1 "spack env activate --temp" -spack env activate --temp -example environments/incremental-1 "spack install --add python" - -# v1.1: Spack concretizer regression causes the following command to hang -# seemingly indefinitely. (Have tested waiting 1h 15m before giving up.) -# example environments/incremental-1 "spack install --add py-numpy@1.20 2>&1 | tail -n1" - -# These commands should be fine, although we had a transient failure with them -example environments/incremental-2 "spack add py-numpy@1.20" -example environments/incremental-2 "spack concretize -f" - -spack env deactivate - -example --tee environments/show-mpicc-1 "spack env activate myproject2" -spack env activate myproject2 example environments/show-mpicc-1 "spack env status" example environments/show-mpicc-1 "which mpicc" @@ -145,16 +82,55 @@ EOF example environments/use-mpi-1 'mpicc ./mpi-hello.c -I$(spack location -i zlib-ng)/include' example environments/use-mpi-1 "mpirun -n 2 ./a.out" -example environments/myproject-zlib-ng-1 "spack find zlib-ng" +example environments/env-create-2 "spack env create myproject2" +example --tee environments/env-create-2 "spack env activate myproject2" +spack env activate myproject2 +example environments/env-create-2 "spack add scr trilinos" +# concretize + install are shown as a code-block in the docs; run them here without capturing +spack concretize +spack install + +example environments/env-create-2-find "spack find" + +# Basic removal workflow on scr (used only by myproject2), split for the docs +example environments/env-remove-scr-1 "spack remove scr" +example environments/env-remove-scr-2 "spack find" +example environments/env-remove-scr-3 "spack concretize" +example environments/env-remove-scr-4 "spack find" + +# trilinos is shared with myproject: uninstalling it is refused +example --expect-error environments/env-uninstall-1 "spack uninstall -y trilinos" + +# spack remove takes it out of myproject2 without deleting the shared install +example environments/env-remove-1 "spack remove trilinos" +example environments/env-remove-1 "spack concretize" + +example --tee environments/env-swap-1 "spack env activate myproject" +spack env activate myproject +example environments/env-swap-1 "spack find" + +# Environments on disk example --tee environments/filenames-1 "spack cd -e myproject" spack cd -e myproject example environments/filenames-1 "pwd" example environments/filenames-1 "ls" - +example environments/cat-config-1 "cat spack.yaml" +example environments/lockfile-1 "jq < spack.lock | head -30" example environments/env-list-2 "spack env list" +cd + +# Configuring environments + +# The file is edited by hand here +# We mock that by using `spack config add` +spack config add packages:mpi:require:[mpich] -example environments/cat-config-1 "cat spack.yaml" +example environments/concretize-1 "spack concretize" +example environments/concretize-f-1 "spack concretize --force" +# spack install + +# Reproducing builds example environments/independent-create-1 "cd" cd || exit @@ -163,25 +139,12 @@ example environments/independent-create-1 "cd code" cd code || exit example environments/independent-create-1 "spack env create -d ." -example environments/independent-create-2 "ls" -example environments/independent-create-2 "cat spack.yaml" - -example environments/env-list-3 "spack env list" - example --tee environments/install-independent-1 "spack env activate ." spack env activate . # mock a hand-edit from before we activated spack add trilinos spack add openmpi -example environments/install-independent-1 "spack install" - -example environments/add-independent-1 "spack add hdf5@5.5.1" -example environments/add-independent-1 "cat spack.yaml" - -example environments/remove-independent-1 "spack remove hdf5" -example environments/remove-independent-1 "cat spack.yaml" - -example environments/lockfile-1 "jq < spack.lock | head -30" +example --tee environments/install-independent-1 "spack install" example environments/create-from-file-1 "spack env create abstract spack.yaml" From a44bd66041016ec5eafda5c7d1ca555edc1634da Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Thu, 18 Jun 2026 20:43:30 -0700 Subject: [PATCH 10/17] Add binary cache before installing keys Signed-off-by: Alec Scott --- outputs/basics.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/outputs/basics.sh b/outputs/basics.sh index c7c6ccc2b2..63aff41cbe 100755 --- a/outputs/basics.sh +++ b/outputs/basics.sh @@ -32,6 +32,7 @@ example --tee basics/gmake "spack install gmake" example basics/compiler-list "spack compilers" +example basics/mirror "spack mirror add tutorial /mirror" example basics/mirror "spack buildcache keys --install --trust --yes-to-all" # The Spec Syntax From 33f48e5a994338e9e9ee80bc1ab18c5f2f6bf329 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Thu, 18 Jun 2026 20:57:09 -0700 Subject: [PATCH 11/17] Keep gcc@14 in the container as an external compiler Signed-off-by: Alec Scott --- container/Dockerfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/container/Dockerfile b/container/Dockerfile index 3c631b124b..9a98b07748 100644 --- a/container/Dockerfile +++ b/container/Dockerfile @@ -13,9 +13,6 @@ RUN apt-get update -y && \ vim \ rclone -# Remove GCC 14 from container -RUN apt-get remove -y gcc-14 - # Download the buildcache RUN mkdir /mirror RUN rclone copy --max-age 10d :s3:spack-binaries/develop/tutorial /mirror From e52aaeb8c57cdfb53455e7b97e692ead43ea7768 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Thu, 18 Jun 2026 23:13:33 -0700 Subject: [PATCH 12/17] Swap to spack packages v2026.06 release branch Signed-off-by: Alec Scott --- container/Dockerfile | 2 +- outputs/defs.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/container/Dockerfile b/container/Dockerfile index 9a98b07748..9396787732 100644 --- a/container/Dockerfile +++ b/container/Dockerfile @@ -15,7 +15,7 @@ RUN apt-get update -y && \ # Download the buildcache RUN mkdir /mirror -RUN rclone copy --max-age 10d :s3:spack-binaries/develop/tutorial /mirror +RUN rclone copy :s3:spack-binaries/releases/v2026.06/tutorial /mirror RUN chmod -R go+r /mirror diff --git a/outputs/defs.sh b/outputs/defs.sh index f988db1877..2e1eff3969 100755 --- a/outputs/defs.sh +++ b/outputs/defs.sh @@ -15,7 +15,7 @@ raw_outputs="${PROJECT}/raw" # used by scripts tutorial_branch=releases/v1.2 -packages_release=develop +packages_release=releases/v2026.06 print_status() { printf "\n%b: %s\n\n" "\033[1;35m$1\033[0m" "$2" From 74737c8bd03c273a55763f9ffbe7240b77d8bd9a Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 18 Jun 2026 23:20:37 -0700 Subject: [PATCH 13/17] Update the stacks section Signed-off-by: Alec Scott --- outputs/stacks.sh | 55 ++++++++++++++++++++--------------------------- 1 file changed, 23 insertions(+), 32 deletions(-) diff --git a/outputs/stacks.sh b/outputs/stacks.sh index d34eb22d68..7566cfa954 100755 --- a/outputs/stacks.sh +++ b/outputs/stacks.sh @@ -15,44 +15,37 @@ spack env activate --create ~/stacks fake_example stacks/setup-0 "spack env activate --create ~/stacks" "/bin/true" example stacks/setup-0 "spack env status" -example stacks/setup-1 "spack add gcc@12 %gcc@11" -example stacks/setup-1 "spack env view disable" -fake_example stacks/setup-1 "spack config edit" "/bin/true" +# Simple compiler-only environment (before introducing spec groups) +cat "$project/stacks/examples/compiler.spack.stack.yaml" > ~/stacks/spack.yaml +example stacks/compiler-0 "spack concretize" +example --tee stacks/compiler-0 "spack install" -example stacks/setup-2 "spack concretize" -example stacks/setup-2 "spack install" +# Spec groups section: one spec with explicit %gcc@16 +cat "$project/stacks/examples/groups-0.spack.stack.yaml" > ~/stacks/spack.yaml +example stacks/groups-0 "spack concretize" -example stacks/unify-0 "spack add netlib-scalapack %gcc@12 ^openblas ^openmpi" -example stacks/unify-0 "spack add netlib-scalapack %gcc@12 ^openblas ^mpich" - -# Can't be concretized due to unify: true, but not worth showing because it's slow and leads to -# an "internal concretizer error" that confuses users. -# example --expect-error stacks/unify-1 "spack concretize" +# Introduce override: same spec without %gcc@16 (no output captured) +cat "$project/stacks/examples/groups-1.spack.stack.yaml" > ~/stacks/spack.yaml +# Tuning concretizer section: load yaml with two conflicting specs example stacks/unify-2 "spack config get concretizer | grep unify" -example stacks/unify-3 "spack config add concretizer:unify:false" +cat "$project/stacks/examples/1.spack.stack.yaml" > ~/stacks/spack.yaml example stacks/unify-3 "spack concretize" -example stacks/unify-4 "spack add netlib-scalapack %gcc@12 ^netlib-lapack ^openmpi" -example stacks/unify-4 "spack add netlib-scalapack %gcc@12 ^netlib-lapack ^mpich" - +# Spec matrices section cat "$project/stacks/examples/2.spack.stack.yaml" > ~/stacks/spack.yaml example stacks/concretize-0 "spack concretize" -example stacks/concretize-0 "spack install" - -example stacks/concretize-01 "spack find" +# Reusable definitions section cat "$project/stacks/examples/3.spack.stack.yaml" > ~/stacks/spack.yaml example stacks/concretize-1 "spack concretize" -example stacks/concretize-1 "spack find -l" +# py-scipy with exclude cat "$project/stacks/examples/4bis.spack.stack.yaml" > ~/stacks/spack.yaml example stacks/concretize-3 "spack concretize" -example stacks/concretize-3 "spack install" - -example stacks/concretize-4 "spack find -ld py-scipy" +# Conditional definitions section cat "$project/stacks/examples/5.spack.stack.yaml" > ~/stacks/spack.yaml example stacks/concretize-5 "spack concretize" example stacks/concretize-5 "spack find -cl netlib-scalapack" @@ -63,6 +56,10 @@ fake_example stacks/concretize-6 "spack concretize" "/bin/true" spack concretize example stacks/concretize-6 "spack find -cl netlib-scalapack" +# Install the full stack +example --tee stacks/install-0 "spack install" + +# Environment Views section cat "$project/stacks/examples/6.spack.stack.yaml" > ~/stacks/spack.yaml example stacks/view-0 "spack concretize" @@ -70,7 +67,8 @@ example stacks/view-0 "ls ~/stacks/views/default" example stacks/view-0 "ls ~/stacks/views/default/lib" example stacks/view-0 "ls ~/stacks/views/full" example stacks/view-0 "ls ~/stacks/views/full/gcc/" -example stacks/view-0 "ls ~/stacks/views/full/gcc/gcc-12.3.0-gcc-11.4.0" +gcc_dir=$(ls ~/stacks/views/full/gcc/ | head -1) +example stacks/view-0 "ls ~/stacks/views/full/gcc/$gcc_dir" cat "$project/stacks/examples/7.spack.stack.yaml" > ~/stacks/spack.yaml @@ -79,17 +77,14 @@ example stacks/view-1 "ls ~/stacks/views/default" example stacks/view-1 "ls ~/stacks/views/default/lib" example stacks/view-1 "ls ~/stacks/views/full" -example stacks/modules-0 "spack add lmod@8.7.18 %gcc@11" -example stacks/modules-0 "spack concretize" -example stacks/modules-0 "spack install" - +# Module Files section: lmod is already installed as part of the compiler group . "$(spack location -i lmod)/lmod/lmod/init/bash" example --tee stacks/modules-1 "module --version" cat "$project/stacks/examples/8.spack.stack.yaml" > ~/stacks/spack.yaml spack module lmod refresh -y -module use "$HOME/stacks/modules/linux-ubuntu22.04-x86_64/Core" +module use "$HOME/stacks/modules/linux-ubuntu26.04-x86_64/Core" example --tee stacks/modules-2 "module av" @@ -102,10 +97,6 @@ example --tee stacks/modules-3 "module av" example --tee stacks/modules-3 "module unload gcc" module unload gcc -# TODO: Spack v1.1 compiler mixing causes name clashes in module files -# Need to write a work around in the tutorial to teach audience how -# to deal with this. - cat "$project/stacks/examples/9.spack.stack.yaml" > ~/stacks/spack.yaml example stacks/modules-4 "spack module lmod refresh --delete-tree -y" From 8f56a5ae22982e0ea2362290a077d0ad80fa2c7f Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Fri, 19 Jun 2026 09:51:55 -0700 Subject: [PATCH 14/17] Add example environments from stacks rewrite Signed-off-by: Alec Scott --- container/packages.yaml | 3 +- outputs/stacks/examples/0.spack.stack.yaml | 28 +++++++- outputs/stacks/examples/1.spack.stack.yaml | 30 ++++++++- outputs/stacks/examples/2.spack.stack.yaml | 37 +++++++--- outputs/stacks/examples/3.spack.stack.yaml | 45 +++++++++---- outputs/stacks/examples/4bis.spack.stack.yaml | 55 ++++++++++----- outputs/stacks/examples/5.spack.stack.yaml | 61 +++++++++++------ outputs/stacks/examples/6.spack.stack.yaml | 63 +++++++++++------ outputs/stacks/examples/7.spack.stack.yaml | 63 +++++++++++------ outputs/stacks/examples/8.spack.stack.yaml | 63 +++++++++++------ outputs/stacks/examples/9.spack.stack.yaml | 67 ++++++++++++------- .../stacks/examples/compiler.spack.stack.yaml | 9 +++ .../stacks/examples/groups-0.spack.stack.yaml | 15 +++++ .../stacks/examples/groups-1.spack.stack.yaml | 31 +++++++++ 14 files changed, 412 insertions(+), 158 deletions(-) create mode 100644 outputs/stacks/examples/compiler.spack.stack.yaml create mode 100644 outputs/stacks/examples/groups-0.spack.stack.yaml create mode 100644 outputs/stacks/examples/groups-1.spack.stack.yaml diff --git a/container/packages.yaml b/container/packages.yaml index a076e47d1e..a49c8abd12 100644 --- a/container/packages.yaml +++ b/container/packages.yaml @@ -1,5 +1,4 @@ packages: all: target: - - x86_64_v2 - variants: ~nls + - x86_64_v3 diff --git a/outputs/stacks/examples/0.spack.stack.yaml b/outputs/stacks/examples/0.spack.stack.yaml index 679a1be1db..af58214cac 100644 --- a/outputs/stacks/examples/0.spack.stack.yaml +++ b/outputs/stacks/examples/0.spack.stack.yaml @@ -4,7 +4,29 @@ # configuration settings. spack: specs: - - gcc@12%gcc@11 + - group: compiler + specs: + - gcc@16 + - lmod@8.7.67 + override: + packages: + c: + prefer: [gcc@15] + cxx: + prefer: [gcc@15] + fortran: + prefer: [gcc@15] + - group: stack + needs: [compiler] + specs: + - netlib-scalapack ^openblas ^openmpi + - netlib-scalapack ^openblas ^mpich + override: + packages: + c: + prefer: [gcc@16] + cxx: + prefer: [gcc@16] + fortran: + prefer: [gcc@16] view: false - concretizer: - unify: true diff --git a/outputs/stacks/examples/1.spack.stack.yaml b/outputs/stacks/examples/1.spack.stack.yaml index 679a1be1db..bde89f3c2d 100644 --- a/outputs/stacks/examples/1.spack.stack.yaml +++ b/outputs/stacks/examples/1.spack.stack.yaml @@ -4,7 +4,31 @@ # configuration settings. spack: specs: - - gcc@12%gcc@11 + - group: compiler + specs: + - gcc@16 + - lmod@8.7.67 + override: + packages: + c: + prefer: [gcc@15] + cxx: + prefer: [gcc@15] + fortran: + prefer: [gcc@15] + - group: stack + needs: [compiler] + specs: + - netlib-scalapack ^openblas ^openmpi + - netlib-scalapack ^openblas ^mpich + override: + packages: + c: + prefer: [gcc@16] + cxx: + prefer: [gcc@16] + fortran: + prefer: [gcc@16] + concretizer: + unify: false view: false - concretizer: - unify: true diff --git a/outputs/stacks/examples/2.spack.stack.yaml b/outputs/stacks/examples/2.spack.stack.yaml index 46e08ec4b3..1798ba3a74 100644 --- a/outputs/stacks/examples/2.spack.stack.yaml +++ b/outputs/stacks/examples/2.spack.stack.yaml @@ -4,12 +4,33 @@ # configuration settings. spack: specs: - - gcc@12%gcc@11 - - matrix: - - [netlib-scalapack] - - [^openmpi, ^mpich] - - [^openblas, ^netlib-lapack] - - ["%gcc@12"] + - group: compiler + specs: + - gcc@16 + - lmod@8.7.67 + override: + packages: + c: + prefer: [gcc@15] + cxx: + prefer: [gcc@15] + fortran: + prefer: [gcc@15] + - group: stack + needs: [compiler] + specs: + - matrix: + - [netlib-scalapack] + - [^openmpi, ^mpich] + - [^openblas, ^netlib-lapack] + override: + packages: + c: + prefer: [gcc@16] + cxx: + prefer: [gcc@16] + fortran: + prefer: [gcc@16] + concretizer: + unify: false view: false - concretizer: - unify: false diff --git a/outputs/stacks/examples/3.spack.stack.yaml b/outputs/stacks/examples/3.spack.stack.yaml index b28c614b49..8e6a2274c2 100644 --- a/outputs/stacks/examples/3.spack.stack.yaml +++ b/outputs/stacks/examples/3.spack.stack.yaml @@ -4,19 +4,38 @@ # configuration settings. spack: definitions: - - mpis: [ openmpi, mpich ] - - lapacks: [ openblas, netlib-lapack ] - - compilers: [ "gcc@12" ] - - mpi_packages: [ netlib-scalapack ] + - mpis: [openmpi, mpich] + - lapacks: [openblas, netlib-lapack] + - mpi_packages: [netlib-scalapack] specs: - - gcc@12%gcc@11 - - matrix: - - [$mpi_packages] - - [$^mpis] - - [$^lapacks] - - [$%compilers] - + - group: compiler + specs: + - gcc@16 + - lmod@8.7.67 + override: + packages: + c: + prefer: [gcc@15] + cxx: + prefer: [gcc@15] + fortran: + prefer: [gcc@15] + - group: stack + needs: [compiler] + specs: + - matrix: + - [$mpi_packages] + - [$^mpis] + - [$^lapacks] + override: + packages: + c: + prefer: [gcc@16] + cxx: + prefer: [gcc@16] + fortran: + prefer: [gcc@16] + concretizer: + unify: false view: false - concretizer: - unify: false diff --git a/outputs/stacks/examples/4bis.spack.stack.yaml b/outputs/stacks/examples/4bis.spack.stack.yaml index e962387b58..1cedc9ab1c 100644 --- a/outputs/stacks/examples/4bis.spack.stack.yaml +++ b/outputs/stacks/examples/4bis.spack.stack.yaml @@ -4,25 +4,44 @@ # configuration settings. spack: definitions: - - mpis: [ openmpi, mpich ] - - lapacks: [ openblas, netlib-lapack ] - - compilers: [ "gcc@12" ] - - mpi_packages: [ netlib-scalapack ] - - serial_packages: [py-scipy] + - mpis: [openmpi, mpich] + - lapacks: [openblas, netlib-lapack] + - mpi_packages: [netlib-scalapack] + - serial_packages: [py-scipy] specs: - - gcc@12%gcc@11 - - matrix: - - [$mpi_packages] - - [$^mpis] - - [$^lapacks] - - [$%compilers] - - matrix: - - [$serial_packages] - - [$^lapacks] - - [$%compilers] - exclude: + - group: compiler + specs: + - gcc@16 + - lmod@8.7.67 + override: + packages: + c: + prefer: [gcc@15] + cxx: + prefer: [gcc@15] + fortran: + prefer: [gcc@15] + - group: stack + needs: [compiler] + specs: + - matrix: + - [$mpi_packages] + - [$^mpis] + - [$^lapacks] + - matrix: + - [$serial_packages] + - [$^lapacks] + exclude: - "py-scipy ^netlib-lapack" + override: + packages: + c: + prefer: [gcc@16] + cxx: + prefer: [gcc@16] + fortran: + prefer: [gcc@16] + concretizer: + unify: false view: false - concretizer: - unify: false diff --git a/outputs/stacks/examples/5.spack.stack.yaml b/outputs/stacks/examples/5.spack.stack.yaml index 2f22aac40d..2b46267054 100644 --- a/outputs/stacks/examples/5.spack.stack.yaml +++ b/outputs/stacks/examples/5.spack.stack.yaml @@ -4,27 +4,46 @@ # configuration settings. spack: definitions: - - mpis: [mpich] - - mpis: [openmpi] - when: 'env.get("SPACK_STACK_USE_OPENMPI", "") == "1"' - - lapacks: [ openblas, netlib-lapack ] - - compilers: [ "gcc@12" ] - - mpi_packages: [ netlib-scalapack ] - - serial_packages: [py-scipy] + - mpis: [mpich] + - mpis: [openmpi] + when: 'env.get("SPACK_STACK_USE_OPENMPI", "") == "1"' + - lapacks: [openblas, netlib-lapack] + - mpi_packages: [netlib-scalapack] + - serial_packages: [py-scipy] specs: - - gcc@12%gcc@11 - - matrix: - - [$mpi_packages] - - [$^mpis] - - [$^lapacks] - - [$%compilers] - - matrix: - - [$serial_packages] - - [$^lapacks] - - [$%compilers] - exclude: - - "py-scipy ^netlib-lapack" + - group: compiler + specs: + - gcc@16 + - lmod@8.7.67 + override: + packages: + c: + prefer: [gcc@15] + cxx: + prefer: [gcc@15] + fortran: + prefer: [gcc@15] + - group: stack + needs: [compiler] + specs: + - matrix: + - [$mpi_packages] + - [$^mpis] + - [$^lapacks] + - matrix: + - [$serial_packages] + - [$^lapacks] + exclude: + - "py-scipy ^netlib-lapack" + override: + packages: + c: + prefer: [gcc@16] + cxx: + prefer: [gcc@16] + fortran: + prefer: [gcc@16] + concretizer: + unify: false view: false - concretizer: - unify: false diff --git a/outputs/stacks/examples/6.spack.stack.yaml b/outputs/stacks/examples/6.spack.stack.yaml index 7260eb8d0e..dadf00d46d 100644 --- a/outputs/stacks/examples/6.spack.stack.yaml +++ b/outputs/stacks/examples/6.spack.stack.yaml @@ -4,33 +4,52 @@ # configuration settings. spack: definitions: - - mpis: [mpich] - - mpis: [openmpi] - when: 'env.get("SPACK_STACK_USE_OPENMPI", "") == "1"' - - lapacks: [ openblas, netlib-lapack ] - - compilers: [ "gcc@12" ] - - mpi_packages: [ netlib-scalapack ] - - serial_packages: [py-scipy] + - mpis: [mpich] + - mpis: [openmpi] + when: 'env.get("SPACK_STACK_USE_OPENMPI", "") == "1"' + - lapacks: [openblas, netlib-lapack] + - mpi_packages: [netlib-scalapack] + - serial_packages: [py-scipy] specs: - - gcc@12%gcc@11 - - matrix: - - [$mpi_packages] - - [$^mpis] - - [$^lapacks] - - [$%compilers] - - matrix: - - [$serial_packages] - - [$^lapacks] - - [$%compilers] - exclude: - - "py-scipy ^netlib-lapack" - concretizer: - unify: false + - group: compiler + specs: + - gcc@16 + - lmod@8.7.67 + override: + packages: + c: + prefer: [gcc@15] + cxx: + prefer: [gcc@15] + fortran: + prefer: [gcc@15] + - group: stack + needs: [compiler] + specs: + - matrix: + - [$mpi_packages] + - [$^mpis] + - [$^lapacks] + - matrix: + - [$serial_packages] + - [$^lapacks] + exclude: + - "py-scipy ^netlib-lapack" + override: + packages: + c: + prefer: [gcc@16] + cxx: + prefer: [gcc@16] + fortran: + prefer: [gcc@16] + concretizer: + unify: false view: default: root: views/default - select: ['%gcc@12'] + select: ['%gcc@16'] exclude: [^mpich, ^netlib-lapack] full: root: views/full diff --git a/outputs/stacks/examples/7.spack.stack.yaml b/outputs/stacks/examples/7.spack.stack.yaml index ea8763bbb0..db3a5886e1 100644 --- a/outputs/stacks/examples/7.spack.stack.yaml +++ b/outputs/stacks/examples/7.spack.stack.yaml @@ -4,33 +4,52 @@ # configuration settings. spack: definitions: - - mpis: [mpich] - - mpis: [openmpi] - when: 'env.get("SPACK_STACK_USE_OPENMPI", "") == "1"' - - lapacks: [ openblas, netlib-lapack ] - - compilers: [ "gcc@12" ] - - mpi_packages: [ netlib-scalapack ] - - serial_packages: [py-scipy] + - mpis: [mpich] + - mpis: [openmpi] + when: 'env.get("SPACK_STACK_USE_OPENMPI", "") == "1"' + - lapacks: [openblas, netlib-lapack] + - mpi_packages: [netlib-scalapack] + - serial_packages: [py-scipy] specs: - - gcc@12%gcc@11 - - matrix: - - [$mpi_packages] - - [$^mpis] - - [$^lapacks] - - [$%compilers] - - matrix: - - [$serial_packages] - - [$^lapacks] - - [$%compilers] - exclude: - - "py-scipy ^netlib-lapack" - concretizer: - unify: false + - group: compiler + specs: + - gcc@16 + - lmod@8.7.67 + override: + packages: + c: + prefer: [gcc@15] + cxx: + prefer: [gcc@15] + fortran: + prefer: [gcc@15] + - group: stack + needs: [compiler] + specs: + - matrix: + - [$mpi_packages] + - [$^mpis] + - [$^lapacks] + - matrix: + - [$serial_packages] + - [$^lapacks] + exclude: + - "py-scipy ^netlib-lapack" + override: + packages: + c: + prefer: [gcc@16] + cxx: + prefer: [gcc@16] + fortran: + prefer: [gcc@16] + concretizer: + unify: false view: default: root: views/default - select: ['%gcc@12'] + select: ['%gcc@16'] exclude: [^mpich, ^netlib-lapack] link: roots full: diff --git a/outputs/stacks/examples/8.spack.stack.yaml b/outputs/stacks/examples/8.spack.stack.yaml index ccfa149313..058b08d909 100644 --- a/outputs/stacks/examples/8.spack.stack.yaml +++ b/outputs/stacks/examples/8.spack.stack.yaml @@ -4,30 +4,49 @@ # configuration settings. spack: definitions: - - mpis: [mpich] - - mpis: [openmpi] - when: 'env.get("SPACK_STACK_USE_OPENMPI", "") == "1"' - - lapacks: [ openblas, netlib-lapack ] - - compilers: [ "gcc@12" ] - - mpi_packages: [ netlib-scalapack ] - - serial_packages: [py-scipy] + - mpis: [mpich] + - mpis: [openmpi] + when: 'env.get("SPACK_STACK_USE_OPENMPI", "") == "1"' + - lapacks: [openblas, netlib-lapack] + - mpi_packages: [netlib-scalapack] + - serial_packages: [py-scipy] specs: - - gcc@12%gcc@11 - - matrix: - - [$mpi_packages] - - [$^mpis] - - [$^lapacks] - - [$%compilers] - - matrix: - - [$serial_packages] - - [$^lapacks] - - [$%compilers] - exclude: - - "py-scipy ^netlib-lapack" + - group: compiler + specs: + - gcc@16 + - lmod@8.7.67 + override: + packages: + c: + prefer: [gcc@15] + cxx: + prefer: [gcc@15] + fortran: + prefer: [gcc@15] + - group: stack + needs: [compiler] + specs: + - matrix: + - [$mpi_packages] + - [$^mpis] + - [$^lapacks] + - matrix: + - [$serial_packages] + - [$^lapacks] + exclude: + - "py-scipy ^netlib-lapack" + override: + packages: + c: + prefer: [gcc@16] + cxx: + prefer: [gcc@16] + fortran: + prefer: [gcc@16] + concretizer: + unify: false view: false - concretizer: - unify: false modules: default: enable: @@ -39,4 +58,4 @@ spack: - mpi - lapack core_specs: - - '%gcc@11' + - '%gcc@15' diff --git a/outputs/stacks/examples/9.spack.stack.yaml b/outputs/stacks/examples/9.spack.stack.yaml index 2627beb780..70e6c20139 100644 --- a/outputs/stacks/examples/9.spack.stack.yaml +++ b/outputs/stacks/examples/9.spack.stack.yaml @@ -4,30 +4,49 @@ # configuration settings. spack: definitions: - - mpis: [mpich] - - mpis: [openmpi] - when: 'env.get("SPACK_STACK_USE_OPENMPI", "") == "1"' - - lapacks: [ openblas, netlib-lapack ] - - compilers: [ "gcc@12" ] - - mpi_packages: [ netlib-scalapack ] - - serial_packages: [py-scipy] + - mpis: [mpich] + - mpis: [openmpi] + when: 'env.get("SPACK_STACK_USE_OPENMPI", "") == "1"' + - lapacks: [openblas, netlib-lapack] + - mpi_packages: [netlib-scalapack] + - serial_packages: [py-scipy] specs: - - gcc@12%gcc@11 - - matrix: - - [$mpi_packages] - - [$^mpis] - - [$^lapacks] - - [$%compilers] - - matrix: - - [$serial_packages] - - [$^lapacks] - - [$%compilers] - exclude: - - "py-scipy ^netlib-lapack" + - group: compiler + specs: + - gcc@16 + - lmod@8.7.67 + override: + packages: + c: + prefer: [gcc@15] + cxx: + prefer: [gcc@15] + fortran: + prefer: [gcc@15] + - group: stack + needs: [compiler] + specs: + - matrix: + - [$mpi_packages] + - [$^mpis] + - [$^lapacks] + - matrix: + - [$serial_packages] + - [$^lapacks] + exclude: + - "py-scipy ^netlib-lapack" + override: + packages: + c: + prefer: [gcc@16] + cxx: + prefer: [gcc@16] + fortran: + prefer: [gcc@16] + concretizer: + unify: false view: false - concretizer: - unify: false modules: default: enable: @@ -39,13 +58,13 @@ spack: - mpi - lapack core_specs: - - '%gcc@11' + - '%gcc@15' hash_length: 0 include: - gcc exclude: - - '%gcc@11.4.0' - - 'autoconf' + - '%gcc@15' + - autoconf all: environment: set: diff --git a/outputs/stacks/examples/compiler.spack.stack.yaml b/outputs/stacks/examples/compiler.spack.stack.yaml new file mode 100644 index 0000000000..03f955ca5a --- /dev/null +++ b/outputs/stacks/examples/compiler.spack.stack.yaml @@ -0,0 +1,9 @@ +# This is a Spack Environment file. +# +# It describes a set of packages to be installed, along with +# configuration settings. +spack: + specs: + - gcc@16 %gcc@15 + - lmod@8.7.67 %gcc@15 + view: false diff --git a/outputs/stacks/examples/groups-0.spack.stack.yaml b/outputs/stacks/examples/groups-0.spack.stack.yaml new file mode 100644 index 0000000000..4907cf36f9 --- /dev/null +++ b/outputs/stacks/examples/groups-0.spack.stack.yaml @@ -0,0 +1,15 @@ +# This is a Spack Environment file. +# +# It describes a set of packages to be installed, along with +# configuration settings. +spack: + specs: + - group: compiler + specs: + - gcc@16 %gcc@15 + - lmod@8.7.67 %gcc@15 + - group: stack + needs: [compiler] + specs: + - netlib-scalapack %gcc@16 ^openblas ^openmpi + view: false diff --git a/outputs/stacks/examples/groups-1.spack.stack.yaml b/outputs/stacks/examples/groups-1.spack.stack.yaml new file mode 100644 index 0000000000..797bde2d26 --- /dev/null +++ b/outputs/stacks/examples/groups-1.spack.stack.yaml @@ -0,0 +1,31 @@ +# This is a Spack Environment file. +# +# It describes a set of packages to be installed, along with +# configuration settings. +spack: + specs: + - group: compiler + specs: + - gcc@16 + - lmod@8.7.67 + override: + packages: + c: + prefer: [gcc@15] + cxx: + prefer: [gcc@15] + fortran: + prefer: [gcc@15] + - group: stack + needs: [compiler] + specs: + - netlib-scalapack ^openblas ^openmpi + override: + packages: + c: + prefer: [gcc@16] + cxx: + prefer: [gcc@16] + fortran: + prefer: [gcc@16] + view: false From 15ecfa20787b16b2cf59b1f1e0c5fefd666c368a Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Fri, 19 Jun 2026 09:59:34 -0700 Subject: [PATCH 15/17] Re-enable output generation in PR Signed-off-by: Alec Scott --- .github/workflows/ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6656d9a6b..695e1a1d5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,10 +51,8 @@ jobs: uses: ./.github/workflows/container.yml outputs: - # Output regeneration temporarily disabled — remove the `false` line below to re-enable. if: | - false - && !cancelled() + !cancelled() && contains(needs.*.result, 'success') && !contains(needs.*.result, 'failure') && (needs.changes.outputs.outputs == 'true' From 44b460c23555744e6b89b56d35a0e9397f396166 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Fri, 19 Jun 2026 10:40:53 -0700 Subject: [PATCH 16/17] Update the packaging section Signed-off-by: Alec Scott --- outputs/packaging.sh | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/outputs/packaging.sh b/outputs/packaging.sh index 9e03c1ff95..c2941bad30 100755 --- a/outputs/packaging.sh +++ b/outputs/packaging.sh @@ -12,13 +12,12 @@ project="$(dirname "$0")" rm -rf "${raw_outputs:?}/packaging" . "$project/init_spack.sh" +spack repo update # Cannot use \$HOME (in CI) mpileaks_package_py="$HOME/$dir/$tutorial_subdir/packages/tutorial_mpileaks/package.py" export SPACK_COLOR=never -# Packaging commands - # tutorial repository set up example packaging/repo-create "spack repo create $repo_root $name" example packaging/repo-create "spack repo add $repo_root/$tutorial_subdir" @@ -27,23 +26,22 @@ example packaging/repo-list "spack repo list" example packaging/repo-config "spack config get repos" +# spack create skeleton # make the editor automatically exit export EDITOR=true example packaging/create "spack create --name tutorial-mpileaks --namespace $name https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz" example packaging/checksum-mpileaks-1 "spack checksum tutorial-mpileaks 1.0" -example --expect-error packaging/install-mpileaks-1 "spack install tutorial-mpileaks" +example --tee --expect-error packaging/install-mpileaks-1 "spack install tutorial-mpileaks" -# TODO: Update info-mpileaks.out output manually since automation fails. -# -# This fails ("Error: invalid width -2 (must be > 0)") in CI when preparing -# variants BUT not when run on the command line. -#cp "$PROJECT/package-py-files/1.package.py" "$mpileaks_package_py" -#example packaging/info-mpileaks "spack info --phases tutorial-mpileaks" +# add documentation +cp "$PROJECT/package-py-files/1.package.py" "$mpileaks_package_py" +example packaging/info-mpileaks "spack info --phases tutorial-mpileaks" +# add dependencies cp "$PROJECT/package-py-files/2.package.py" "$mpileaks_package_py" -example --expect-error packaging/install-mpileaks-2 "spack install tutorial-mpileaks" +example --tee --expect-error packaging/install-mpileaks-2 "spack install tutorial-mpileaks" stage_dir="$(spack location -s tutorial-mpileaks)" example packaging/build-output "cat $stage_dir/spack-build-out.txt" @@ -68,19 +66,24 @@ example packaging/build-output "cat $stage_dir/spack-build-out.txt" #) #run_configure +# configure arguments cp "$PROJECT/package-py-files/3.package.py" "$mpileaks_package_py" -example packaging/install-mpileaks-3 "spack install tutorial-mpileaks" +example --tee packaging/install-mpileaks-3 "spack install tutorial-mpileaks" +# variants cp "$PROJECT/package-py-files/4.package.py" "$mpileaks_package_py" -example packaging/install-mpileaks-4 "spack install --verbose tutorial-mpileaks stackstart=4" +example --tee packaging/install-mpileaks-4 "spack install --verbose tutorial-mpileaks stackstart=4" -example packaging/install-mpileaks-5 "spack uninstall -ay tutorial-mpileaks" -cp "$PROJECT/package-py-files/5.package.py" "$mpileaks_package_py" -example --expect-error packaging/install-mpileaks-5 "spack install --test=root tutorial-mpileaks" - -cp "$PROJECT/package-py-files/6.package.py" "$mpileaks_package_py" -example packaging/install-mpileaks-6 "spack install --test=root tutorial-mpileaks" +# TODO: Re-enable once https://github.com/spack/spack/issues/52573 is resolved. +# tests +#example --tee packaging/install-mpileaks-5 "spack uninstall -ay tutorial-mpileaks" +#cp "$PROJECT/package-py-files/5.package.py" "$mpileaks_package_py" +#example --tee --expect-error packaging/install-mpileaks-5 "spack install --test=root tutorial-mpileaks" +# +#cp "$PROJECT/package-py-files/6.package.py" "$mpileaks_package_py" +#example --tee packaging/install-mpileaks-6 "spack install --test=root tutorial-mpileaks" -example packaging/cleanup "spack uninstall -ay tutorial-mpileaks" +# cleanup +example --tee packaging/cleanup "spack uninstall -ay tutorial-mpileaks" example packaging/cleanup "spack repo remove $name" example packaging/cleanup "rm -rf $repo_root" From 64713b83d715296ebee556166a38fa5936c954b2 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Fri, 19 Jun 2026 11:06:55 -0700 Subject: [PATCH 17/17] Revert packages.yaml config Signed-off-by: Alec Scott --- container/packages.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/container/packages.yaml b/container/packages.yaml index a49c8abd12..87d61bd1cc 100644 --- a/container/packages.yaml +++ b/container/packages.yaml @@ -1,4 +1,4 @@ packages: all: - target: - - x86_64_v3 + target: [x86_64_v3] +