integrator.slurm module#

class integrator.slurm.SlurmResourcesConfiguration(partition: str = 'gpu', time: str = '01:00:00', memory: str = '100GB', cpus_per_task: int = 1, gres: str = 'gpu:1', cores_per_socket: int = 1)#

Bases: object

partition: str = 'gpu'#
time: str = '01:00:00'#
memory: str = '100GB'#
cpus_per_task: int = 1#
gres: str = 'gpu:1'#
cores_per_socket: int = 1#
format_cli()#
integrator.slurm.submit_bash_script(slurm_resources, script_file, log_dir=None, workspace_dir=None, slurm_command_args=None, log_basename='slurm')#

Submit a SLURM script.

Parameters:
  • slurm_resources (SlurmResourcesConfiguration) – Object describing the SLURM resources to use.

  • script_source (str, optional) – String with the source code of the bash script. Mutually exclusive with ‘script_file’.

  • script_file (str, optional) – Script file name. Mutually exclusive with ‘script_source’.

  • log_dir (str, optional) – Directory where the SLURM “.out” file is written. Default is “logs”.

  • workspace_dir (str, optional) – directory where auxilliary files are stored. Default is .integrator_workspace.

  • slurm_command_args (str or list, optional) – Parameters to be passed the bash script. If a list is passed, the same “sbatch” command will be looped with the parameters from the list.

Returns:

ret – Result from submission command. If ‘slurm_command_args’ is a list, ret will be the result of each individual sbatch command.

Return type:

str or bytes or list