Skip to content

Commit

Permalink
Merge branch 'jgfouca/cime/log_each_acme_exe_call' into master (PR #1869
Browse files Browse the repository at this point in the history
)

Log each invocation of acme.exe in CaseStatus

Fixes #1857

[BFB]

* jgfouca/cime/log_each_acme_exe_call:
  Change to 'model execution'
  Log each invocation of acme.exe in CaseStatus
  • Loading branch information
jgfouca committed Oct 30, 2017
2 parents bbf5de1 + cf0135a commit 1b9f515
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/lib/CIME/case_run.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from CIME.XML.standard_module_setup import *
from CIME.case_submit import submit
from CIME.utils import gzip_existing_file, new_lid, run_and_log_case_status, get_timestamp
from CIME.utils import gzip_existing_file, new_lid, run_and_log_case_status, get_timestamp, get_model
from CIME.check_lockedfiles import check_lockedfiles
from CIME.get_timing import get_timing
from CIME.provenance import save_prerun_provenance, save_postrun_provenance
Expand Down Expand Up @@ -102,7 +102,10 @@ def _run_model_impl(case, lid, skip_pnl=False):

while loop:
loop = False
stat = run_cmd(cmd, from_dir=rundir)[0]

run_func = lambda: run_cmd(cmd, from_dir=rundir)[0]
stat = run_and_log_case_status(run_func, "model execution", caseroot=case.get_value("CASEROOT"))

model_logfile = os.path.join(rundir, model + ".log." + lid)
# Determine if failure was due to a failed node, if so, try to restart
if stat != 0:
Expand Down

0 comments on commit 1b9f515

Please sign in to comment.