diff --git a/CIME/XML/machines.py b/CIME/XML/machines.py index ec26438f1f0..dc56b290ccf 100644 --- a/CIME/XML/machines.py +++ b/CIME/XML/machines.py @@ -7,6 +7,7 @@ from CIME.utils import convert_to_unknown_type, get_cime_config import socket +from pathlib import Path logger = logging.getLogger(__name__) @@ -317,15 +318,25 @@ def set_machine(self, machine, schema=None): if machine == "Query": return machine elif self.get_version() == 3: - machines_file = os.path.join( - self.machines_dir, machine, "config_machines.xml" - ) - if os.path.isfile(machines_file): + machines_file = Path.home() / ".cime" / machine / "config_machines.xml" + + if machines_file.exists(): GenericXML.read( self, machines_file, schema=schema, ) + else: + machines_file = ( + Path(self.machines_dir) / machine / "config_machines.xml" + ) + + if machines_file.exists(): + GenericXML.read( + self, + machines_file, + schema=schema, + ) self.machine_node = super(Machines, self).get_child( "machine", {"MACH": machine}, diff --git a/CIME/non_py/cprnc b/CIME/non_py/cprnc index 845bb11f142..d17494561ac 160000 --- a/CIME/non_py/cprnc +++ b/CIME/non_py/cprnc @@ -1 +1 @@ -Subproject commit 845bb11f14260006899117b3b56f5fa0c9b6171b +Subproject commit d17494561ace91fc86387c83591c0382a2c79566