Skip to content

Commit 42bbb5f

Browse files
committed
pipeline-runner: Explanation for cause of no-progress workflows
1 parent ce853fb commit 42bbb5f

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

MC/bin/o2_dpg_workflow_runner.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1155,6 +1155,24 @@ def produce_script(self, filename):
11551155
outF.close()
11561156

11571157

1158+
# print error message when no progress can be made
1159+
def noprogress_errormsg(self):
1160+
# TODO: rather than writing this out here; refer to the documentation discussion this?
1161+
msg = """Scheduler runtime error: The scheduler is not able to make progress although we have a non-zero candidate set.
1162+
1163+
Explanation: This is typically the case because the **ESTIMATED** resource requirements for some tasks
1164+
in the workflow exceed the available number of CPU cores or the memory (as explicitely or implicitely determined from the
1165+
--cpu-limit and --mem-limit options). Often, this might be the case on laptops with <=16GB of RAM if one of the tasks
1166+
is demanding ~16GB. In this case, one could try to tell the scheduler to use a slightly higher memory limit
1167+
with an explicit --mem-limit option (for instance `--mem-limit 20000` to set to 20GB). This might work whenever the
1168+
**ACTUAL** resource usage of the tasks is smaller than anticipated (because only small test cases are run).
1169+
1170+
In addition it might be worthwile running the workflow without this resource aware, dynamic scheduler.
1171+
This is possible by converting the json workflow into a linearized shell script and by directly executing the shell script.
1172+
Use the `--produce-script myscript.sh` option for this.
1173+
"""
1174+
print (msg, file=sys.stderr)
1175+
11581176
def execute(self):
11591177
starttime = time.perf_counter()
11601178
psutil.cpu_percent(interval=None)
@@ -1249,7 +1267,7 @@ def speedup_ROOT_Init():
12491267
actionlogger.debug('Sorted current candidates: ' + str([(c,self.idtotask[c]) for c in candidates]))
12501268
self.try_job_from_candidates(candidates, self.process_list, finished)
12511269
if len(candidates) > 0 and len(self.process_list) == 0:
1252-
print("Runtime error: Not able to make progress: Nothing scheduled although non-zero candidate set", file=sys.stderr)
1270+
self.noprogress_errormsg()
12531271
send_webhook(self.args.webhook,"Unable to make further progress: Quitting")
12541272
errorencountered = True
12551273
break

0 commit comments

Comments
 (0)