nic
nic

Reputation: 1551

Default job time limit in Slurm

I want to allow the user scheduling a job to list any job time limit using -t, --time=<time>. However, when the user does not set a time limit I'd like to impose a default time limit, for example 1 hour. I can't find any setting in slurm.conf to do this.

Upvotes: 5

Views: 16807

Answers (2)

damienfrancois
damienfrancois

Reputation: 59360

The default time limit is set per partition. If not specified, the maximum time limit is used:

DefaultTime

Run time limit used for jobs that don't specify a value. If not set then MaxTime will be used. Format is the same as for MaxTime.

Example:

PartitionName=debug Nodes=dev[0-8,18-25] MaxTime=12:00:00 DefaultTime=00:30:00 Default=YES 

This will set the maximum wall time for the partition to 12 hours and the default, if not specified by the user, to 30 minutes.

Upvotes: 5

Raihan K.
Raihan K.

Reputation: 591

You can't set default time limit twice, right? If user do not specify time then the job will be terminated automatically when the job is completed. You can read about -t, --time here. Anyways, the default time limit is the partition's default time limit. So, you can have it changed as you like.

Here's an example of slurm.conf to set time-limit for partition -

# slurm.conf file

# for CPU
PartitionName=cpu Nodes=ALL Default=YES MaxTime=INFINITE State=UP

# for GPU
PartitionName=gpu Nodes=ALL MaxTime=INFINITE State=UP

Upvotes: 0

Related Questions