Skip to content

Commit

Permalink
Fix hang with segfault TestHarness and PBS
Browse files Browse the repository at this point in the history
The 'are_queued_jobs_finished.py' script is not doing anything specific when error 271
occurs. So why not just exit if the very presence of 'Exit_status' exists in the first
place?

Closes idaholab#12622
  • Loading branch information
milljm authored and shoheiogawa committed Jan 18, 2019
1 parent 28102a9 commit 8bd6a2a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/are_queued_jobs_finished.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
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():
Expand Down

0 comments on commit 8bd6a2a

Please sign in to comment.