From 5aa4edb939a26e6383995d432e10d6cdc0ef0a47 Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Mon, 22 Apr 2019 17:14:26 +0900 Subject: Fix transitions between tutorial sections (#11251) --- lib/spack/docs/tutorial_advanced_packaging.rst | 13 +++++++------ lib/spack/docs/tutorial_configuration.rst | 10 +++++----- lib/spack/docs/tutorial_packaging.rst | 9 +++++++++ 3 files changed, 21 insertions(+), 11 deletions(-) (limited to 'lib') diff --git a/lib/spack/docs/tutorial_advanced_packaging.rst b/lib/spack/docs/tutorial_advanced_packaging.rst index 772c147994..e8466002e1 100644 --- a/lib/spack/docs/tutorial_advanced_packaging.rst +++ b/lib/spack/docs/tutorial_advanced_packaging.rst @@ -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 diff --git a/lib/spack/docs/tutorial_configuration.rst b/lib/spack/docs/tutorial_configuration.rst index 6040ceb43b..52f789a763 100644 --- a/lib/spack/docs/tutorial_configuration.rst +++ b/lib/spack/docs/tutorial_configuration.rst @@ -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. diff --git a/lib/spack/docs/tutorial_packaging.rst b/lib/spack/docs/tutorial_packaging.rst index e2f71ba392..e85401da05 100644 --- a/lib/spack/docs/tutorial_packaging.rst +++ b/lib/spack/docs/tutorial_packaging.rst @@ -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 -- cgit v1.2.3-70-g09d2