Fix transitions between tutorial sections (#11251)

This commit is contained in:
Greg Becker 2019-04-22 17:14:26 +09:00 committed by Todd Gamblin
parent 0aed3bcea6
commit 5aa4edb939
3 changed files with 21 additions and 11 deletions

View File

@ -27,8 +27,8 @@ Setup for the tutorial
.. note::
If you are not using the tutorial docker image, it is recommended that you
do this section of the tutorial in a fresh clone of Spack
We do not recommend doing this section of the tutorial in a
production Spack instance.
The tutorial uses custom package definitions with missing sections that
will be filled in during the tutorial. These package definitions are stored
@ -38,13 +38,14 @@ in a separate package repository, which can be enabled with:
$ spack repo add --scope=site var/spack/repos/tutorial
This section of the tutorial may also require a newer version of gcc, which
you can add with:
This section of the tutorial may also require a newer version of
gcc. If you have not already installed gcc@7.2.0 and added it to your
configuration, you can do so with:
.. code-block:: console
$ spack install gcc@7.2.0
$ spack compiler add --scope=site path/to/spack-installed-gcc/bin
$ spack install gcc@7.2.0 %gcc@5.4.0
$ spack compiler add --scope=site `spack location -i gcc@7.2.0 %gcc@5.4.0`
If you are using the tutorial docker image, all dependency packages
will have been installed. Otherwise, to install these packages you can use

View File

@ -868,7 +868,7 @@ this will look like:
.. code-block:: console
$ spack install --no-cache --verbose zlib
$ spack install --no-cache --verbose --overwrite zlib
==> Installing zlib
==> Using cached archive: /home/user/spack/var/spack/cache/zlib/zlib-1.2.11.tar.gz
==> Staging archive: /home/user/spack/var/spack/stage/zlib-1.2.11-5nus6knzumx4ik2yl44jxtgtsl7d54xb/zlib-1.2.11.tar.gz
@ -897,14 +897,14 @@ the number of cores our build uses, set ``build_jobs`` like so:
.. code-block:: yaml
config:
build_jobs: 4
build_jobs: 2
If we uninstall and reinstall zlib, we see that it now uses only 4 cores:
.. code-block:: console
$ spack install --no-cache --verbose zlib
$ spack install --no-cache --verbose --overwrite zlib
==> Installing zlib
==> Using cached archive: /home/user/spack/var/spack/cache/zlib/zlib-1.2.11.tar.gz
==> Staging archive: /home/user/spack/var/spack/stage/zlib-1.2.11-5nus6knzumx4ik2yl44jxtgtsl7d54xb/zlib-1.2.11.tar.gz
@ -914,9 +914,9 @@ If we uninstall and reinstall zlib, we see that it now uses only 4 cores:
==> Executing phase: 'install'
==> './configure' '--prefix=/home/user/spack/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/zlib-1.2.11-5nus6knzumx4ik2yl44jxtgtsl7d54xb'
...
==> 'make' '-j4'
==> 'make' '-j2'
...
==> 'make' '-j4' 'install'
==> 'make' '-j2' 'install'
...
==> Successfully installed zlib
Fetch: 0.00s. Build: 1.03s. Total: 1.03s.

View File

@ -554,3 +554,12 @@ More examples can be found in the thousands of packages already added to
Spack in ``$SPACK_ROOT/var/spack/repos/builtin/packages``.
Good Luck!
To ensure that future sections of the tutorial run properly, please
uninstall mpileaks and remove the tutorial repo from your
configuration.
.. code-block: console
$ spack uninstall -ay mpileaks
$ spack repo remove tutorial