Skip to content

Commit

Permalink
Slurm, fix submitting tasks multiple times
Browse files Browse the repository at this point in the history
submit_helper writes an invalid state to _task_info_cache,
and then task_state returns STATE_UNKNOWN,
which causes STATE_INTERRUPTED_RESUMABLE,
which causes a resubmit.

Fix #163
  • Loading branch information
albertz committed Jan 9, 2024
1 parent 1d4bd09 commit 310d731
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def submit_helper(self, call, logpath, rqmt, name, task_name, start_id, end_id,

logging.info("Submitted with job_id: %s %s" % (job_id, name))
for task_id in range(start_id, end_id, step_size):
self._task_info_cache[(name, task_id)].append((job_id, "PD"))
self._task_info_cache[(name, task_id)].append((job_id, "PENDING"))

if err:
logging.warning(f"Got error while submitting job (but job {job_id} was submitted)")
Expand Down

0 comments on commit 310d731

Please sign in to comment.