Add error message to slurm step
@@ -2295,6 +2295,8 @@ class Chip:
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
+ # TODO: output should be fed to log, and stdout if quiet = False
+
# If a watchdog was configured, feed it whenever new output is printed.
for line in step_result.stdout:
if 'watchdog' in self.status:
@@ -2305,6 +2307,10 @@ class Chip:
# the '.returncode' value will not be set correctly.
step_result.wait()
+ if step_result.returncode > 0:
+ self.logger.error(f'srun command for {step} failed with code '
+ f'{step_result.returncode}')
+
# Clear active bit after the 'srun' command, and set 'error' accordingly.
error[step + str(index)] = step_result.returncode
active[step + str(index)] = 0
