Permalink
Browse files

Merge pull request #12623 from milljm/stuck-queued-jobs-12622

Fix hang with segfault TestHarness and PBS
  • Loading branch information...
permcody committed Jan 7, 2019
2 parents 844e8f2 + affd361 commit 4c85bb26281641274a829d6f72e7d43dc558ab91
Showing with 3 additions and 3 deletions.
  1. +3 −3 scripts/are_queued_jobs_finished.py
@@ -23,7 +23,7 @@ def yieldJobsResultPath(self):
for k, v in self.__job_data.iteritems():
yield k, v

def hasTimedOutOrFailed(meta):
def hasExited(meta):
"""
determine which scheduler plugin was used to launch jobs, and query that
system for current status on job
@@ -33,14 +33,14 @@ def hasTimedOutOrFailed(meta):
qstat_process = subprocess.Popen([ 'qstat' , '-xf', job_id], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
qstat_result = qstat_process.communicate()[0]
job_result = re.findall(r'Exit_status = (\d+)', qstat_result)
if job_result and job_result[0] == "271":
if job_result

This comment has been minimized.

@permcody

permcody Jan 7, 2019

Member

@milljm - you forgot the semicolon! I guess this means that we didn't test the PBS target on your PR. I won't make that mistake again...

return True

def isNotFinished(jobs):
for path, meta in jobs.yieldJobsResultPath():
if type(meta) == type({}) and meta.get('QUEUEING', {}):
if (not os.path.exists(os.path.join(path, '.previous_test_results.json'))
and not hasTimedOutOrFailed(meta)):
and not hasExited(meta)):
return True

def usage():

0 comments on commit 4c85bb2

Please sign in to comment.