diff --git a/outputs/basics.sh b/outputs/basics.sh index 4e258d476f..f5d26577ea 100755 --- a/outputs/basics.sh +++ b/outputs/basics.sh @@ -51,6 +51,9 @@ example basics/tcl-zlib-hash "spack install tcl ^/${zlib_hash}" example basics/find-ldf "spack find -ldf" +example basics/graph-tcl "spack graph tcl" + +example basics/hdf5-spec "spack spec hdf5" example basics/hdf5 "spack install hdf5" example basics/hdf5-no-mpi "spack install hdf5~mpi" @@ -58,8 +61,6 @@ 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" diff --git a/tutorial_basics.rst b/tutorial_basics.rst index 0cd8304e9e..64da753ee5 100644 --- a/tutorial_basics.rst +++ b/tutorial_basics.rst @@ -166,9 +166,23 @@ Note that each package has a top-level entry, even if it also appears as a depen .. literalinclude:: outputs/basics/find-ldf.out :language: console +Spack models the dependencies of packages as a directed acyclic graph (DAG). +The ``spack find -d`` command shows the tree representation of that graph, which loses some dependency relationship information. +We can also use the ``spack graph`` command to view the entire DAG as a graph. + +.. literalinclude:: outputs/basics/graph-tcl.out + :language: console + Let's move on to slightly more complicated packages. HDF5 is a good example of a more complicated package, with an MPI dependency. If we install it with default settings it will build with OpenMPI. +We can check the install plan in advance to ensure it's what we want to install using the ``spack spec`` command. +The ``spack spec`` command accepts the same spec syntax. + +.. literalinclude:: outputs/basics/hdf5-spec.out + :language: console + +Assuming we're happy with that configuration, we will now install it. .. literalinclude:: outputs/basics/hdf5.out :language: console @@ -201,13 +215,6 @@ We'll do a quick check in on what we have installed so far. .. literalinclude:: outputs/basics/find-ldf-2.out :language: console -Spack models the dependencies of packages as a directed acyclic graph (DAG). -The ``spack find -d`` command shows the tree representation of that graph. -We can also use the ``spack graph`` command to view the entire DAG as a graph. - -.. literalinclude:: outputs/basics/graph-hdf5.out - :language: console - 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. Now let's look at an even more complicated package.