diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2021-11-04 22:47:20 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2021-11-05 00:15:47 -0700 |
commit | 8e762442661c28b3885327105d9d919fdcd929f4 (patch) | |
tree | 8a8b64921674b59a629742a01b30b6892fca0070 /lib | |
parent | 5efa76a033ccfc242546d35cc20593502ea84412 (diff) | |
download | spack-8e762442661c28b3885327105d9d919fdcd929f4.tar.gz spack-8e762442661c28b3885327105d9d919fdcd929f4.tar.bz2 spack-8e762442661c28b3885327105d9d919fdcd929f4.tar.xz spack-8e762442661c28b3885327105d9d919fdcd929f4.zip |
docs for experimental `--reuse` argument to `spack install`
Add docs for `--reuse`, along with a warning that it will likely be
removed and refactored.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/docs/basic_usage.rst | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst index 379e58324d..091b18f6b8 100644 --- a/lib/spack/docs/basic_usage.rst +++ b/lib/spack/docs/basic_usage.rst @@ -188,6 +188,34 @@ configuration a **spec**. In the commands above, ``mpileaks`` and ``mpileaks@3.0.4`` are both valid *specs*. We'll talk more about how you can use them to customize an installation in :ref:`sec-specs`. +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Reusing installed dependencies +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. warning:: + + The ``--reuse`` option described here is experimental, and it will + likely be replaced with a different option and configuration settings + in the next Spack release. + +By default, when you run ``spack install``, Spack tries to build a new +version of the package you asked for, along with updated versions of +its dependencies. This gets you the latest versions and configurations, +but it can result in unwanted rebuilds if you update Spack frequently. + +If you want Spack to try hard to reuse existing installations as dependencies, +you can add the ``--reuse`` option: + +.. code-block:: console + + $ spack install --reuse mpich + +This will not do anything if ``mpich`` is already installed. If ``mpich`` +is not installed, but dependencies like ``hwloc`` and ``libfabric`` are, +the ``mpich`` will be build with the installed versions, if possible. +You can use the :ref:`spack spec -I <cmd-spack-spec>` command to see what +will be reused and what will be built before you install. + .. _cmd-spack-uninstall: ^^^^^^^^^^^^^^^^^^^ |