You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With Slurm, the UserCPU output of sacct can be empty, for instance if a job got cancelled while it was pending. In such cases, common.getSeconds() will log an error and return -1.
Perhaps a better action is to silently return 0.
If that is not acceptable, then a test for this case should be added in createUsageRecord() in slurm.py, so it circumvents getSeconds() if the value is empty (or calls getSeconds() with '00:00').
If one wants to be more secure, one could do this only when Start and End times are the same (or Elapsed is '00:00:00'), and allow getSeconds() to log an error otherwise.
The text was updated successfully, but these errors were encountered:
Actually, perhaps it is better just to filter out all job records where End == Start (or Elapsed == '00:00:00'), since all jobs that are cancelled while pending, look like this. And accounting jobs of zero run time is perhaps not so interesting.
Just checking for elapsed == 00:00:00 was not enough; there are jobs with elapsed > 0 but with missing UserCPU. I've created a pull request that skips jobs with zero elapsed, and which uses 00:00:00 when UserCPU field is missing: #26
With Slurm, the UserCPU output of sacct can be empty, for instance if a job got cancelled while it was pending. In such cases, common.getSeconds() will log an error and return -1.
Perhaps a better action is to silently return 0.
If that is not acceptable, then a test for this case should be added in createUsageRecord() in slurm.py, so it circumvents getSeconds() if the value is empty (or calls getSeconds() with '00:00').
If one wants to be more secure, one could do this only when Start and End times are the same (or Elapsed is '00:00:00'), and allow getSeconds() to log an error otherwise.
The text was updated successfully, but these errors were encountered: