From 661b6f1a85177ee79387927bb2ca6048d34f13ce Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 8 Mar 2017 11:36:41 -0700 Subject: [PATCH] Revert "Merge pull request #1213 from ESMCI/revert-1210-compclasses_cleanup" This reverts commit 4cc7e226eb0512df5a4e465c90ba96511026a1d5, reversing changes made to 1fb4d68315d97b10d00e9f95c319d439df0203d4. --- scripts/lib/CIME/SystemTests/ncr.py | 4 +++- scripts/lib/CIME/SystemTests/pem.py | 2 +- scripts/lib/CIME/SystemTests/pet.py | 6 ++---- scripts/lib/CIME/get_timing.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/lib/CIME/SystemTests/ncr.py b/scripts/lib/CIME/SystemTests/ncr.py index e0b072f48de..15585cd9244 100644 --- a/scripts/lib/CIME/SystemTests/ncr.py +++ b/scripts/lib/CIME/SystemTests/ncr.py @@ -37,7 +37,9 @@ def build_phase(self, sharedlib_only=False, model_only=False): logging.warn("Starting bld %s"%bld) machpes = "env_mach_pes.NCR%s.xml" % bld ntasks_sum = 0 - for comp in ['ATM','OCN','WAV','GLC','ICE','ROF','LND']: + for comp in self._case.get_values("COMP_CLASSES"): + if comp == "CPL": + continue self._case.set_value("NINST_%s"%comp,str(bld)) ntasks = self._case.get_value("NTASKS_%s"%comp) if(bld == 1): diff --git a/scripts/lib/CIME/SystemTests/pem.py b/scripts/lib/CIME/SystemTests/pem.py index ed139821ce3..bd3c090a7de 100644 --- a/scripts/lib/CIME/SystemTests/pem.py +++ b/scripts/lib/CIME/SystemTests/pem.py @@ -26,7 +26,7 @@ def _case_one_setup(self): pass def _case_two_setup(self): - for comp in ['ATM','CPL','OCN','WAV','GLC','ICE','ROF','LND']: + for comp in self._case.get_values("COMP_CLASSES"): ntasks = self._case.get_value("NTASKS_%s"%comp) if ( ntasks > 1 ): self._case.set_value("NTASKS_%s"%comp, int(ntasks/2)) diff --git a/scripts/lib/CIME/SystemTests/pet.py b/scripts/lib/CIME/SystemTests/pet.py index 99166a96ebf..d6a6718464b 100644 --- a/scripts/lib/CIME/SystemTests/pet.py +++ b/scripts/lib/CIME/SystemTests/pet.py @@ -14,8 +14,6 @@ class PET(SystemTestsCompareTwo): - _COMPONENT_LIST = ('ATM','CPL','OCN','WAV','GLC','ICE','ROF','LND') - def __init__(self, case): """ initialize a test object @@ -28,7 +26,7 @@ def __init__(self, case): def _case_one_setup(self): # first make sure that all components have threaded settings - for comp in self._COMPONENT_LIST: + for comp in self._case.get_values("COMP_CLASSES"): if self._case.get_value("NTHRDS_%s"%comp) <= 1: self._case.set_value("NTHRDS_%s"%comp, 2) @@ -37,7 +35,7 @@ def _case_one_setup(self): def _case_two_setup(self): #Do a run with all threads set to 1 - for comp in self._COMPONENT_LIST: + for comp in self._case.get_values("COMP_CLASSES"): self._case.set_value("NTHRDS_%s"%comp, 1) # The need for this is subtle. On batch systems, the entire PET test runs diff --git a/scripts/lib/CIME/get_timing.py b/scripts/lib/CIME/get_timing.py index ef71e270d1a..7e67be56713 100644 --- a/scripts/lib/CIME/get_timing.py +++ b/scripts/lib/CIME/get_timing.py @@ -245,7 +245,7 @@ def getTiming(self): self.write(" --------- ------ ------- ------ " "------ --------- ------ \n") maxthrds = 0 - for k in ['CPL', 'GLC', 'WAV', 'LND', 'ROF', 'ICE', 'ATM', 'OCN']: + for k in self.case.get_values("COMP_CLASSES"): m = self.models[k] self.write(" %s = %-8s %-6u %-6u %-6u x %-6u " "%-6u (%-6u) \n" @@ -333,7 +333,7 @@ def getTiming(self): self.write(" TOT Run Time: %10.3f seconds %10.3f seconds/mday " "%10.2f myears/wday \n" % (tmax, tmax/adays, tmaxr)) - for k in ['LND', 'ROF', 'ICE', 'ATM', 'OCN', 'GLC', 'WAV', 'CPL']: + for k in self.case.get_values("COMP_CLASSES"): m = self.models[k] self.write(" %s Run Time: %10.3f seconds " "%10.3f seconds/mday %10.2f myears/wday \n"