9. Extension of spack command in spack-stackΒΆ
This section describes the spack stack
extension of the spack
command, which simplifies the installation process. As for any other spack
command, help is available with spack stack -h
. The spack stack
extension has two subcommands, explained in the following.
spack stack [create|setup-meta-modules]
The spack stack create
command creates a new environment or a new container (add -h
for each of them for help):
spack stack create [env|ctr]
The full list of options for creating environments is:
spack stack create env [--template TEMPLATE] [--compiler COMPILER] [--name NAME] [--dir DIR] [--site SITE] [--prefix PREFIX] [--upstream UPSTREAM] [--modify-pkg MODIFY_PKG] [--keep-all-compilers]
Here, TEMPLATE
corresponds to a pre-defined list of specs (see Section 8.3), SITE
to a pre-configured or a configurable site (see Section 3). For all other options, consult the output of spack stack create env -h
and the additional information in Section 4.
The full list of options for creating containers is:
spack stack create ctr [--container CONTAINER] [--dir DIR] [--specs NAME]
CONTAINER
corresponds to a pre-defined container recipe and SPECS
to a list of packages to be installed (see Section 7). For all other options, consult the output of spack stack create ctr -h
.
Following a successful creation of an environment (not a container), and the generation of the spack
lmod/tcl
module files via spack module [lmod|tcl] refresh
, the meta modules for compiler, Python interpreter and MPI library are generated with
spack stack setup-meta-modules
This step completes the environment generation and creates a Core
directory that must be added to the module path (module use .../Core
) as shown in Section 2.