Skip to content
This repository was archived by the owner on Jan 26, 2026. It is now read-only.

Commit bb8699b

Browse files
committed
made slurm output erros to both the job and system log
1 parent c51b55b commit bb8699b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

PAV/modules/slurmjobcontroller.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,16 @@ def start(self):
170170
self.logger.info(self.lh + " : " + slurm_cmd)
171171
# call to invoke real Slurm command
172172

173-
output = subprocess.check_output(slurm_cmd, shell=True)
173+
try:
174+
output = subprocess.check_output(slurm_cmd, shell=True)
175+
except subprocess.CalledProcessError as e:
176+
self.logger.info(self.lh + " : sbatch exit status:" + str(e.returncode))
177+
print "sbatch exit status:" + str(e.returncode)
178+
self.logger.info(self.lh + " : sbatch output:" + e.output)
179+
print "sbatch output:" + e.output
180+
sys.stdout.flush()
181+
raise
182+
174183
# Finds the jobid in the output.
175184
jid = 0
176185
if not output is None and "job" in output:

0 commit comments

Comments
 (0)