Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix time calculation for batch jobs #1618

Merged
merged 10 commits into from
Sep 15, 2023
Merged

Fix time calculation for batch jobs #1618

merged 10 commits into from
Sep 15, 2023

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
32 of 34 checks passed
@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