Skip to content

Commit

Permalink
Added '--skip-preview-namelist' to case.build
Browse files Browse the repository at this point in the history
Added '--skip-preview-namelist' to case.build. This will allow the user
to specify if the namelist should be rebuilt from user_nl_8.

In this particular commit I added '--skip-preview-namelist' to the call
for case.build in the testing suite, since building namelists during
tests isn't done.

Test suite: scripts_regression_tests.py
Test baseline:
Test namelist changes:
Test status: bit for bit

Fixes #1276, E3SM-Project/E3SM#1466 (comment)

User interface changes?: Added --skip-preview-namelist to case.build and
template.case.run

Code review: @jgfouca, @rljacob
  • Loading branch information
Erich L Foster committed May 9, 2017
1 parent 99e9016 commit f221a52
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 19 deletions.
17 changes: 2 additions & 15 deletions scripts/Tools/case.submit
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,7 @@ from CIME.case import Case
###############################################################################
def parse_command_line(args, description):
###############################################################################
parser = argparse.ArgumentParser(
usage="""\n{} [<casedir>] [--verbose]
OR
{} --help
OR
{} --test
\033[1mEXAMPLES:\033[0m
\033[1;32m# Setup case \033[0m
> {}
""".format(((os.path.basename(args[0]), ) * 4),
description=description,
formatter_class=argparse.ArgumentDefaultsHelpFormatter
))
parser = argparse.ArgumentParser(description=description)

CIME.utils.setup_standard_logging_options(parser)

Expand Down Expand Up @@ -72,7 +59,7 @@ def _main_func(description):

with Case(args.caseroot, read_only=False) as case:
submit(case, job=args.job, no_batch=args.no_batch,
resubmit=args.resubmit, skip_pnl=args.skip_pnl,
resubmit=args.resubmit, skip_pnl=args.skip_preview_namelist,
batch_args=args.batch_args)

if __name__ == "__main__":
Expand Down
4 changes: 2 additions & 2 deletions scripts/lib/CIME/XML/env_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def get_submit_args(self, case, job):

return submitargs

def submit_jobs(self, case, no_batch=False, job=None, batch_args=None, dry_run=False):
def submit_jobs(self, case, no_batch=False, job=None, skip_pnl=False, batch_args=None, dry_run=False):
alljobs = self.get_jobs()
startindex = 0
jobs = []
Expand Down Expand Up @@ -362,7 +362,7 @@ def submit_jobs(self, case, no_batch=False, job=None, batch_args=None, dry_run=F
jobid = None

logger.warn("job is {}".format(job))
result = self._submit_single_job(case, job, jobid, no_batch=no_batch, batch_args=batch_args, dry_run=dry_run)
result = self._submit_single_job(case, job, jobid, no_batch=no_batch, skip_pn=skip_pnl, batch_args=batch_args, dry_run=dry_run)
batch_job_id = str(alljobs.index(job)) if dry_run else result
depid[job] = batch_job_id
jobcmds.append( (job, result) )
Expand Down
4 changes: 2 additions & 2 deletions scripts/lib/CIME/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,9 +570,9 @@ def _run_phase(self, test):
###########################################################################
test_dir = self._get_test_dir(test)
if self._no_batch:
cmd = "./case.submit --no-batch"
cmd = "./case.submit --no-batch --skip-preview-namelist"
else:
cmd = "./case.submit "
cmd = "./case.submit --skip-preview-namelist"

return self._shell_cmd_for_phase(test, cmd, RUN_PHASE, from_dir=test_dir)

Expand Down

0 comments on commit f221a52

Please sign in to comment.