Skip to content

Commit

Permalink
testing evolution termination
Browse files Browse the repository at this point in the history
  • Loading branch information
gautam-404 committed Oct 21, 2024
1 parent e209e67 commit 1ff7768
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion mesaport/ProjectOps/ops_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def run_subprocess(commands, wdir, silent=True, runlog='', status=None,
print('The process raised an error:', proc.returncode, error)
return False
elif evo_terminated == 1:
return False
return termination_code, None
else:
if gyre_in is None:
age = 0
Expand Down
17 changes: 12 additions & 5 deletions mesaport/ProjectOps/project_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,12 @@ def run(self, silent=True, logging=True, parallel=False, trace=None, env=os.envi
raise Exception("Run failed! Check runlog.")
else:
termination_code, age = res
print("Run successful.\n")
return termination_code, age

if age is not None:
print("Run successful.\n")
return termination_code, age
else:
print("Run unsuccessful.\n")
return termination_code, None



Expand Down Expand Up @@ -279,8 +282,12 @@ def resume(self, photo=None, silent=True, target=None, logging=True, parallel=Fa
raise Exception("Resume from photo failed! Check runlog.")
else:
termination_code, age = res
print("Run successful.\n")
return termination_code, age
if age is not None:
print("Run successful.\n")
return termination_code, age
else:
print("Run unsuccessful.\n")
return termination_code, None


def runGyre(self, gyre_in, files='all', wdir=None, data_format="GYRE", silent=True, target=None, logging=True, logfile="gyre.log",
Expand Down

0 comments on commit 1ff7768

Please sign in to comment.