From f221a52e3cd9a01581fd86e2e6d9aa1f7f0000dd Mon Sep 17 00:00:00 2001 From: Erich L Foster Date: Wed, 3 May 2017 10:39:10 -0600 Subject: [PATCH] Added '--skip-preview-namelist' to case.build 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, https://github.com/ACME-Climate/ACME/issues/1466#issuecomment-297814637 User interface changes?: Added --skip-preview-namelist to case.build and template.case.run Code review: @jgfouca, @rljacob --- scripts/Tools/case.submit | 17 ++--------------- scripts/lib/CIME/XML/env_batch.py | 4 ++-- scripts/lib/CIME/test_scheduler.py | 4 ++-- 3 files changed, 6 insertions(+), 19 deletions(-) diff --git a/scripts/Tools/case.submit b/scripts/Tools/case.submit index 649ad4bad78..613cd9410ef 100755 --- a/scripts/Tools/case.submit +++ b/scripts/Tools/case.submit @@ -11,20 +11,7 @@ from CIME.case import Case ############################################################################### def parse_command_line(args, description): ############################################################################### - parser = argparse.ArgumentParser( - usage="""\n{} [] [--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) @@ -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__": diff --git a/scripts/lib/CIME/XML/env_batch.py b/scripts/lib/CIME/XML/env_batch.py index 6a5b1f79623..fdbd2b27ab0 100644 --- a/scripts/lib/CIME/XML/env_batch.py +++ b/scripts/lib/CIME/XML/env_batch.py @@ -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 = [] @@ -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) ) diff --git a/scripts/lib/CIME/test_scheduler.py b/scripts/lib/CIME/test_scheduler.py index 3e2f4886f33..df7ab2f7057 100644 --- a/scripts/lib/CIME/test_scheduler.py +++ b/scripts/lib/CIME/test_scheduler.py @@ -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)