Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 4 additions & 2 deletions nexus/nexus/qmcpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -1151,10 +1151,10 @@ def check_sim_status(self):
errors = self.errfile_text()

ran_to_end = 'Total Execution' in output
run_started = 'QMCPACK' in output
aborted = 'Fatal Error' in errors
files_exist = True
cusp_run = False

if not self.has_generic_input():
if not isinstance(self.input,TracedQmcpackInput):
cusp_run = self.input.cusp_correction()
Expand Down Expand Up @@ -1186,9 +1186,11 @@ def check_sim_status(self):
#end if
#end if

if not run_started:
self.warn("QMCPACK did not start properly!\n")

self.succeeded = ran_to_end
self.failed = aborted
self.failed = aborted or not run_started
self.finished = files_exist and (self.job.finished or ran_to_end) and not aborted

if cusp_run and files_exist:
Expand Down
6 changes: 5 additions & 1 deletion nexus/nexus/qmcpack_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,12 @@ def __init__(self,arg0=None,**kwargs):
ghost_atoms(*ghosts)
#end if

if isinstance(arg0,Simulation):
if isinstance(arg0, Simulation):
sim = arg0
if sim.failed:
self.warn("Simulation failed, skipping analysis!")
self.info.analyzed = sim.failed

if 'analysis_request' in sim:
request = sim.analysis_request.copy()
else:
Expand Down
5 changes: 4 additions & 1 deletion nexus/nexus/tests/test_qmcpack_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,10 @@ def test_check_sim_status():
assert(not sim.failed)

outfile = os.path.join(tpath,sim.outfile)
out_text = 'Total Execution'
out_text = (
'QMCPACK\n'
'Total Execution'
)
out = open(outfile,'w')
out.write(out_text)
out.close()
Expand Down
Loading