Skip to main content

utils.assert_sufficient_time

utils.assert_sufficient_time(minimum='1:00:00')

Check if remaining SLURM walltime is sufficient.

This function checks if the remaining walltime of SLURM is larger than the minimum when the script is run through the SLURM job manager. If the remaining walltime is insufficient, it will stop the remaining parts of the script from running by executing exit(0).

Parameters

Name Type Description Default
minimum str The minimal walltime in SLURM format. E.g., ‘1-02:03:04’ means 1 day, 2 hours, 3 minutes, and 4 seconds. '1:00:00'