API reference

This page provides an auto-generated summary of the mache API. For more details and examples, refer to the relevant sections in the main part of the documentation.

discover

discover_machine([quiet])

Figure out the machine from the host name

permissions

update_permissions(base_paths, group[, ...])

Update the group that a directory belongs to along with the "group" and "other" permissions for the directory

spack

make_spack_env(spack_path, env_name, ...[, ...])

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.

get_spack_script(spack_path, env_name, ...)

Build a snippet of a load script for the given spack environment

get_modules_env_vars_and_mpi_compilers(...)

Get the non-spack modules, environment variables and compiler names for a given machine, compiler and MPI library.

extract_machine_config(xml_file, machine, ...)

Extract the machine configuration from the XML file.

config_to_shell_script(config, shell_type)

Convert the machine configuration to a shell script.

extract_spack_from_config_machines(machine, ...)

Extract machine configuration from XML and write it to a shell script.

list_machine_compiler_mpilib()

List tuples of machine, compiler, and MPI library parsed from the name of YAML files in the mache.spack.templates directory.

sync

sync_diags(other[, direction, machine, ...])

Synchronize diagnostics files between supported machines

MachineInfo

MachineInfo([machine, quiet])

An object containing information about an E3SM supported machine

MachineInfo.get_account_defaults()

Get default account, partition and quality of service (QOS) for this machine.