mache.spack.get_spack_script
- mache.spack.get_spack_script(spack_path, env_name, compiler, mpi, shell, machine=None, config_file=None, include_e3sm_lapack=False, include_e3sm_hdf5_netcdf=False, yaml_template=None)[source]
Build a snippet of a load script for the given spack environment
- 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
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
shell ({'sh', 'csh'}) – Which shell the script is for
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.
- Returns:
load_script (str) – A snippet of a shell script that will load the given spack environment and add any additional steps required for using the environment such as setting environment variables or loading modules not handled by the spack environment directly