mache.deploy.spack.deploy_spack_envs

mache.deploy.spack.deploy_spack_envs(*, ctx: DeployContext, toolchain_pairs: list[tuple[str, str]], log_filename: str, quiet: bool) list[SpackDeployResult][source]

Deploy one Spack environment per (compiler, mpi) toolchain pair.

This function is a thin orchestration layer. It reads deploy config from ctx.config['spack'], renders deploy/spack.yaml.j2 to obtain the spec list, uses mache’s Spack environment templates (mache/spack/templates/*.yaml) to construct a full environment YAML, runs Spack to concretize and install the environment, and produces a shell snippet for the generated load scripts.

Notes

This is intentionally “E3SM flavored”: it uses get_spack_script() to load compiler/MPI modules and settings from config_machines.xml.

Returns:

results – A list of SpackDeployResult, one per (compiler, mpi)