Skip to content

Commit

Permalink
More strict criteria for running a recalculation.
Browse files Browse the repository at this point in the history
Signed-off by: David Rowenhorst <[email protected]>
  • Loading branch information
drowenhorst-nrl committed Oct 16, 2024
1 parent e4a8d79 commit 65edd7c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pyebsdindex/opencl/nlpar_cl.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ class OpenCLClalcError(Exception):

ndone = 0
jqueue = []
jobid = 0
# if verbose >= 2:
# print('\n', end='')
for rowchunk in range(chunks[1]):
Expand Down Expand Up @@ -482,7 +483,9 @@ class OpenCLClalcError(Exception):
"cstartcalc": cstartcalc,
"cendcalc": cendcalc,
"ncolcalc": ncolcalc,
"nattempts": -1}
"nattempts": -1,
"jobid": jobid}
jobid += 1
jqueue.append(job)


Expand Down Expand Up @@ -600,12 +603,13 @@ class OpenCLClalcError(Exception):


else:
if mxtest >= 0.1:
if mxtest >= 0.5:
raise OpenCLClalcError()

except OpenCLClalcError:
if j["nattempts"] < 3:
#print("Reattempting job: ", j['nattempts'])
#print('')
#print("Reattempting job: ", j["jobid"], j['nattempts'])
jqueue.append(j)
else:
print("Aborting job.")
Expand Down

0 comments on commit 65edd7c

Please sign in to comment.