diff --git a/driver_cpl/cime_config/config_component.xml b/driver_cpl/cime_config/config_component.xml index cf4881ddda8..c1b10351181 100644 --- a/driver_cpl/cime_config/config_component.xml +++ b/driver_cpl/cime_config/config_component.xml @@ -1766,14 +1766,6 @@ Machine name - - char - - case_def - env_case.xml - full pathname of file specifying supported machines location - - char diff --git a/utils/python/CIME/XML/machines.py b/utils/python/CIME/XML/machines.py index 5c861ca1311..8b83c9d6f61 100644 --- a/utils/python/CIME/XML/machines.py +++ b/utils/python/CIME/XML/machines.py @@ -27,9 +27,9 @@ def __init__(self, infile=None, files=None, machine=None): if infile is None: if files is None: files = Files() - infile = files.get_value("MACHINES_SPEC_FILE") + infile = files.get_value("MACHINES_SPEC_FILE", resolved=False) self.machines_dir = os.path.dirname(infile) - + infile = files.get_resolved_value(infile) GenericXML.__init__(self, infile) # Append the contents of $HOME/.cime/config_machines.xml if it exists @@ -340,7 +340,7 @@ def get_full_mpirun(self, check_members, case, job): batch_system = self.get_value("BATCH_SYSTEM") if batch_system == "cobalt": mpi_arg_string += " : " - + return "%s %s %s" % (executable if executable is not None else "", mpi_arg_string, default_run_suffix) def print_values(self): diff --git a/utils/python/CIME/case.py b/utils/python/CIME/case.py index 0ed270cd38d..fa73b36e342 100644 --- a/utils/python/CIME/case.py +++ b/utils/python/CIME/case.py @@ -91,7 +91,6 @@ def __init__(self, case_root=None, read_only=True): self._pesfile = None self._gridfile = None self._components = [] - self._component_config_files = [] self._component_classes = [] # Define __enter__ and __exit__ so that we can use this as a context manager @@ -399,12 +398,14 @@ def _get_component_config_data(self): comp_class = self._component_classes[i] comp_name = self._components[i-1] node_name = 'CONFIG_' + comp_class + '_FILE' - comp_config_file = files.get_value(node_name, {"component":comp_name}, resolved=True) + # Add the group and elements for the config_files.xml + comp_config_file = files.get_value(node_name, {"component":comp_name}, resolved=False) + self.set_value(node_name, comp_config_file) + comp_config_file = self.get_resolved_value(comp_config_file) expect(comp_config_file is not None,"No config file for component %s"%comp_name) compobj = Component(comp_config_file) for env_file in self._env_entryid_files: env_file.add_elements_by_group(compobj, attributes=attlist) - self._component_config_files.append((node_name,comp_config_file)) # Add the group and elements for the config_files.xml for env_file in self._env_entryid_files: @@ -474,10 +475,6 @@ def configure(self, compset_name, grid_name, machine_name=None, self.get_compset_var_settings() - # Add the group and elements for the config_files.xml - for config_file in self._component_config_files: - self.set_value(config_file[0],config_file[1]) - #-------------------------------------------- # machine #-------------------------------------------- @@ -829,13 +826,17 @@ def create_clone(self, newcase, keepexe=False, mach_dir=None, project=None): # create clone from self to case clone_cimeroot = self.get_value("CIMEROOT") if newcase_cimeroot != clone_cimeroot: + case_branch = get_current_branch(clone_cimeroot) + clone_branch = get_current_branch(newcase_cimeroot) logger.warning(" case CIMEROOT is %s " %newcase_cimeroot) logger.warning(" clone CIMEROOT is %s " %clone_cimeroot) - logger.warning(" It is NOT recommended to clone cases from different versions of CIMEROOT") + logger.warning(" It is NOT recommended to clone cases from different versions of CIME.") + # *** create case object as deepcopy of clone object *** srcroot = os.path.join(newcase_cimeroot,"..") newcase = self.copy(newcasename, newcaseroot, newsrcroot=srcroot) + newcase.set_value("CIMEROOT", newcase_cimeroot) # determine if will use clone executable or not if keepexe: