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

Slurm, fix duplicate jobs #157

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion sisyphus/simple_linux_utility_for_resource_management_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def submit_helper(self, call, logpath, rqmt, name, task_name, start_id, end_id,
job_id = None
if len(out) == 1:
sout = out[0].split()
if retval != 0 or len(err) > 0 or len(sout) != 4 or sout[0:3] != ref_output:
if retval != 0 or len(sout) != 4 or sout[0:3] != ref_output:
print(retval, len(err), len(sout), sout[0:3], ref_output)
logging.error("Error to submit job")
logging.error("SBATCH command: %s" % " ".join(sbatch_call))
Expand All @@ -253,6 +253,14 @@ def submit_helper(self, call, logpath, rqmt, name, task_name, start_id, end_id,
for task_id in range(start_id, end_id, step_size):
self._task_info_cache[(name, task_id)].append((job_id, "PD"))

if err:
logging.warning(f"Got error while submitting job (but job {job_id} was submitted)")
logging.warning("SBATCH command: %s" % " ".join(sbatch_call))
for line in out:
logging.warning("Output: %s" % line.decode())
for line in err:
logging.warning("Error: %s" % line.decode())

else:
logging.error("Error to submit job, return value: %i" % retval)
logging.error("SBATCH command: %s" % " ".join(sbatch_call))
Expand Down
Loading