Skip to content

Commit

Permalink
Redo basics section to include auto-generated output (#50)
Browse files Browse the repository at this point in the history
* Redo basics section to include auto-generated output

- [x] Use s3 mirror instead of in-image mirror
- [x] Output is generated by running a Docker image
- [x] Output is filtered into includable *.out files
- [x] tutorial_basics.rst includes output instead of inlining it

* Update outputs/basics.sh

Co-authored-by: Greg Becker <becker33@llnl.gov>

* Update outputs/basics.sh

Co-authored-by: Greg Becker <becker33@llnl.gov>

* Update outputs/basics.sh

Co-authored-by: Greg Becker <becker33@llnl.gov>

Co-authored-by: Greg Becker <becker33@llnl.gov>
  • Loading branch information
tgamblin and becker33 committed Jul 27, 2020
1 parent 6df0e65 commit 425ab82
Show file tree
Hide file tree
Showing 49 changed files with 3,767 additions and 1,667 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ command_index.rst
spack*.rst
llnl*.rst
_build
__pycache__
1 change: 1 addition & 0 deletions outputs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
raw/
27 changes: 27 additions & 0 deletions outputs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.PHONY: all replay

raw_output = raw/*/*.out
subdirs = basics


all:
echo "Filtering raw outputs though col"
for raw in $(raw_output); do \
out=$$(echo $$raw | sed 's.raw/..'); \
cat $$raw | perl -pe 's/\033\[([01];)?\d+m//g' | col -bp > $$out; \
done
echo "Removing spurious = and # characters"
for dir in $(subdirs); do \
sed -i~ 's/==>[^ ]/==> /;s/\#/ /' $$dir/*.out; \
done

run:
docker run --rm -it \
--mount type=bind,source=${PWD},target=/project \
spack/tutorial:aws20 \
/project/basics.sh

interactive:
docker run --rm -it \
--mount type=bind,source=${PWD},target=/project \
spack/tutorial:aws20
101 changes: 101 additions & 0 deletions outputs/basics.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
#!/bin/bash

# Source definitions
project=$(dirname "$0")
. $project/defs.sh

# clean things up before starting this first script
rm -rf $raw_outputs ~/spack ~/.spack ~/.gnupg

# basic installation
example basics/clone "git clone https://github.com/spack/spack ~/spack"

example basics/checkout "cd ~/spack"
cd ~/spack
example basics/checkout "git checkout releases/v0.15"

example basics/source-setup ". share/spack/setup-env.sh"

# actually source the script (needs to be done in this shell)
. share/spack/setup-env.sh
spack config add "config:suppress_gpg_warnings:true"

# spack list
example basics/list "spack list"
example basics/list-py "spack list py-"

# spack install
example basics/zlib "spack install zlib"

example basics/mirror "spack mirror add tutorial s3://spack-tutorial-container/mirror/"
example basics/mirror "spack gpg trust share/spack/keys/tutorial.pub"

example basics/zlib-clang "spack install zlib %clang"

example basics/versions-zlib "spack versions zlib"
example basics/zlib-1.2.8 "spack install zlib@1.2.8"
example basics/zlib-gcc-6.5.0 "spack install zlib %gcc@6.5.0"

example basics/zlib-O3 "spack install zlib @1.2.8 cppflags=-O3"

example basics/find "spack find"
example basics/find-lf "spack find -lf"

example basics/tcl "spack install tcl"

example basics/tcl-zlib-clang "spack install tcl ^zlib @1.2.8 %clang"

zlib_hash=$(spack find --format "{hash:3}" zlib cppflags=-O3)
example basics/tcl-zlib-hash "spack install tcl ^/${zlib_hash}"

example basics/find-ldf "spack find -ldf"

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/graph-hdf5 "spack graph hdf5+hl+mpi ^mpich"

example basics/trilinos "spack install trilinos"

example basics/trilinos-hdf5 "spack install trilinos +hdf5 ^hdf5+hl+mpi ^mpich"

example basics/find-d-trilinos "spack find -d trilinos"

example basics/graph-trilinos "spack graph trilinos"

example basics/find-d-tcl "spack find -d tcl"

example basics/find-zlib "spack find zlib"

echo y | example basics/uninstall-zlib "spack uninstall zlib %gcc@6.5.0"

example basics/find-lf-zlib "spack find -lf zlib"

zlib_hash=$(spack find --format "{hash:3}" zlib@1.2.8 %clang)
example basics/uninstall-needed "spack uninstall zlib/${zlib_hash}"
echo y | example basics/uninstall-r-needed "spack uninstall -R zlib/${zlib_hash}"

example 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 cppflags=-O3"

example basics/find-px "spack find -px"

example basics/compilers "spack compilers"

example basics/install-gcc-8.3.0 "spack install gcc @8.3.0"

example basics/find-p-gcc "spack find -p gcc"

example basics/compiler-add-location 'spack compiler add $(spack location -i gcc@8.3.0)'

example basics/compiler-remove 'spack compiler remove gcc@8.3.0'
4 changes: 4 additions & 0 deletions outputs/basics/checkout.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$ cd spack
$ git checkout releases/v0.15
Branch 'releases/v0.15' set up to track remote branch 'releases/v0.15' from 'origin'.
Switched to a new branch 'releases/v0.15'
8 changes: 8 additions & 0 deletions outputs/basics/clone.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
$ git clone https://github.com/spack/spack
Cloning into 'spack'...
remote: Enumerating objects: 59, done.
remote: Counting objects: 100% (59/59), done.
remote: Compressing objects: 100% (51/51), done.
remote: Total 220692 (delta 21), reused 0 (delta 0), pack-reused 220633
Receiving objects: 100% (220692/220692), 87.92 MiB | 2.17 MiB/s, done.
Resolving deltas: 100% (93778/93778), done.
5 changes: 5 additions & 0 deletions outputs/basics/compiler-add-location.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
$ spack compiler add $(spack location -i gcc@8.3.0)
==> Added 1 new compiler to /home/spack/.spack/linux/compilers.yaml
gcc@8.3.0
==> Compilers are defined in the following files:
/home/spack/.spack/linux/compilers.yaml
2 changes: 2 additions & 0 deletions outputs/basics/compiler-remove.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
$ spack compiler remove gcc@8.3.0
==> Removed compiler gcc@8.3.0
7 changes: 7 additions & 0 deletions outputs/basics/compilers.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
$ spack compilers
==> Available compilers
-- clang ubuntu18.04-x86_64 -------------------------------------
clang@6.0.0

-- gcc ubuntu18.04-x86_64 ---------------------------------------
gcc@7.5.0 gcc@6.5.0
4 changes: 4 additions & 0 deletions outputs/basics/find-O3.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$ spack find cppflags=-O3
==> 1 installed package
-- linux-ubuntu18.04-x86_64 / gcc@7.5.0 -------------------------
zlib@1.2.8
14 changes: 14 additions & 0 deletions outputs/basics/find-d-tcl.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
$ spack find -d tcl
==> 3 installed packages
-- linux-ubuntu18.04-x86_64 / clang@6.0.0 -----------------------
tcl@8.6.8
zlib@1.2.8


-- linux-ubuntu18.04-x86_64 / gcc@7.5.0 -------------------------
tcl@8.6.8
zlib@1.2.11

tcl@8.6.8
zlib@1.2.8

48 changes: 48 additions & 0 deletions outputs/basics/find-d-trilinos.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
$ spack find -d trilinos
==> 2 installed packages
-- linux-ubuntu18.04-x86_64 / gcc@7.5.0 -------------------------
trilinos@12.18.1
boost@1.73.0
bzip2@1.0.8
zlib@1.2.11
glm@0.9.7.1
hdf5@1.10.6
openmpi@3.1.6
hwloc@1.11.11
libpciaccess@0.13.5
libxml2@2.9.10
libiconv@1.16
xz@5.2.5
numactl@2.0.12
hypre@2.18.2
openblas@0.3.10
matio@1.5.13
metis@5.1.0
mumps@5.3.3
netlib-scalapack@2.1.0
netcdf-c@4.7.3
parmetis@4.0.3
suite-sparse@5.7.2

trilinos@12.18.1
boost@1.73.0
bzip2@1.0.8
zlib@1.2.11
glm@0.9.7.1
hdf5@1.10.6
mpich@3.3.2
hwloc@2.2.0
libpciaccess@0.13.5
libxml2@2.9.10
libiconv@1.16
xz@5.2.5
hypre@2.18.2
openblas@0.3.10
matio@1.5.13
metis@5.1.0
mumps@5.3.3
netlib-scalapack@2.1.0
netcdf-c@4.7.3
parmetis@4.0.3
suite-sparse@5.7.2

5 changes: 5 additions & 0 deletions outputs/basics/find-dep-mpich.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
$ spack find ^mpich
==> 8 installed packages
-- linux-ubuntu18.04-x86_64 / gcc@7.5.0 -------------------------
hdf5@1.10.6 matio@1.5.13 netcdf-c@4.7.3 parmetis@4.0.3
hypre@2.18.2 mumps@5.3.3 netlib-scalapack@2.1.0 trilinos@12.18.1
144 changes: 144 additions & 0 deletions outputs/basics/find-ldf-2.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
$ spack find -ldf
==> 35 installed packages
-- linux-ubuntu18.04-x86_64 / clang@6.0.0 -----------------------
4ef57sw tcl@8.6.8%clang
pdfmc5x zlib@1.2.8%clang

pdfmc5x zlib@1.2.8%clang

5qffmms zlib@1.2.11%clang


-- linux-ubuntu18.04-x86_64 / gcc@6.5.0 -------------------------
qtrzwov zlib@1.2.11%gcc


-- linux-ubuntu18.04-x86_64 / gcc@7.5.0 -------------------------
nwb3bf5 autoconf@2.69%gcc
mkc3u4x m4@1.4.18%gcc
lbrx7ln libsigsegv@2.12%gcc
hyrsxn4 perl@5.30.3%gcc
4av4gyw gdbm@1.18.1%gcc
t54jzdy readline@8.0%gcc
crhlefo ncurses@6.2%gcc

wdflovn automake@1.16.2%gcc
hyrsxn4 perl@5.30.3%gcc
4av4gyw gdbm@1.18.1%gcc
t54jzdy readline@8.0%gcc
crhlefo ncurses@6.2%gcc

hrv4dx5 findutils@4.6.0%gcc

4av4gyw gdbm@1.18.1%gcc
t54jzdy readline@8.0%gcc
crhlefo ncurses@6.2%gcc

g2cmvjr hdf5@1.10.6%gcc
smoyzzo zlib@1.2.11%gcc

pjpfy3s hdf5@1.10.6%gcc
wudo6ky openmpi@3.1.6%gcc
ckxpgsn hwloc@1.11.11%gcc
cmn6yii libpciaccess@0.13.5%gcc
m3l53bh libxml2@2.9.10%gcc
jearpk4 libiconv@1.16%gcc
6nxes4r xz@5.2.5%gcc
smoyzzo zlib@1.2.11%gcc
yvxocdy numactl@2.0.12%gcc

znt7mfz hdf5@1.10.6%gcc
qrpxybc mpich@3.3.2%gcc
luexnup hwloc@2.2.0%gcc
cmn6yii libpciaccess@0.13.5%gcc
m3l53bh libxml2@2.9.10%gcc
jearpk4 libiconv@1.16%gcc
6nxes4r xz@5.2.5%gcc
smoyzzo zlib@1.2.11%gcc

ckxpgsn hwloc@1.11.11%gcc
cmn6yii libpciaccess@0.13.5%gcc
m3l53bh libxml2@2.9.10%gcc
jearpk4 libiconv@1.16%gcc
6nxes4r xz@5.2.5%gcc
smoyzzo zlib@1.2.11%gcc
yvxocdy numactl@2.0.12%gcc

luexnup hwloc@2.2.0%gcc
cmn6yii libpciaccess@0.13.5%gcc
m3l53bh libxml2@2.9.10%gcc
jearpk4 libiconv@1.16%gcc
6nxes4r xz@5.2.5%gcc
smoyzzo zlib@1.2.11%gcc

jearpk4 libiconv@1.16%gcc

cmn6yii libpciaccess@0.13.5%gcc

lbrx7ln libsigsegv@2.12%gcc

jdxbjft libtool@2.4.6%gcc

m3l53bh libxml2@2.9.10%gcc
jearpk4 libiconv@1.16%gcc
6nxes4r xz@5.2.5%gcc
smoyzzo zlib@1.2.11%gcc

mkc3u4x m4@1.4.18%gcc
lbrx7ln libsigsegv@2.12%gcc

qrpxybc mpich@3.3.2%gcc
luexnup hwloc@2.2.0%gcc
cmn6yii libpciaccess@0.13.5%gcc
m3l53bh libxml2@2.9.10%gcc
jearpk4 libiconv@1.16%gcc
6nxes4r xz@5.2.5%gcc
smoyzzo zlib@1.2.11%gcc

crhlefo ncurses@6.2%gcc

yvxocdy numactl@2.0.12%gcc

wudo6ky openmpi@3.1.6%gcc
ckxpgsn hwloc@1.11.11%gcc
cmn6yii libpciaccess@0.13.5%gcc
m3l53bh libxml2@2.9.10%gcc
jearpk4 libiconv@1.16%gcc
6nxes4r xz@5.2.5%gcc
smoyzzo zlib@1.2.11%gcc
yvxocdy numactl@2.0.12%gcc

2nj3vxx patchelf@0.10%gcc

hyrsxn4 perl@5.30.3%gcc
4av4gyw gdbm@1.18.1%gcc
t54jzdy readline@8.0%gcc
crhlefo ncurses@6.2%gcc

4sh6pym pkgconf@1.7.3%gcc

t54jzdy readline@8.0%gcc
crhlefo ncurses@6.2%gcc

aszidzn tcl@8.6.8%gcc
smoyzzo zlib@1.2.11%gcc

xthyjrq tcl@8.6.8%gcc
h6i53if zlib@1.2.8%gcc cppflags="-O3"

cr3i7es texinfo@6.5%gcc
hyrsxn4 perl@5.30.3%gcc
4av4gyw gdbm@1.18.1%gcc
t54jzdy readline@8.0%gcc
crhlefo ncurses@6.2%gcc

gs6ag7k util-macros@1.19.1%gcc

6nxes4r xz@5.2.5%gcc

t4p5jnm zlib@1.2.8%gcc

h6i53if zlib@1.2.8%gcc cppflags="-O3"

smoyzzo zlib@1.2.11%gcc

0 comments on commit 425ab82

Please sign in to comment.