fluiddyn.clusters.slurm

Slurm clusters (fluiddyn.clusters.slurm)

Provides:

class fluiddyn.clusters.slurm.ClusterSlurm[source]

Bases: fluiddyn.clusters.local.ClusterLocal

Base class for clusters with SLURM job scheduler.

check_slurm()[source]

Check if this script is run on a frontal with slurm installed.

check_name_cluster(env='HOSTNAME')[source]

Check if self.name_cluster matches the environment variable.

submit_command(command, name_run='fluiddyn', nb_nodes=1, nb_cores_per_node=None, walltime='23:59:58', project=None, nb_mpi_processes=None, omp_num_threads=1, nb_runs=1, path_launching_script=None, path_resume=None, retain_script=True, jobid=None, requeue=False, nb_switches=None, max_waittime=None, ask=True, bash=True, email=None, interactive=False, **kwargs)[source]

Submit a command.

Parameters:

command : string

Command which executes the run

name_run : string

Name of the run to be displayed in SLURM queue

nb_nodes : integer

Sets number of MPI processes = nb_nodes * nb_cores_per_node

nb_cores_per_node : integer

Defaults to a maximum is fixed for a cluster, as set by self.nb_cores_per_node. Set as 1 for a serial job. Set as 0 to spread jobs across nodes (starts job faster, maybe slower).

walltime : string

Minimum walltime for the job

project : string

Sets the allocation to run the job under

nb_mpi_processes : integer

Number of MPI processes. Defaults to a nb_cores_per_node * nb_nodes.

omp_num_threads : integer

Number of OpenMP threads

nb_runs : integer

Number of times to submit jobs (launch once using command and resume thereafter with path_resume script / command).

path_launching_script: string

Path of the SLURM jobscript

path_resume : string

Path of the script to resume a job, which takes one argument - the path_run parsed from the output.

retain_script : boolean

Retail or delete script after launching job

jobid : integer

Run under already allocated job

requeue : boolean

If set True, permit the job to be requeued.

nb_switches : integer

Max / Optimum switches

max_waittime : string

Max time to wait for optimum

ask : boolean

Ask for user input to submit the jobscript or not

bash : boolean

Submit jobscript via call_bash function

email : string

In case of failure notify to the specified email address

interactive : boolean

Use cmd_run_interactive instead of cmd_run inside the jobscript

Classes

ClusterSlurm() Base class for clusters with SLURM job scheduler.