Skip to content

Commit

Permalink
Merge pull request #3196 from jedwards4b/config_compiler_schema_impro…
Browse files Browse the repository at this point in the history
…vement

improve the config_compilers.xml schema
Fix indentation problem in compilers.py and make sure that the ~/.cime/config_compilers.xml file is also checked

Test suite: scripts_regression_tests.py
Test baseline:
Test namelist changes:
Test status: bit for bit

Fixes #3175

User interface changes?:

Update gh-pages html (Y/N)?:

Code review:
  • Loading branch information
jedwards4b authored Aug 7, 2019
2 parents b0d5c15 + 7e4053c commit 74b5913
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/lib/CIME/XML/compilers.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ def __init__(self, machobj, infile=None, compiler=None, mpilib=None, files=None,
if files is None:
files = Files()
infile = files.get_value("COMPILERS_SPEC_FILE")
schema = files.get_schema("COMPILERS_SPEC_FILE")
schema = files.get_schema("COMPILERS_SPEC_FILE")

GenericXML.__init__(self, infile, schema)
self._machobj = machobj
if version is not None:
# this is used in scripts_regression_tests to force version 2, it should not be used otherwise
self._version = version
else:
self._version = self.get_version()

self._machobj = machobj
self.machine = machobj.get_machine_name()
self.os = machobj.get_value("OS")
if compiler is None:
Expand All @@ -52,7 +52,7 @@ def __init__(self, machobj, infile=None, compiler=None, mpilib=None, files=None,
#This could cause problems if node matchs are repeated when only one is expected
infile = os.path.join(os.environ.get("HOME"),".cime","config_compilers.xml")
if os.path.exists(infile):
GenericXML.read(self, infile)
GenericXML.read(self, infile, schema=schema)

if self.compiler is not None:
self.set_compiler(compiler)
Expand Down

0 comments on commit 74b5913

Please sign in to comment.