mache.spack.make_spack_env
- mache.spack.make_spack_env(spack_path, env_name, spack_specs, compiler, mpi, *, machine=None, config_file=None, include_e3sm_lapack=False, include_e3sm_hdf5_netcdf=None, e3sm_hdf5_netcdf=None, yaml_template=None, exclude_packages=None, tmpdir=None, spack_mirror=None, custom_spack='', pins=None, activation='captured', build_jobs=None)[source]
Check out Spack and the package repositories pinned by this release of mache (see
mache/spack/pins.yaml) and build a spack environment for the given machine, compiler and MPI library. The environment YAML, build script, build prologue,spack.lockand provenance are written to the current directory.- Parameters:
spack_path (str) – The base path where spack has been (or will be) cloned
env_name (str) – The name of the spack environment to be created or recreated
spack_specs (list of str) – A list of spack package specs to include in the environment
compiler (str) – One of the E3SM supported compilers for the
machinempi (str) – One of the E3SM supported MPI libraries for the given
compilerandmachinemachine (str, optional) – The name of an E3SM supported machine. If none is given, the machine will be detected automatically via the host name.
config_file (str, optional) – The name of a config file to load config options from.
include_e3sm_lapack (bool, optional) – Whether to include the same lapack (typically from MKL) as used in E3SM
e3sm_hdf5_netcdf (bool, optional) – Whether to include the same hdf5, netcdf-c, netcdf-fortran and pnetcdf as used in E3SM
include_e3sm_hdf5_netcdf (bool, optional) – Deprecated alias for
e3sm_hdf5_netcdf.yaml_template (str, optional) – A jinja template for a yaml file to be used for the environment instead of the mache template. This allows you to use compilers and other modules that differ from E3SM.
exclude_packages (sequence of str or str, optional) – System-provided Spack packages to opt out of when rendering the machine template. These package entries are removed from the rendered YAML so Spack can build them instead. The aliases
e3sm_hdf5_netcdfandhdf5_netcdfexclude the machine-provided HDF5/NetCDF bundle.tmpdir (str, optional) – A temporary directory for building spack packages
spack_mirror (str, optional) – The absolute path to a local spack mirror (e.g. for files a given machine isn’t allowed to download)
custom_spack (str, optional) – Spack commands to run at the end of the script after the environment has been installed.
pins (dict or str, optional) – Overrides for the pinned Spack sources, either a mapping in the
pins.yamlschema or the path to a YAML file holding one. Each override names atag,commitorbranchfor one of the pinned repositories.activation ({'captured', 'dynamic'}, optional) – Whether to capture
spack env activateintoactivate.shandactivate.cshin the environment directory after the build, so that load scripts can source them instead of running Spack.build_jobs (int, optional) – The number of parallel build jobs, passed to
spack install -j