Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "More early resolve issues" #403

Merged
merged 1 commit into from
Aug 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions driver_cpl/cime_config/config_component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1766,6 +1766,14 @@
<desc>Machine name</desc>
</entry>

<entry id="MACHINES_FILE">
<type>char</type>
<default_value></default_value>
<group>case_def</group>
<file>env_case.xml</file>
<desc>full pathname of file specifying supported machines location</desc>
</entry>

<entry id="MACHDIR">
<type>char</type>
<default_value></default_value>
Expand Down
6 changes: 3 additions & 3 deletions utils/python/CIME/XML/machines.py
Original file line number Diff line number Diff line change
Expand Up @@ -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", resolved=False)
infile = files.get_value("MACHINES_SPEC_FILE")
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
Expand Down Expand Up @@ -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):
Expand Down
17 changes: 8 additions & 9 deletions utils/python/CIME/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ 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
Expand Down Expand Up @@ -398,14 +399,12 @@ def _get_component_config_data(self):
comp_class = self._component_classes[i]
comp_name = self._components[i-1]
node_name = 'CONFIG_' + comp_class + '_FILE'
# 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)
comp_config_file = files.get_value(node_name, {"component":comp_name}, resolved=True)
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:
Expand Down Expand Up @@ -475,6 +474,10 @@ 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
#--------------------------------------------
Expand Down Expand Up @@ -826,17 +829,13 @@ 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 CIME.")

logger.warning(" It is NOT recommended to clone cases from different versions of CIMEROOT")

# *** 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:
Expand Down