Skip to content

Commit

Permalink
get st_archive working on mira
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Jul 19, 2016
1 parent acb6008 commit 037d253
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
12 changes: 6 additions & 6 deletions utils/python/CIME/XML/env_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,12 +432,12 @@ def submit_single_job(self, case, job, depid=None, no_batch=False):
if string is not None:
submitcmd += string + " "

if case.get_value("MACH") == "mira":
if job in ("case.test", "case.run"):
if os.path.isfile(".original_host"):
with open(".original_host", "r") as fd:
sshhost = fd.read()
submitcmd = "ssh %s `%s`"%(sshhost, submitcmd)
# if case.get_value("MACH") == "mira":
# if job in ("case.test", "case.run"):
# if os.path.isfile(".original_host"):
# with open(".original_host", "r") as fd:
# sshhost = fd.read()
# submitcmd = "ssh %s `%s`"%(sshhost, submitcmd)


logger.info("Submitting job script %s"%submitcmd)
Expand Down
9 changes: 8 additions & 1 deletion utils/python/CIME/case_st_archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,13 @@ def case_st_archive(case):
append_status("resubmitting from st_archive",
caseroot=caseroot, sfile="CaseStatus")
logger.info("resubmitting from st_archive, resubmit=%d"%resubmit)
submit(case, resubmit=True)
if case.get_value("MACH") == "mira":
expect(os.path.isfile(".original_host"), "ERROR alcf host file not found")
with open(".original_host", "r") as fd:
sshhost = fd.read()
run_cmd("ssh %s `cd %s; CIMEROOT=%s ./case.submit --resubmit' "\
%(sshhost, caseroot, case.get_value("CIMEROOT")))
else:
submit(case, resubmit=True)

return True
4 changes: 2 additions & 2 deletions utils/python/CIME/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ def expect(condition, error_msg, exc_type=SystemExit):
"""
if (not condition):
# Uncomment these to bring up a debugger when an expect fails
import pdb
pdb.set_trace()
#import pdb
#pdb.set_trace()
raise exc_type("ERROR: %s" % error_msg)

# Should only be called from get_cime_config()
Expand Down

0 comments on commit 037d253

Please sign in to comment.