executorlib.standalone.command.generate_slurm_command#
- executorlib.standalone.command.generate_slurm_command(cores: int, cwd: str | None, threads_per_core: int = 1, gpus_per_core: int = 0, num_nodes: int | None = None, exclusive: bool = False, openmpi_oversubscribe: bool = False, slurm_cmd_args: list[str] | None = None, pmi_mode: str | None = None, run_time_max: int | None = None) list[str][source]#
Generate the command list for the SLURM interface.
- Parameters:
cores (int) – The number of cores.
cwd (str) – The current working directory.
threads_per_core (int, optional) – The number of threads per core. Defaults to 1.
gpus_per_core (int, optional) – The number of GPUs per core. Defaults to 0.
num_nodes (int, optional) – The number of compute nodes to use for executing the task. Defaults to None.
exclusive (bool) – Whether to exclusively reserve the compute nodes, or allow sharing compute notes. Defaults to False.
openmpi_oversubscribe (bool, optional) – Whether to oversubscribe the cores. Defaults to False.
slurm_cmd_args (list[str], optional) – Additional command line arguments. Defaults to [].
pmi_mode (str) – PMI interface to use (OpenMPI v5 requires pmix) default is None
run_time_max (int) – The maximum runtime in seconds for each task. Default: None
- Returns:
The generated command list.
- Return type:
list[str]