docs: Use HDF5 as the example package for spack graph

This commit is contained in:
Todd Gamblin 2019-05-20 21:13:57 -07:00
parent 727089c4ef
commit 43aaf8c404
2 changed files with 17 additions and 13 deletions

View File

@ -488,7 +488,7 @@ supply ``--profile`` to Spack on the command line, before any subcommands.
``spack --profile`` output looks like this:
.. command-output:: spack --profile graph dyninst
.. command-output:: spack --profile graph hdf5
:ellipsis: 25
The bottom of the output shows the top most time consuming functions,

View File

@ -4017,32 +4017,36 @@ Spack provides the ``spack graph`` command for graphing dependencies.
The command by default generates an ASCII rendering of a spec's
dependency graph. For example:
.. command-output:: spack graph mpileaks
.. command-output:: spack graph hdf5
At the top is the root package in the DAG, with dependency edges emerging
from it. On a color terminal, the edges are colored by which dependency
they lead to.
.. command-output:: spack graph --deptype=all mpileaks
.. command-output:: spack graph --deptype=link hdf5
The ``deptype`` argument tells Spack what types of dependencies to graph.
By default it includes link and run dependencies but not build
dependencies. Supplying ``--deptype=all`` will show the build
dependencies as well. This is equivalent to
``--deptype=build,link,run``. Options for ``deptype`` include:
dependencies. Supplying ``--deptype=link`` will show only link
dependencies. The default is ``--deptype=all``, which is equivalent to
``--deptype=build,link,run,test``. Options for ``deptype`` include:
* Any combination of ``build``, ``link``, and ``run`` separated by
commas.
* ``all`` or ``alldeps`` for all types of dependencies.
* Any combination of ``build``, ``link``, ``run``, and ``test`` separated
by commas.
* ``all`` for all types of dependencies.
You can also use ``spack graph`` to generate graphs in the widely used
`Dot <http://www.graphviz.org/doc/info/lang.html>`_ format. For
example:
`Dot <http://www.graphviz.org/doc/info/lang.html>`_ format. For example:
.. command-output:: spack graph --dot mpileaks
.. command-output:: spack graph --dot hdf5
This graph can be provided as input to other graphing tools, such as
those in `Graphviz <http://www.graphviz.org>`_.
those in `Graphviz <http://www.graphviz.org>`_. If you have graphviz
installed, you can write straight to PDF like this:
.. code-block:: console
$ spack graph --dot hdf5 | dot -Tpdf > hdf5.pdf
.. _packaging-shell-support: