Skip to content

Fix time calculation for batch jobs#1618

Merged
shahzebsiddiqui merged 10 commits intodevelfrom
elapsed_time
Sep 15, 2023
Merged

Fix time calculation for batch jobs#1618
shahzebsiddiqui merged 10 commits intodevelfrom
elapsed_time

Conversation

@shahzebsiddiqui
Copy link
Member

No description provided.

…ll be used to determine how

long job is run in raw seconds. This will be used when --timeout is specified to cancel job if elapsed time
has exceeded timeout value
cancel if elapsed time exceeds test timeout
…completed jobs

also update the calcuation for total runtime when its a batch job to use elapsed time
…e this for cancelling job

when pendtime exceeds maxpendtime
… in Job class.

We use this variable as reference point when job was submitted to calculate pending time using time.time().
This will avoid us from having to query the scheduler for the elapsed pending time. We use this to determine when to cancel
job
…ndtime exceeds maxpendtime.

These methods are defined in BaseExecutor class which can be invoked in each executor method.
Add this implementation for slurm and lsf scheduler to call these methods.
round calculation to 2 decimals for calculating elapsedtime and pendtime.
also print pendtime and elapsedtime as columns into the table
also fix an issue when using 1 sec poll interval with slurm where sacct
can't retrieve the job state. For this we sleep 0.1 sec if job state is
not retrieved and retry again.
…ass since there was code that was redundant

update the __init__ method for BaseExecutor to take variables account, maxpendtime which can be optionally passed in. These are required
for batch executors
@shahzebsiddiqui shahzebsiddiqui merged commit 555e1fc into devel Sep 15, 2023
@shahzebsiddiqui shahzebsiddiqui deleted the elapsed_time branch September 15, 2023 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant