update documentation.
This commit is contained in:
parent
d94972503a
commit
d087086581
@ -1,6 +1,6 @@
|
|||||||
.. _site-configuration:
|
.. _configuration:
|
||||||
|
|
||||||
Site configuration
|
Configuration
|
||||||
===================================
|
===================================
|
||||||
|
|
||||||
.. _temp-space:
|
.. _temp-space:
|
||||||
@ -55,7 +55,7 @@ directory is.
|
|||||||
|
|
||||||
|
|
||||||
External Packages
|
External Packages
|
||||||
~~~~~~~~~~~~~~~~~~~~~
|
----------------------------
|
||||||
Spack can be configured to use externally-installed
|
Spack can be configured to use externally-installed
|
||||||
packages rather than building its own packages. This may be desirable
|
packages rather than building its own packages. This may be desirable
|
||||||
if machines ship with system packages, such as a customized MPI
|
if machines ship with system packages, such as a customized MPI
|
||||||
@ -78,7 +78,7 @@ This example lists three installations of OpenMPI, one built with gcc,
|
|||||||
one built with gcc and debug information, and another built with Intel.
|
one built with gcc and debug information, and another built with Intel.
|
||||||
If Spack is asked to build a package that uses one of these MPIs as a
|
If Spack is asked to build a package that uses one of these MPIs as a
|
||||||
dependency, it will use the the pre-installed OpenMPI in
|
dependency, it will use the the pre-installed OpenMPI in
|
||||||
the given directory.
|
the given directory.
|
||||||
|
|
||||||
Each ``packages.yaml`` begins with a ``packages:`` token, followed
|
Each ``packages.yaml`` begins with a ``packages:`` token, followed
|
||||||
by a list of package names. To specify externals, add a ``paths``
|
by a list of package names. To specify externals, add a ``paths``
|
||||||
@ -110,7 +110,7 @@ be:
|
|||||||
paths:
|
paths:
|
||||||
openmpi@1.4.3%gcc@4.4.7=chaos_5_x86_64_ib: /opt/openmpi-1.4.3
|
openmpi@1.4.3%gcc@4.4.7=chaos_5_x86_64_ib: /opt/openmpi-1.4.3
|
||||||
openmpi@1.4.3%gcc@4.4.7=chaos_5_x86_64_ib+debug: /opt/openmpi-1.4.3-debug
|
openmpi@1.4.3%gcc@4.4.7=chaos_5_x86_64_ib+debug: /opt/openmpi-1.4.3-debug
|
||||||
openmpi@1.6.5%intel@10.1=chaos_5_x86_64_ib: /opt/openmpi-1.6.5-intel
|
openmpi@1.6.5%intel@10.1=chaos_5_x86_64_ib: /opt/openmpi-1.6.5-intel
|
||||||
buildable: False
|
buildable: False
|
||||||
|
|
||||||
The addition of the ``buildable`` flag tells Spack that it should never build
|
The addition of the ``buildable`` flag tells Spack that it should never build
|
||||||
@ -118,13 +118,73 @@ its own version of OpenMPI, and it will instead always rely on a pre-built
|
|||||||
OpenMPI. Similar to ``paths``, ``buildable`` is specified as a property under
|
OpenMPI. Similar to ``paths``, ``buildable`` is specified as a property under
|
||||||
a package name.
|
a package name.
|
||||||
|
|
||||||
The ``buildable`` does not need to be paired with external packages.
|
The ``buildable`` does not need to be paired with external packages.
|
||||||
It could also be used alone to forbid packages that may be
|
It could also be used alone to forbid packages that may be
|
||||||
buggy or otherwise undesirable.
|
buggy or otherwise undesirable.
|
||||||
|
|
||||||
|
|
||||||
|
Concretization Preferences
|
||||||
|
--------------------------------
|
||||||
|
|
||||||
|
Spack can be configured to prefer certain compilers, package
|
||||||
|
versions, depends_on, and variants during concretization.
|
||||||
|
The preferred configuration can be controlled via the
|
||||||
|
``~/.spack/packages.yaml`` file for user configuations, or the
|
||||||
|
``etc/spack/packages.yaml`` site configuration.
|
||||||
|
|
||||||
|
|
||||||
|
Here's an example packages.yaml file that sets preferred packages:
|
||||||
|
|
||||||
|
.. code-block:: sh
|
||||||
|
|
||||||
|
packages:
|
||||||
|
dyninst:
|
||||||
|
compiler: [gcc@4.9]
|
||||||
|
variants: +debug
|
||||||
|
gperftools:
|
||||||
|
version: [2.2, 2.4, 2.3]
|
||||||
|
all:
|
||||||
|
compiler: [gcc@4.4.7, gcc@4.6:, intel, clang, pgi]
|
||||||
|
providers:
|
||||||
|
mpi: [mvapich, mpich, openmpi]
|
||||||
|
|
||||||
|
|
||||||
|
At a high level, this example is specifying how packages should be
|
||||||
|
concretized. The dyninst package should prefer using gcc 4.9 and
|
||||||
|
be built with debug options. The gperftools package should prefer version
|
||||||
|
2.2 over 2.4. Every package on the system should prefer mvapich for
|
||||||
|
its MPI and gcc 4.4.7 (except for Dyninst, which overrides this by preferring gcc 4.9).
|
||||||
|
These options are used to fill in implicit defaults. Any of them can be overwritten
|
||||||
|
on the command line if explicitly requested.
|
||||||
|
|
||||||
|
Each packages.yaml file begins with the string ``packages:`` and
|
||||||
|
package names are specified on the next level. The special string ``all``
|
||||||
|
applies settings to each package. Underneath each package name is
|
||||||
|
one or more components: ``compiler``, ``variants``, ``version``,
|
||||||
|
or ``providers``. Each component has an ordered list of spec
|
||||||
|
``constraints``, with earlier entries in the list being preferred over
|
||||||
|
later entries.
|
||||||
|
|
||||||
|
Sometimes a package installation may have constraints that forbid
|
||||||
|
the first concretization rule, in which case Spack will use the first
|
||||||
|
legal concretization rule. Going back to the example, if a user
|
||||||
|
requests gperftools 2.3 or later, then Spack will install version 2.4
|
||||||
|
as the 2.4 version of gperftools is preferred over 2.3.
|
||||||
|
|
||||||
|
An explicit concretization rule in the preferred section will always
|
||||||
|
take preference over unlisted concretizations. In the above example,
|
||||||
|
xlc isn't listed in the compiler list. Every listed compiler from
|
||||||
|
gcc to pgi will thus be preferred over the xlc compiler.
|
||||||
|
|
||||||
|
The syntax for the ``provider`` section differs slightly from other
|
||||||
|
concretization rules. A provider lists a value that packages may
|
||||||
|
``depend_on`` (e.g, mpi) and a list of rules for fulfilling that
|
||||||
|
dependency.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Profiling
|
Profiling
|
||||||
~~~~~~~~~~~~~~~~~~~~~
|
------------------
|
||||||
|
|
||||||
Spack has some limited built-in support for profiling, and can report
|
Spack has some limited built-in support for profiling, and can report
|
||||||
statistics using standard Python timing tools. To use this feature,
|
statistics using standard Python timing tools. To use this feature,
|
||||||
@ -133,7 +193,7 @@ supply ``-p`` to Spack on the command line, before any subcommands.
|
|||||||
.. _spack-p:
|
.. _spack-p:
|
||||||
|
|
||||||
``spack -p``
|
``spack -p``
|
||||||
^^^^^^^^^^^^^^^^^^
|
~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
``spack -p`` output looks like this:
|
``spack -p`` output looks like this:
|
||||||
|
|
@ -47,7 +47,7 @@ Table of Contents
|
|||||||
basic_usage
|
basic_usage
|
||||||
packaging_guide
|
packaging_guide
|
||||||
mirrors
|
mirrors
|
||||||
site_configuration
|
configuration
|
||||||
developer_guide
|
developer_guide
|
||||||
command_index
|
command_index
|
||||||
package_list
|
package_list
|
||||||
|
@ -1648,8 +1648,8 @@ point will Spack call the ``install()`` method for your package.
|
|||||||
Concretization in Spack is based on certain selection policies that
|
Concretization in Spack is based on certain selection policies that
|
||||||
tell Spack how to select, e.g., a version, when one is not specified
|
tell Spack how to select, e.g., a version, when one is not specified
|
||||||
explicitly. Concretization policies are discussed in more detail in
|
explicitly. Concretization policies are discussed in more detail in
|
||||||
:ref:`site-configuration`. Sites using Spack can customize them to
|
:ref:`configuration`. Sites using Spack can customize them to match
|
||||||
match the preferences of their own users.
|
the preferences of their own users.
|
||||||
|
|
||||||
.. _spack-spec:
|
.. _spack-spec:
|
||||||
|
|
||||||
@ -1682,60 +1682,8 @@ be concretized on their system. For example, one user may prefer packages
|
|||||||
built with OpenMPI and the Intel compiler. Another user may prefer
|
built with OpenMPI and the Intel compiler. Another user may prefer
|
||||||
packages be built with MVAPICH and GCC.
|
packages be built with MVAPICH and GCC.
|
||||||
|
|
||||||
Spack can be configured to prefer certain compilers, package
|
See the `documentation in the config section <concretization-preferences_>`_
|
||||||
versions, depends_on, and variants during concretization.
|
for more details.
|
||||||
The preferred configuration can be controlled via the
|
|
||||||
``~/.spack/packages.yaml`` file for user configuations, or the
|
|
||||||
``etc/spack/packages.yaml`` site configuration.
|
|
||||||
|
|
||||||
|
|
||||||
Here's an example packages.yaml file that sets preferred packages:
|
|
||||||
|
|
||||||
.. code-block:: sh
|
|
||||||
|
|
||||||
packages:
|
|
||||||
dyninst:
|
|
||||||
compiler: [gcc@4.9]
|
|
||||||
variants: +debug
|
|
||||||
gperftools:
|
|
||||||
version: [2.2, 2.4, 2.3]
|
|
||||||
all:
|
|
||||||
compiler: [gcc@4.4.7, gcc@4.6:, intel, clang, pgi]
|
|
||||||
providers:
|
|
||||||
mpi: [mvapich, mpich, openmpi]
|
|
||||||
|
|
||||||
|
|
||||||
At a high level, this example is specifying how packages should be
|
|
||||||
concretized. The dyninst package should prefer using gcc 4.9 and
|
|
||||||
be built with debug options. The gperftools package should prefer version
|
|
||||||
2.2 over 2.4. Every package on the system should prefer mvapich for
|
|
||||||
its MPI and gcc 4.4.7 (except for Dyninst, which overrides this by preferring gcc 4.9).
|
|
||||||
These options are used to fill in implicit defaults. Any of them can be overwritten
|
|
||||||
on the command line if explicitly requested.
|
|
||||||
|
|
||||||
Each packages.yaml file begins with the string ``packages:`` and
|
|
||||||
package names are specified on the next level. The special string ``all``
|
|
||||||
applies settings to each package. Underneath each package name is
|
|
||||||
one or more components: ``compiler``, ``variants``, ``version``,
|
|
||||||
or ``providers``. Each component has an ordered list of spec
|
|
||||||
``constraints``, with earlier entries in the list being preferred over
|
|
||||||
later entries.
|
|
||||||
|
|
||||||
Sometimes a package installation may have constraints that forbid
|
|
||||||
the first concretization rule, in which case Spack will use the first
|
|
||||||
legal concretization rule. Going back to the example, if a user
|
|
||||||
requests gperftools 2.3 or later, then Spack will install version 2.4
|
|
||||||
as the 2.4 version of gperftools is preferred over 2.3.
|
|
||||||
|
|
||||||
An explicit concretization rule in the preferred section will always
|
|
||||||
take preference over unlisted concretizations. In the above example,
|
|
||||||
xlc isn't listed in the compiler list. Every listed compiler from
|
|
||||||
gcc to pgi will thus be preferred over the xlc compiler.
|
|
||||||
|
|
||||||
The syntax for the ``provider`` section differs slightly from other
|
|
||||||
concretization rules. A provider lists a value that packages may
|
|
||||||
``depend_on`` (e.g, mpi) and a list of rules for fulfilling that
|
|
||||||
dependency.
|
|
||||||
|
|
||||||
.. _install-method:
|
.. _install-method:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user