mache.parallel.system.cap_wall_time

mache.parallel.system.cap_wall_time(desired: str, max_wallclock: str) str[source]

Cap a desired wall time at a scheduler target’s maximum.

Parameters:
  • desired (str) – The wall time (HH:MM:SS) the caller would like to request.

  • max_wallclock (str) – The maximum wall time (HH:MM:SS) the target allows, typically from SlurmOptions.max_wallclock or PbsOptions.max_wallclock.

Returns:

wall_time (str) – max_wallclock if it is shorter than desired, otherwise desired unchanged. desired is also returned unchanged if either value is empty or cannot be parsed.