Skip to content
Snippets Groups Projects

Fix launching work directly (not via Slurm)

Merged Thomas Kluyver requested to merge dont-require-slurm-env into master
All threads resolved!
@@ -141,6 +141,8 @@ def get_job_info(jobs: List[str], fmt: List[str]) -> List[List[str]]:
Result ordered according to order of jobs given
Order of fields in inner lists follows fmt
"""
if not jobs:
return [] # Skip calling sacct if not using Slurm
# will use JobID to match results to jobs (duplicate field in fmt is OK)
fmt_query = ",".join(["JobID"] + fmt)
@@ -389,17 +391,6 @@ def tex_escape(text):
def finalize(joblist, finaljob, run_path, out_path, version, report_to, data_path='Unknown',
request_time='', submission_time=''):
run_path = Path(run_path)
print("Waiting on jobs to finish: {}".format(joblist))
while True:
found_jobs = set()
output = check_output(['squeue']).decode('utf8')
for line in output.split("\n"):
for job in joblist:
if str(job) in line:
found_jobs.add(job)
if not found_jobs:
break
sleep(10)
prepare_plots(run_path)
Loading