Hi Raman, I'll expand a little on what Ian said. The Condor way of doing this sort of thing is to add a ClassAd attribute to the job. For example, in the submit file, the user could put the following: +MaxRunHours = 8 If you want to automatically remove jobs that run for longer than the specified max runtime, you can put the following in the Condor configuration on the submit machine: SYSTEM_PERIODIC_REMOVE = JobStatus == 2 && (CurrentTime
- EnteredCurrentStatus > 3600*MaxRunHours)
The above _expression_ assumes that MaxRunHours is always defined. A slightly more complicated _expression_ could supply a default value of 1 hour if MaxRunHours is undefined by the user: DEFAULT_MAX_RUN_HOURS = 1 SYSTEM_PERIODIC_REMOVE = JobStatus == 2 && (CurrentTime - EnteredCurrentStatus > 3600*ifThenElse(isUndefined(MaxRunHours),$(DEFAULT_MAX_RUN_HOURS),MaxRunHours)) There are more things you might want to configure based on MaxRunHours (e.g. preemption policy), but the above should implement the basic policy of a strict upper bound on job runtime. --Dan On 1/27/12 7:11 AM, Ian Chesal wrote:
|