Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added casting to string of slurm_stderr and jobinfo_stdout #48

Merged
merged 1 commit into from
Feb 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sciluigi/slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,14 @@ def log_slurm_info(self, slurm_stderr):
salloc: Job allocation 5836263 has been revoked.
'''

matches = re.search('[0-9]+', slurm_stderr)
matches = re.search('[0-9]+', str(slurm_stderr))
if matches:
jobid = matches.group(0)

# Write slurm execution time to audit log
cmd = 'sacct -j {jobid} --noheader --format=elapsed'.format(jobid=jobid)
(_, jobinfo_stdout, _) = self.ex_local(cmd)
sacct_matches = re.findall('([0-9\:\-]+)', jobinfo_stdout)
sacct_matches = re.findall('([0-9\:\-]+)', str(jobinfo_stdout))

if len(sacct_matches) < 2:
log.warn('Not enough matches from sacct for task %s: %s',
Expand Down