diff --git a/scripts/lib/CIME/case.py b/scripts/lib/CIME/case.py index d10088fe396..8d7308054aa 100644 --- a/scripts/lib/CIME/case.py +++ b/scripts/lib/CIME/case.py @@ -107,7 +107,7 @@ def __init__(self, case_root=None, read_only=True): self.cores_per_task = None # check if case has been configured and if so initialize derived if self.get_value("CASEROOT") is not None: - self._initialize_derived_attributes() + self.initialize_derived_attributes() def check_if_comp_var(self, vid): vid = vid @@ -119,7 +119,7 @@ def check_if_comp_var(self, vid): return vid, comp, iscompvar return vid, comp, iscompvar - def _initialize_derived_attributes(self): + def initialize_derived_attributes(self): """ These are derived variables which can be used in the config_* files for variable substitution using the {{ var }} syntax @@ -809,7 +809,7 @@ def configure(self, compset_name, grid_name, machine_name=None, if test: self.set_value("TEST",True) - self._initialize_derived_attributes() + self.initialize_derived_attributes() # Make sure that parallel IO is not specified if total_tasks==1 if self.total_tasks == 1: diff --git a/scripts/lib/CIME/case_setup.py b/scripts/lib/CIME/case_setup.py index 087c5999b38..5afc3979bf0 100644 --- a/scripts/lib/CIME/case_setup.py +++ b/scripts/lib/CIME/case_setup.py @@ -136,11 +136,10 @@ def _case_setup_impl(case, caseroot, clean=False, test_mode=False, reset=False, else: expect(False, "NINST_%s value %d greater than NTASKS_%s %d" % (comp, ninst, comp, ntasks)) - # Set TOTAL_CORES - case.set_value("TOTAL_CORES", case.total_tasks * case.cores_per_task ) - if os.path.exists("case.run"): logger.info("Machine/Decomp/Pes configuration has already been done ...skipping") + + case.initialize_derived_attributes() else: check_pelayouts_require_rebuild(case, models) @@ -159,6 +158,12 @@ def _case_setup_impl(case, caseroot, clean=False, test_mode=False, reset=False, cost_pes = env_mach_pes.get_cost_pes(pestot, thread_count, machine=case.get_value("MACH")) case.set_value("COST_PES", cost_pes) + # Make sure pio settings are consistent + if adjust_pio: + adjust_pio_layout(case, tasks_per_node) + + case.initialize_derived_attributes() + # create batch files logger.info("Creating batch script case.run") env_batch = case.get_env("batch") @@ -176,10 +181,6 @@ def _case_setup_impl(case, caseroot, clean=False, test_mode=False, reset=False, logger.info("Writing %s script from input template %s" % (job, input_batch_script)) env_batch.make_batch_script(input_batch_script, job, case, pestot, tasks_per_node, num_nodes, thread_count) - # Make sure pio settings are consistant - if adjust_pio: - adjust_pio_layout(case, tasks_per_node) - # Make a copy of env_mach_pes.xml in order to be able # to check that it does not change once case.setup is invoked logger.info("Locking file env_mach_pes.xml") @@ -187,6 +188,9 @@ def _case_setup_impl(case, caseroot, clean=False, test_mode=False, reset=False, logger.debug("at copy TOTALPES = %s"%case.get_value("TOTALPES")) lock_file("env_mach_pes.xml") + # Set TOTAL_CORES + case.set_value("TOTAL_CORES", case.total_tasks * case.cores_per_task ) + # Create user_nl files for the required number of instances if not os.path.exists("user_nl_cpl"): logger.info("Creating user_nl_xxx files for components and cpl") diff --git a/scripts/lib/update_acme_tests.py b/scripts/lib/update_acme_tests.py index e7592980bee..7b407ca88d0 100644 --- a/scripts/lib/update_acme_tests.py +++ b/scripts/lib/update_acme_tests.py @@ -48,6 +48,7 @@ "ERP.f45_g37_rx1.A", "SMS_D_Ln9.f19_g16_rx1.A", "DAE.f19_f19.A", + "PET.f19_f19.A", "SMS.T42_T42.S", "PRE.f45_g37_rx1.ADESP") ),