config.py: deprecate config:install_path_scheme (#48463)
This commit is contained in:
parent
55d9fe20e5
commit
fa9ef0ac89
@ -25,14 +25,23 @@ These settings can be overridden in ``etc/spack/config.yaml`` or
|
|||||||
The location where Spack will install packages and their dependencies.
|
The location where Spack will install packages and their dependencies.
|
||||||
Default is ``$spack/opt/spack``.
|
Default is ``$spack/opt/spack``.
|
||||||
|
|
||||||
---------------------------------------------------
|
---------------
|
||||||
``install_hash_length`` and ``install_path_scheme``
|
``projections``
|
||||||
---------------------------------------------------
|
---------------
|
||||||
|
|
||||||
The default Spack installation path can be very long and can create problems
|
.. warning::
|
||||||
for scripts with hardcoded shebangs. Additionally, when using the Intel
|
|
||||||
compiler, and if there is also a long list of dependencies, the compiler may
|
Modifying projections of the install tree is strongly discouraged.
|
||||||
segfault. If you see the following:
|
|
||||||
|
By default Spack installs all packages into a unique directory relative to the install
|
||||||
|
tree root with the following layout:
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
{architecture}/{compiler.name}-{compiler.version}/{name}-{version}-{hash}
|
||||||
|
|
||||||
|
In very rare cases, it may be necessary to reduce the length of this path. For example,
|
||||||
|
very old versions of the Intel compiler are known to segfault when input paths are too long:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
@ -40,36 +49,25 @@ segfault. If you see the following:
|
|||||||
** Segmentation violation signal raised. **
|
** Segmentation violation signal raised. **
|
||||||
Access violation or stack overflow. Please contact Intel Support for assistance.
|
Access violation or stack overflow. Please contact Intel Support for assistance.
|
||||||
|
|
||||||
it may be because variables containing dependency specs may be too long. There
|
Another case is Python and R packages with many runtime dependencies, which can result
|
||||||
are two parameters to help with long path names. Firstly, the
|
in very large ``PYTHONPATH`` and ``R_LIBS`` environment variables. This can cause the
|
||||||
``install_hash_length`` parameter can set the length of the hash in the
|
``execve`` system call to fail with ``E2BIG``, preventing processes from starting.
|
||||||
installation path from 1 to 32. The default path uses the full 32 characters.
|
|
||||||
|
|
||||||
Secondly, it is also possible to modify the entire installation
|
For this reason, Spack allows users to modify the installation layout through custom
|
||||||
scheme. By default Spack uses
|
projections. For example
|
||||||
``{architecture}/{compiler.name}-{compiler.version}/{name}-{version}-{hash}``
|
|
||||||
where the tokens that are available for use in this directive are the
|
|
||||||
same as those understood by the :meth:`~spack.spec.Spec.format`
|
|
||||||
method. Using this parameter it is possible to use a different package
|
|
||||||
layout or reduce the depth of the installation paths. For example
|
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
config:
|
config:
|
||||||
install_path_scheme: '{name}/{version}/{hash:7}'
|
install_tree:
|
||||||
|
root: $spack/opt/spack
|
||||||
|
projections:
|
||||||
|
all: "{name}/{version}/{hash:16}"
|
||||||
|
|
||||||
would install packages into sub-directories using only the package
|
would install packages into sub-directories using only the package name, version and a
|
||||||
name, version and a hash length of 7 characters.
|
hash length of 16 characters.
|
||||||
|
|
||||||
When using either parameter to set the hash length it only affects the
|
Notice that reducing the hash length increases the likelihood of hash collisions.
|
||||||
representation of the hash in the installation directory. You
|
|
||||||
should be aware that the smaller the hash length the more likely
|
|
||||||
naming conflicts will occur. These parameters are independent of those
|
|
||||||
used to configure module names.
|
|
||||||
|
|
||||||
.. warning:: Modifying the installation hash length or path scheme after
|
|
||||||
packages have been installed will prevent Spack from being
|
|
||||||
able to find the old installation directories.
|
|
||||||
|
|
||||||
--------------------
|
--------------------
|
||||||
``build_stage``
|
``build_stage``
|
||||||
|
@ -106,10 +106,17 @@
|
|||||||
{
|
{
|
||||||
"names": ["install_missing_compilers"],
|
"names": ["install_missing_compilers"],
|
||||||
"message": "The config:install_missing_compilers option has been deprecated in "
|
"message": "The config:install_missing_compilers option has been deprecated in "
|
||||||
"Spack v0.23, and is currently ignored. It will be removed from config after "
|
"Spack v0.23, and is currently ignored. It will be removed from config in "
|
||||||
"Spack v1.0.",
|
"Spack v1.0.",
|
||||||
"error": False,
|
"error": False,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"names": ["install_path_scheme"],
|
||||||
|
"message": "The config:install_path_scheme option was deprecated in Spack v0.16 "
|
||||||
|
"in favor of config:install_tree:projections:all. It will be removed in Spack "
|
||||||
|
"v1.0.",
|
||||||
|
"error": False,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user