Skip to content

Commit

Permalink
made slurm output erros to both the job and system log
Browse files Browse the repository at this point in the history
  • Loading branch information
cadejager committed Jul 28, 2016
1 parent c51b55b commit bb8699b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion PAV/modules/slurmjobcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,16 @@ def start(self):
self.logger.info(self.lh + " : " + slurm_cmd)
# call to invoke real Slurm command

output = subprocess.check_output(slurm_cmd, shell=True)
try:
output = subprocess.check_output(slurm_cmd, shell=True)
except subprocess.CalledProcessError as e:
self.logger.info(self.lh + " : sbatch exit status:" + str(e.returncode))
print "sbatch exit status:" + str(e.returncode)
self.logger.info(self.lh + " : sbatch output:" + e.output)
print "sbatch output:" + e.output
sys.stdout.flush()
raise

# Finds the jobid in the output.
jid = 0
if not output is None and "job" in output:
Expand Down

0 comments on commit bb8699b

Please sign in to comment.