Skip to content

Commit

Permalink
Merge pull request #477 from ESMCI/jgfouca/fix_single_submit_and_test…
Browse files Browse the repository at this point in the history
…_cleanup

Fix single submit, cleanup scripts_regr_test by encapsulating run_cmd. Looks good thanks.
  • Loading branch information
jedwards4b authored Aug 30, 2016
2 parents 98db22a + 3de40f3 commit 0342608
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 100 deletions.
19 changes: 10 additions & 9 deletions scripts/create_test
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@ OR
"all object executables, and data files will"
" be removed after tests are run")

parser.add_argument("-m", "--machine",
help="The machine for which to build tests, this machine must be defined"
" in the config_machines.xml file for the given model. "
"Default is to match the name of the machine in the test name or "
"the name of the machine this script is run on to the "
"NODENAME_REGEX field in config_machines.xml. This option is highly "
"unsafe and should only be used if you know what you're doing.")

if model == "cesm":
parser.add_argument("-c", "--compare",
help="While testing, compare baselines"
Expand All @@ -137,13 +145,6 @@ OR
help="Tests or test suites to run."
" Testnames expect in form CASE.GRID.COMPSET[.MACHINE_COMPILER]")

parser.add_argument("-m", "--machine",
help="The machine for which to build tests, this machine must be defined"
" in the config_machines.xml file for the given model. "
"Default is to match the name of the machine in the test name or "
"the name of the machine this script is run on to the "
"NODENAME_REGEX field in config_machines.xml")

else:

parser.add_argument("testargs", nargs="+",
Expand Down Expand Up @@ -294,7 +295,7 @@ OR

logger.info("Testnames: %s" % test_names)
else:
mach_obj = Machines()
mach_obj = Machines(machine=args.machine)
args.compiler = mach_obj.get_default_compiler() if args.compiler is None else args.compiler

test_names = update_acme_tests.get_full_test_names(args.testargs, mach_obj.get_machine_name(), args.compiler)
Expand Down Expand Up @@ -442,7 +443,7 @@ def create_test(test_names, test_data, compiler, machine_name, no_run, no_build,

success = impl.run_tests()

if single_submit:
if success and single_submit:
# Get real test root
test_root = impl._test_root

Expand Down
4 changes: 1 addition & 3 deletions utils/python/CIME/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ def configure(self, compset_name, grid_name, machine_name=None,
opti_tasks = match2.group(1)
opti_thrds = 1

other = {}
if match1 or match2:
for component_class in self._component_classes:
if component_class == "DRV":
Expand All @@ -561,9 +562,6 @@ def configure(self, compset_name, grid_name, machine_name=None,
pes_ntasks, pes_nthrds, pes_rootpe, other = pesobj.find_pes_layout(self._gridname, self._compsetname,
machine_name, pesize_opts=pecount)




mach_pes_obj = self.get_env("mach_pes")
totaltasks = {}
for key, value in pes_ntasks.items():
Expand Down
Loading

0 comments on commit 0342608

Please sign in to comment.