microsoft / aiida-dynamic-workflows

An AiiDA plugin for dynamically defining workflows using Python functions
MIT License
17 stars 4 forks source link

scheduler plugin chokes when job exits immediately #10

Open ltalirz opened 2 years ago

ltalirz commented 2 years ago

If the remote job dies immediately, it can happen that the scheduler plugin raises an exception:

*** 2 LOG MESSAGES:
+-> ERROR at 2022-03-03 16:34:44.678009+00:00
 | the `parse_output` method of the scheduler excepted: not enough values to unpack (expected at least 1, got 0)
+-> REPORT at 2022-03-03 16:34:45.789686+00:00
 | [227|PyCalcJob|on_except]: Traceback (most recent call last):
 |   File "/opt/conda/lib/python3.8/site-packages/plumpy/process_states.py", line 231, in execute
 |     result = self.run_fn(*self.args, **self.kwargs)
 |   File "/home/aiida/aiida-core/aiida/engine/processes/calcjobs/calcjob.py", line 471, in parse
 |     exit_code_retrieved = self.parse_retrieved_output(retrieved_temporary_folder)
 |   File "/home/aiida/aiida-core/aiida/engine/processes/calcjobs/calcjob.py", line 560, in parse_retrieved_output
 |     exit_code = parser.parse(**parse_kwargs)
 |   File "/home/aiida/aiida-dynamic-workflows/aiida_dynamic_workflows/parsers.py", line 52, in parse
 |     job_infos = calc.computer.get_scheduler().parse_detailed_job_info(
 |   File "/home/aiida/aiida-dynamic-workflows/aiida_dynamic_workflows/schedulers.py", line 64, in parse_detailed_job_info
 |     fields, *job_infos = lines
 | ValueError: not enough values to unpack (expected at least 1, got 0)