Skip to content

Commit 8fdedf0

Browse files
authored
move graph example to tcl (from hdf5) and give 'spack spec' example (#461)
Signed-off-by: Gregory Becker <[email protected]>
1 parent 033f14c commit 8fdedf0

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

outputs/basics.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,16 @@ example basics/tcl-zlib-hash "spack install tcl ^/${zlib_hash}"
5151

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

54+
example basics/graph-tcl "spack graph tcl"
55+
56+
example basics/hdf5-spec "spack spec hdf5"
5457
example basics/hdf5 "spack install hdf5"
5558
example basics/hdf5-no-mpi "spack install hdf5~mpi"
5659

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

5962
example basics/find-ldf-2 "spack find -ldf"
6063

61-
example basics/graph-hdf5 "spack graph hdf5+hl+mpi ^mpich"
62-
6364
example basics/trilinos "spack install trilinos"
6465

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

tutorial_basics.rst

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,23 @@ Note that each package has a top-level entry, even if it also appears as a depen
166166
.. literalinclude:: outputs/basics/find-ldf.out
167167
:language: console
168168

169+
Spack models the dependencies of packages as a directed acyclic graph (DAG).
170+
The ``spack find -d`` command shows the tree representation of that graph, which loses some dependency relationship information.
171+
We can also use the ``spack graph`` command to view the entire DAG as a graph.
172+
173+
.. literalinclude:: outputs/basics/graph-tcl.out
174+
:language: console
175+
169176
Let's move on to slightly more complicated packages.
170177
HDF5 is a good example of a more complicated package, with an MPI dependency.
171178
If we install it with default settings it will build with OpenMPI.
179+
We can check the install plan in advance to ensure it's what we want to install using the ``spack spec`` command.
180+
The ``spack spec`` command accepts the same spec syntax.
181+
182+
.. literalinclude:: outputs/basics/hdf5-spec.out
183+
:language: console
184+
185+
Assuming we're happy with that configuration, we will now install it.
172186

173187
.. literalinclude:: outputs/basics/hdf5.out
174188
:language: console
@@ -201,13 +215,6 @@ We'll do a quick check in on what we have installed so far.
201215
.. literalinclude:: outputs/basics/find-ldf-2.out
202216
:language: console
203217

204-
Spack models the dependencies of packages as a directed acyclic graph (DAG).
205-
The ``spack find -d`` command shows the tree representation of that graph.
206-
We can also use the ``spack graph`` command to view the entire DAG as a graph.
207-
208-
.. literalinclude:: outputs/basics/graph-hdf5.out
209-
:language: console
210-
211218
HDF5 is more complicated than our basic example of zlib-ng and Tcl, but it's still within the realm of software that an experienced HPC user could reasonably expect to manually install given a bit of time.
212219
Now let's look at an even more complicated package.
213220

0 commit comments

Comments
 (0)