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=False, yaml_template=None, tmpdir=None, spack_mirror=None, custom_spack='')[source]
Clone the
spack_for_mache_{{version}}
branch from E3SM’s spack clone and build a spack environment for the given machine, compiler and MPI library.- 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
machine
mpi (str) – One of the E3SM supported MPI libraries for the given
compiler
andmachine
machine (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
include_e3sm_hdf5_netcdf (bool, optional) – Whether to include the same hdf5, netcdf-c, netcdf-fortran and pnetcdf as used in E3SM
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.
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.