Skip to content

Commit

Permalink
Merge pull request #1210 from jedwards4b/compclasses_cleanup
Browse files Browse the repository at this point in the history
remove hardcoded compclasses
  • Loading branch information
fischer-ncar authored Mar 7, 2017
2 parents 78cab9a + 4439023 commit 3fd75db
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 3 additions & 1 deletion scripts/lib/CIME/SystemTests/ncr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion scripts/lib/CIME/SystemTests/pem.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
6 changes: 2 additions & 4 deletions scripts/lib/CIME/SystemTests/pet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions scripts/lib/CIME/get_timing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 3fd75db

Please sign in to comment.