From 0870366e44322b9e0d20c8a5f4d04028df8c2c74 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Thu, 3 Jun 2021 15:27:52 -0600 Subject: [PATCH 1/4] logical args to Make should not be quoted --- config/cesm/machines/config_compilers.xml | 2 +- config/cesm/machines/config_machines.xml | 80 +++++++++++------------ scripts/lib/CIME/build.py | 6 +- 3 files changed, 46 insertions(+), 42 deletions(-) diff --git a/config/cesm/machines/config_compilers.xml b/config/cesm/machines/config_compilers.xml index 3f162da11b2..027c551e8c4 100644 --- a/config/cesm/machines/config_compilers.xml +++ b/config/cesm/machines/config_compilers.xml @@ -200,7 +200,7 @@ using a fortran linker. - -fconvert=big-endian -ffree-line-length-none -ffixed-line-length-none + -fconvert=big-endian -ffree-line-length-none -ffixed-line-length-none -fallow-argument-mismatch -fallow-invalid-boz -fopenmp - -fconvert=big-endian -ffree-line-length-none -ffixed-line-length-none -fallow-argument-mismatch -fallow-invalid-boz + -fconvert=big-endian -ffree-line-length-none -ffixed-line-length-none -fopenmp -fallow-argument-mismatch -fallow-invalid-boz From 0c08936a0ff088cfad589f1fe891963003aebe1b Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 4 Jun 2021 09:25:00 -0600 Subject: [PATCH 4/4] fix issue determining var type - py2 incompatible - works in py3 only --- scripts/lib/CIME/build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/lib/CIME/build.py b/scripts/lib/CIME/build.py index 1bdc7bc84cc..ae0938e475a 100644 --- a/scripts/lib/CIME/build.py +++ b/scripts/lib/CIME/build.py @@ -58,10 +58,10 @@ def xml_to_make_variable(case, varname, cmake=False): varvalue = case.get_value(varname) if varvalue is None: return "" - if type(varvalue) == type(True): + if isinstance(varvalue, bool): varvalue = stringify_bool(varvalue) - if cmake or type(varvalue) == type(str): + if cmake or isinstance(varvalue, str): return "{}{}=\"{}\" ".format("-D" if cmake else "", varname, varvalue) else: return "{}={} ".format(varname, varvalue)