summaryrefslogtreecommitdiff
path: root/lib/spack/docs/getting_started.rst
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2020-07-31 12:58:48 +0200
committerPeter Scheibel <scheibel1@llnl.gov>2020-08-10 11:59:05 -0700
commit193e8333fa23a2e9b44d44a80e153d9a27033860 (patch)
treeb2f8f03ced8aeb13694ff37085f0cd8c46e5e5e5 /lib/spack/docs/getting_started.rst
parent1398038beead1a1532fc337165e2b6bf9d58c284 (diff)
downloadspack-193e8333fa23a2e9b44d44a80e153d9a27033860.tar.gz
spack-193e8333fa23a2e9b44d44a80e153d9a27033860.tar.bz2
spack-193e8333fa23a2e9b44d44a80e153d9a27033860.tar.xz
spack-193e8333fa23a2e9b44d44a80e153d9a27033860.zip
Update packages.yaml format and support configuration updates
The YAML config for paths and modules of external packages has changed: the new format allows a single spec to load multiple modules. Spack will automatically convert from the old format when reading the configs (the updates do not add new essential properties, so this change in Spack is backwards-compatible). With this update, Spack cannot modify existing configs/environments without updating them (e.g. “spack config add” will fail if the configuration is in a format that predates this PR). The user is prompted to do this explicitly and commands are provided. All config scopes can be updated at once. Each environment must be updated one at a time.
Diffstat (limited to 'lib/spack/docs/getting_started.rst')
-rw-r--r--lib/spack/docs/getting_started.rst57
1 files changed, 38 insertions, 19 deletions
diff --git a/lib/spack/docs/getting_started.rst b/lib/spack/docs/getting_started.rst
index 550f2509e6..26deb1cef5 100644
--- a/lib/spack/docs/getting_started.rst
+++ b/lib/spack/docs/getting_started.rst
@@ -712,8 +712,9 @@ an OpenMPI installed in /opt/local, one would use:
packages:
openmpi:
- paths:
- openmpi@1.10.1: /opt/local
+ externals:
+ - spec: openmpi@1.10.1
+ prefix: /opt/local
buildable: False
In general, Spack is easier to use and more reliable if it builds all of
@@ -775,8 +776,9 @@ Then add the following to ``~/.spack/packages.yaml``:
packages:
openssl:
- paths:
- openssl@1.0.2g: /usr
+ externals:
+ - spec: openssl@1.0.2g
+ prefix: /usr
buildable: False
@@ -791,8 +793,9 @@ to add the following to ``packages.yaml``:
packages:
netlib-lapack:
- paths:
- netlib-lapack@3.6.1: /usr
+ externals:
+ - spec: netlib-lapack@3.6.1
+ prefix: /usr
buildable: False
all:
providers:
@@ -1181,9 +1184,13 @@ Here's an example of an external configuration for cray modules:
packages:
mpich:
- modules:
- mpich@7.3.1%gcc@5.2.0 arch=cray_xc-haswell-CNL10: cray-mpich
- mpich@7.3.1%intel@16.0.0.109 arch=cray_xc-haswell-CNL10: cray-mpich
+ externals:
+ - spec: "mpich@7.3.1%gcc@5.2.0 arch=cray_xc-haswell-CNL10"
+ modules:
+ - cray-mpich
+ - spec: "mpich@7.3.1%intel@16.0.0.109 arch=cray_xc-haswell-CNL10"
+ modules:
+ - cray-mpich
all:
providers:
mpi: [mpich]
@@ -1195,7 +1202,7 @@ via module load.
.. note::
- For Cray-provided packages, it is best to use ``modules:`` instead of ``paths:``
+ For Cray-provided packages, it is best to use ``modules:`` instead of ``prefix:``
in ``packages.yaml``, because the Cray Programming Environment heavily relies on
modules (e.g., loading the ``cray-mpich`` module adds MPI libraries to the
compiler wrapper link line).
@@ -1211,19 +1218,31 @@ Here is an example of a full packages.yaml used at NERSC
packages:
mpich:
- modules:
- mpich@7.3.1%gcc@5.2.0 arch=cray_xc-CNL10-ivybridge: cray-mpich
- mpich@7.3.1%intel@16.0.0.109 arch=cray_xc-SuSE11-ivybridge: cray-mpich
+ externals:
+ - spec: "mpich@7.3.1%gcc@5.2.0 arch=cray_xc-CNL10-ivybridge"
+ modules:
+ - cray-mpich
+ - spec: "mpich@7.3.1%intel@16.0.0.109 arch=cray_xc-SuSE11-ivybridge"
+ modules:
+ - cray-mpich
buildable: False
netcdf:
- modules:
- netcdf@4.3.3.1%gcc@5.2.0 arch=cray_xc-CNL10-ivybridge: cray-netcdf
- netcdf@4.3.3.1%intel@16.0.0.109 arch=cray_xc-CNL10-ivybridge: cray-netcdf
+ externals:
+ - spec: "netcdf@4.3.3.1%gcc@5.2.0 arch=cray_xc-CNL10-ivybridge"
+ modules:
+ - cray-netcdf
+ - spec: "netcdf@4.3.3.1%intel@16.0.0.109 arch=cray_xc-CNL10-ivybridge"
+ modules:
+ - cray-netcdf
buildable: False
hdf5:
- modules:
- hdf5@1.8.14%gcc@5.2.0 arch=cray_xc-CNL10-ivybridge: cray-hdf5
- hdf5@1.8.14%intel@16.0.0.109 arch=cray_xc-CNL10-ivybridge: cray-hdf5
+ externals:
+ - spec: "hdf5@1.8.14%gcc@5.2.0 arch=cray_xc-CNL10-ivybridge"
+ modules:
+ - cray-hdf5
+ - spec: "hdf5@1.8.14%intel@16.0.0.109 arch=cray_xc-CNL10-ivybridge"
+ modules:
+ - cray-hdf5
buildable: False
all:
compiler: [gcc@5.2.0, intel@16.0.0.109]