Requesting runtime is straightforward: The
–time flag can be used in
$ srun --time <time reservation>
or within a script
#SBATCH -t <time reservation>
<time reservation> can be any of the acceptable time formats
Time resolution is one minute and second values are rounded up to the next minute. A time limit of zero requests that no time limit be imposed, meaning that the maximum runtime of the partitions will be used.
Slurm does not send signals if not requested. You can request a specific signal with
–signal either to
sbatch from within a script. The flag can be used like
–signal=<sig_num>[@<sig_time>]: When a job is within
sig_time seconds of its end time, then the signal
sig_num is sended. If a sig_num is specified without any sig_time, the default time will 60 seconds. Due to the resolution of event handling by Slurm, the signal may be sent up to 60 seconds earlier than specified.
An example would be
$ sbatch --signal=SIGUSR2@600 ...
here, the signal
SIGUSR2 is send to the application ten minutes before hitting the walltime of the job. Note once more that the slurm documentation states that there is a uncertainty of up to 1 minute.