Reuse concretization by default (#30396)
* Enable reuse by default in Spack * Update documentation to match new default * Configure pipelines not to reuse software
This commit is contained in:
parent
faa277778e
commit
d900ac2003
@ -14,7 +14,7 @@ concretizer:
|
||||
# concretizing specs. If `true`, we'll try to use as many installs/binaries
|
||||
# as possible, rather than building. If `false`, we'll always give you a fresh
|
||||
# concretization.
|
||||
reuse: false
|
||||
reuse: true
|
||||
# Options that tune which targets are considered for concretization. The
|
||||
# concretization process is very sensitive to the number targets, and the time
|
||||
# needed to reach a solution increases noticeably with the number of targets
|
||||
@ -27,4 +27,4 @@ concretizer:
|
||||
# If "false" allow targets that are incompatible with the current host (for
|
||||
# instance concretize with target "icelake" while running on "haswell").
|
||||
# If "true" only allow targets that are compatible with the host.
|
||||
host_compatible: false
|
||||
host_compatible: true
|
||||
|
@ -192,32 +192,32 @@ you can use them to customize an installation in :ref:`sec-specs`.
|
||||
Reusing installed dependencies
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. warning::
|
||||
By default, when you run ``spack install``, Spack tries hard to reuse existing installations
|
||||
as dependencies, either from a local store or from remote buildcaches if configured.
|
||||
This minimizes unwanted rebuilds of common dependencies, in particular if
|
||||
you update Spack frequently.
|
||||
|
||||
The ``--reuse`` option described here will become the default installation
|
||||
method in the next Spack version, and you will be able to get the current
|
||||
behavior by using ``spack install --fresh``.
|
||||
|
||||
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:
|
||||
In case you want the latest versions and configurations to be installed instead,
|
||||
you can add the ``--fresh`` option:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ spack install --reuse mpich
|
||||
$ spack install --fresh 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
|
||||
Reusing installations in this mode is "accidental", and happening only if
|
||||
there's a match between existing installations and what Spack would have installed
|
||||
anyhow.
|
||||
|
||||
You can use the ``spack spec -I mpich`` command to see what
|
||||
will be reused and what will be built before you install.
|
||||
|
||||
You can configure Spack to use the ``--reuse`` behavior by default in
|
||||
``concretizer.yaml``.
|
||||
You can configure Spack to use the ``--fresh`` behavior by default in
|
||||
``concretizer.yaml``:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
concretizer:
|
||||
reuse: false
|
||||
|
||||
.. _cmd-spack-uninstall:
|
||||
|
||||
|
@ -242,12 +242,7 @@ to enable reuse for a single installation, and you can use:
|
||||
spack install --fresh <spec>
|
||||
|
||||
to do a fresh install if ``reuse`` is enabled by default.
|
||||
|
||||
.. note::
|
||||
|
||||
``reuse: false`` is the current default, but ``reuse: true`` will be the default
|
||||
in the next Spack release. You will still be able to use ``spack install --fresh``
|
||||
to get the old behavior.
|
||||
``reuse: true`` is the default.
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Selection of the target microarchitectures
|
||||
|
@ -2,6 +2,9 @@ spack:
|
||||
view: false
|
||||
concretization: separately
|
||||
|
||||
concretizer:
|
||||
reuse: false
|
||||
|
||||
config:
|
||||
install_tree:
|
||||
root: /home/software/spack
|
||||
|
@ -2,6 +2,9 @@ spack:
|
||||
view: false
|
||||
concretization: separately
|
||||
|
||||
concretizer:
|
||||
reuse: false
|
||||
|
||||
config:
|
||||
install_tree:
|
||||
root: /home/software/spack
|
||||
|
@ -2,6 +2,9 @@ spack:
|
||||
view: false
|
||||
concretization: separately
|
||||
|
||||
concretizer:
|
||||
reuse: false
|
||||
|
||||
config:
|
||||
concretizer: clingo
|
||||
install_tree:
|
||||
|
@ -2,6 +2,9 @@ spack:
|
||||
view: false
|
||||
concretization: separately
|
||||
|
||||
concretizer:
|
||||
reuse: false
|
||||
|
||||
config:
|
||||
concretizer: clingo
|
||||
install_tree:
|
||||
|
@ -2,6 +2,9 @@ spack:
|
||||
view: false
|
||||
concretization: separately
|
||||
|
||||
concretizer:
|
||||
reuse: false
|
||||
|
||||
config:
|
||||
concretizer: clingo
|
||||
install_tree:
|
||||
|
@ -2,6 +2,9 @@ spack:
|
||||
concretization: separately
|
||||
view: false
|
||||
|
||||
concretizer:
|
||||
reuse: false
|
||||
|
||||
config:
|
||||
concretizer: clingo
|
||||
install_tree:
|
||||
|
@ -2,6 +2,9 @@ spack:
|
||||
view: false
|
||||
concretization: separately
|
||||
|
||||
concretizer:
|
||||
reuse: false
|
||||
|
||||
config:
|
||||
install_tree:
|
||||
root: /home/software/spack
|
||||
|
Loading…
Reference in New Issue
Block a user