Skip to content

Commit

Permalink
Add some setup instructions at the top of each section (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgamblin committed Nov 9, 2020
1 parent 7ef7ab7 commit a9897a4
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 8 deletions.
12 changes: 12 additions & 0 deletions common/setup.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.. admonition:: Tutorial setup

If you have not done the prior sections, you'll need to set Spack up
like this::

git clone https://github.com/spack/spack
. spack/share/spack/setup-env.sh
spack tutorial

See the :ref:`basics-tutorial` for full details on setup. For more
help join us in the ``#tutorial`` channel on Slack -- get an
invitation at `spackpm.herokuapp.com <https://spackpm.herokuapp.com>`_
2 changes: 2 additions & 0 deletions tutorial_advanced_packaging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
SPDX-License-Identifier: (Apache-2.0 OR MIT)
.. include:: common/setup.rst

.. _advanced-packaging-tutorial:

============================
Expand Down
4 changes: 3 additions & 1 deletion tutorial_buildsystems.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
SPDX-License-Identifier: (Apache-2.0 OR MIT)
.. include:: common/setup.rst

.. _build-systems-tutorial:

===========================
Expand Down Expand Up @@ -41,7 +43,7 @@ Package Class Hierarchy
PackageBase -> CMakePackage [dir=back]
PackageBase -> PythonPackage [dir=back]
}

The above diagram gives a high level view of the class hierarchy and how each
package relates. Each subclass inherits from the :code:`PackageBaseClass`
super class. The bulk of the work is done in this super class which includes
Expand Down
2 changes: 2 additions & 0 deletions tutorial_configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
SPDX-License-Identifier: (Apache-2.0 OR MIT)
.. include:: common/setup.rst

.. _configs-tutorial:

======================
Expand Down
2 changes: 2 additions & 0 deletions tutorial_developer_workflows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
SPDX-License-Identifier: (Apache-2.0 OR MIT)
.. include:: common/setup.rst

.. _developer-workflows-tutorial:

============================
Expand Down
2 changes: 2 additions & 0 deletions tutorial_environments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
SPDX-License-Identifier: (Apache-2.0 OR MIT)
.. include:: common/setup.rst

.. _environments-tutorial:

=====================
Expand Down
16 changes: 9 additions & 7 deletions tutorial_modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
SPDX-License-Identifier: (Apache-2.0 OR MIT)
.. include:: common/setup.rst

.. _modules-tutorial:

=====================
Expand All @@ -12,7 +14,7 @@ Module Files Tutorial
This tutorial illustrates how Spack can be used to generate module files
for the software that has been installed. Both hierarchical and non-hierarchical
deployments will be discussed in details and we will show how to customize
the content and naming of each module file.
the content and naming of each module file.

At the end of the tutorial readers should have a clear understanding of:

Expand All @@ -21,7 +23,7 @@ At the end of the tutorial readers should have a clear understanding of:
* Which Spack commands can be used to manage module files
* How module files generated by Spack can be customized

and be confident that Spack can deal with all of the common use cases
and be confident that Spack can deal with all of the common use cases
that occur when maintaining software installations on HPC clusters.

.. _module_file_tutorial_prerequisites:
Expand All @@ -30,10 +32,10 @@ that occur when maintaining software installations on HPC clusters.
Setup for the Tutorial
----------------------

To prepare for this tutorial we are going to install a small but representative set
To prepare for this tutorial we are going to install a small but representative set
of software that includes different configurations of the same packages and some `external packages
<https://spack.readthedocs.io/en/latest/build_settings.html#sec-external-packages>`_.
To keep the installations manageable, let's start by uninstalling everything from
To keep the installations manageable, let's start by uninstalling everything from
earlier in the tutorial:

.. code-block:: console
Expand Down Expand Up @@ -201,8 +203,8 @@ Lmod is a module system written in Lua, originally created at the
$ spack install lmod
as shown in the :ref:`module_file_tutorial_prerequisites` section.
It is a drop-in replacement for Environment Modules, and it works
with *both* Tcl and Lua module files.
It is a drop-in replacement for Environment Modules, and it works
with *both* Tcl and Lua module files.
It is fully compatible with Environment Modules, but it also
has many distinguishing features of its own. The main one is the
`module hierarchy <http://lmod.readthedocs.io/en/latest/010_user.html#module-hierarchy>`_,
Expand Down Expand Up @@ -232,7 +234,7 @@ do not need to install it yourself.
Modules vs ``spack load``
^^^^^^^^^^^^^^^^^^^^^^^^^

You may have noticed that we used ``spack load`` in the
You may have noticed that we used ``spack load`` in the
:ref:`module_file_tutorial_prerequisites` section above. This is a
built-in mechanism of Spack's -- it's designed so that users on a cluster
or a laptop can quickly get a package into their path, and it understands
Expand Down
2 changes: 2 additions & 0 deletions tutorial_packaging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
SPDX-License-Identifier: (Apache-2.0 OR MIT)
.. include:: common/setup.rst

.. _packaging-tutorial:

=========================
Expand Down
2 changes: 2 additions & 0 deletions tutorial_spack_scripting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
SPDX-License-Identifier: (Apache-2.0 OR MIT)
.. include:: common/setup.rst

.. _spack-scripting-tutorial:

====================
Expand Down
2 changes: 2 additions & 0 deletions tutorial_stacks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
SPDX-License-Identifier: (Apache-2.0 OR MIT)
.. include:: common/setup.rst

.. _stacks-tutorial:

===============
Expand Down

0 comments on commit a9897a4

Please sign in to comment.