Skip to content

Commit

Permalink
Clarify walltime setting logic; fix units in comments
Browse files Browse the repository at this point in the history
  • Loading branch information
brianhlin committed Mar 26, 2021
1 parent d55e59d commit 3e795e7
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions config/01-ce-router-defaults.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -253,20 +253,21 @@ JOB_ROUTER_TRANSFORM_BatchRuntime @=jrt
# 'BatchRuntime' is in seconds but admins configure 'default_maxWallTime' and 'ROUTED_JOB_MAX_TIME' and remote
# submitters set 'maxWallTime' in minutes. Remote submitters set 'BatchRuntime' in minutes
# Set the remote batch runtime used by non-HTCondor batch systems to one of the following, in order:
# 1. 'maxWalltime' (seconds) from the source job
# 2. 'BatchRuntime' (minutes) from the source job
# 3. 'default_maxWallTime' (seconds) from the route
# 1. 'maxWalltime' (minutes) from the source job
# 2. 'BatchRuntime' (seconds) from the source job
# 3. 'default_maxWallTime' (minutes) from the route
# 4. 'ROUTED_JOB_MAX_TIME' (minutes) from the config
def_walltime = 60*$(ROUTED_JOB_MAX_TIME)
if defined default_maxWallTime
def_walltime = 60*$(default_maxWallTime)
endif

if defined MY.orig_BatchRuntime
if defined MY.maxWallTime
def_walltime = 60*$(MY.maxWallTime)
elif defined MY.org_BatchRuntime
def_walltime = orig_BatchRuntime
elif defined default_maxWallTime
def_walltime = 60*$(default_maxWallTime)
else
def_walltime = 60*$(ROUTED_JOB_MAX_TIME)
endif

SET BatchRuntime (60*MY.maxWallTime) ?: $(def_walltime)
SET BatchRuntime $(def_walltime)
@jrt


Expand Down

1 comment on commit 3e795e7

@johnkn
Copy link
Contributor

@johnkn johnkn commented on 3e795e7 Mar 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If ROUTED_JOB_MAX_TIME is not defined, you could end up setting BatchRuntime to 60* which is not a valid expression.

Please sign in to comment.