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
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ jobs:
uses: ./.github/workflows/container.yml

outputs:
# Output regeneration temporarily disabled — remove the `false` line below to re-enable.
if: |
!cancelled()
false
&& !cancelled()
&& contains(needs.*.result, 'success')
&& !contains(needs.*.result, 'failure')
&& (needs.changes.outputs.outputs == 'true'
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ __pycache__
/view
/.spack-env
/.venv
.idea
CLAUDE.md
2 changes: 1 addition & 1 deletion common/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

and then set Spack up like this::

git clone --depth=2 --branch=releases/v1.1 https://github.com/spack/spack
git clone --depth=2 --branch=releases/v1.2 https://github.com/spack/spack
. spack/share/spack/setup-env.sh
spack repo update builtin --tag v2025.11.0
spack tutorial -y
Expand Down
83 changes: 40 additions & 43 deletions outputs/basics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -21,61 +21,65 @@ 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"

example basics/zlib-clang "spack install zlib-ng %clang"
example basics/mirror "spack mirror add --unsigned tutorial /mirror"
#example basics/mirror "spack buildcache keys --install --trust"

# 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"

Expand All @@ -88,18 +92,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'
14 changes: 7 additions & 7 deletions outputs/basics/clone.out
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
$ git clone --depth=2 --branch=releases/v1.1 https://github.com/spack/spack.git ~/spack
$ git clone --depth=2 --branch=releases/v1.2 https://github.com/spack/spack.git ~/spack
Cloning into '/home/spack/spack'...
remote: Enumerating objects: 2340, done.K
remote: Counting objects: 100% (2340/2340), done.K
remote: Compressing objects: 100% (1583/1583), done.K
remote:nTotale2340 (delta2311),3reused 1329 (delta 237), pack-reused 0 (from 0)K
Receiving objects: 100% (2340/2340), 5.30 MiB | 20.25 MiB/s, done.
Resolving deltas: 100% (311/311), done.
remote: Enumerating objects: 2411, done.K
remote: Counting objects: 100% (2411/2411), done.K
remote: Compressing objects: 100% (1617/1617), done.K
remote:nTotale2411 (delta2326),4reused 1327 (delta 249), pack-reused 0 (from 0)K
Receiving objects: 100% (2411/2411), 5.48 MiB | 12.50 MiB/s, done.
Resolving deltas: 100% (326/326), done.
$ cd ~/spack
8 changes: 4 additions & 4 deletions outputs/basics/compiler-list.out
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$ spack compilers
==> Available compilers
-- gcc ubuntu22.04-x86_64 ---------------------------------------
[e] gcc@11.4.0 [e] gcc@10.5.0
-- gcc ubuntu26.04-x86_64 ---------------------------------------
[e] gcc@15.2.0 [e] gcc@14.3.0

-- llvm ubuntu22.04-x86_64 --------------------------------------
[e] llvm@14.0.0
-- llvm ubuntu26.04-x86_64 --------------------------------------
[e] llvm@21.1.8
8 changes: 2 additions & 6 deletions outputs/basics/compiler-uninstall.out
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
$ spack uninstall gcc@12
y
-- linux-ubuntu22.04-x86_64_v3 / %c,cxx=gcc@11.4.0 --------------
fmnvqo4 gcc@12.3.0

==> 1 packages will be uninstalled. Do you want to proceed? [y/N] ==> Successfully uninstalled gcc@12.3.0~binutils+bootstrap~graphite~mold~nvptx~piclibs~profiled~strip build_system=autotools build_type=RelWithDebInfo languages:='c,c++,fortran' platform=linux os=ubuntu22.04 target=x86_64_v3/fmnvqo4
$ spack uninstall -y gcc@16
==> Successfully uninstalled gcc@16.1.0+binutils+bootstrap~graphite+libsanitizer~mold~nvptx~piclibs+profiled+strip build_system=autotools build_type=Release languages:='c,c++,fortran' platform=linux os=ubuntu26.04 target=x86_64_v3/vlwdxlj
8 changes: 4 additions & 4 deletions outputs/basics/compilers-2.out
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$ spack compilers
==> Available compilers
-- gcc ubuntu22.04-x86_64 ---------------------------------------
[e] gcc@11.4.0 [e] gcc@10.5.0 [+] gcc@12.3.0
-- gcc ubuntu26.04-x86_64 ---------------------------------------
[e] gcc@15.2.0 [e] gcc@14.3.0 [+] gcc@16.1.0

-- llvm ubuntu22.04-x86_64 --------------------------------------
[e] llvm@14.0.0
-- llvm ubuntu26.04-x86_64 --------------------------------------
[e] llvm@21.1.8
7 changes: 0 additions & 7 deletions outputs/basics/compilers.out

This file was deleted.

32 changes: 7 additions & 25 deletions outputs/basics/find-d-tcl.out
Original file line number Diff line number Diff line change
@@ -1,30 +1,12 @@
$ spack find -d tcl
-- linux-ubuntu22.04-x86_64_v3 / %c,cxx=clang@14.0.0 ------------
-- linux-ubuntu26.04-x86_64_v3 / %c,cxx=gcc@15.2.0 --------------
tcl@8.6.17
compiler-wrapper@1.0
glibc@2.35
compiler-wrapper@1.1.0
gcc@15.2.0
gcc-runtime@15.2.0
glibc@2.43
gmake@4.4.1
gcc@11.4.0
gcc-runtime@11.4.0
llvm@14.0.0
zlib-ng@2.0.7
llvm@21.1.8


-- linux-ubuntu22.04-x86_64_v3 / %c,cxx=gcc@11.4.0 --------------
tcl@8.6.17
compiler-wrapper@1.0
gcc@11.4.0
gcc-runtime@11.4.0
glibc@2.35
gmake@4.4.1
zlib-ng@2.0.7

tcl@8.6.17
compiler-wrapper@1.0
gcc@11.4.0
gcc-runtime@11.4.0
glibc@2.35
gmake@4.4.1
zlib-ng@2.2.4

==> 3 installed packages
==> 1 installed package
118 changes: 0 additions & 118 deletions outputs/basics/find-d-trilinos.out

This file was deleted.

7 changes: 2 additions & 5 deletions outputs/basics/find-dep-mpich.out
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
$ spack find ^mpich
-- linux-ubuntu22.04-x86_64_v3 / %c,cxx,fortran=gcc@11.4.0 ------
trilinos@16.1.0

-- linux-ubuntu22.04-x86_64_v3 / %c=gcc@11.4.0 ------------------
-- linux-ubuntu26.04-x86_64_v3 / %c=gcc@15.2.0 ------------------
hdf5@1.14.6
==> 2 installed packages
==> 1 installed package
Loading
Loading