Skip to content

Commit

Permalink
Merge pull request #952 from jedwards4b/minor_tuning
Browse files Browse the repository at this point in the history
Minor tuning
  • Loading branch information
mvertens authored Dec 23, 2016
2 parents d3d90ab + 31361e3 commit 9ae308e
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 17 deletions.
7 changes: 2 additions & 5 deletions cime_config/acme/machines/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,6 @@ endif
ifndef CONFIG_ARGS
CONFIG_ARGS :=
endif
ifeq ($(MPILIB),mpi-serial)
CONFIG_ARGS+= --enable-mpiserial
endif
ifeq ($(findstring pio,$(MODEL)),pio)
CONFIG_ARGS+= --enable-timing
ifeq ($DEBUG,TRUE)
Expand Down Expand Up @@ -311,7 +308,7 @@ ifeq ($(strip $(MPILIB)), mpi-serial)
MPIFC := $(SFC)
MPICC := $(SCC)
MPICXX := $(SCXX)
CONFIG_ARGS += --enable-mpiserial MCT_PATH=$(SHAREDLIBROOT)/$(SHAREDPATH)/mct/mpi-serial
CONFIG_ARGS += MCT_PATH=$(SHAREDLIBROOT)/$(SHAREDPATH)/mct/mpi-serial
else
CC := $(MPICC)
FC := $(MPIFC)
Expand Down Expand Up @@ -522,7 +519,7 @@ $(SHAREDLIBROOT)/$(SHAREDPATH)/mct/Makefile.conf:

$(SHAREDLIBROOT)/$(SHAREDPATH)/mct/mpi-serial/Makefile.conf:
@echo "SHAREDLIBROOT |$(SHAREDLIBROOT)| SHAREDPATH |$(SHAREDPATH)|"; \
$(CONFIG_SHELL) $(CIMEROOT)/externals/mct/mpi-serial/configure $(CONFIG_ARGS) --srcdir $(CIMEROOT)/externals/mct
$(CONFIG_SHELL) $(CIMEROOT)/externals/mct/mpi-serial/configure $(CONFIG_ARGS) --srcdir $(CIMEROOT)/externals/mct/mpi-serial

ifeq ($(PIO_VERSION),2)
# This is a pio2 library
Expand Down
2 changes: 1 addition & 1 deletion cime_config/cesm/machines/config_machines.xml
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,7 @@
<executable>mpiexec_mpt</executable>
<arguments>
<arg name="labelstdout">-p "%g:"</arg>
<arg name="threadplacement"> omplace </arg>
</arguments>
</mpirun>
<mpirun mpilib="mpi-serial">
Expand Down Expand Up @@ -955,7 +956,6 @@
</module_system>
<environment_variables>
<env name="OMP_STACKSIZE">256M</env>
<env name="PNETCDF">/picnic/u/home/jedwards/</env>
</environment_variables>
</machine>

Expand Down
2 changes: 1 addition & 1 deletion scripts/Tools/case.setup
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ from CIME.case import Case
def parse_command_line(args, description):
###############################################################################
parser = argparse.ArgumentParser(
usage="""\n%s [<casedir>] [--verbose]
usage="""\n%s [<casedir>] [--verbose] [--clean] [--reset]
OR
%s --help
OR
Expand Down
4 changes: 2 additions & 2 deletions scripts/Tools/xmlquery
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def _main_func():
# Initialize case ; read in all xml files from caseroot
with Case(caseroot) as case:
if listall:
variables = case.get_record_fields(None, "varid")
variables = sorted(case.get_record_fields(None, "varid"))
expect(variables, "No variables found")
results = xmlquery(case, variables, subgroup, fileonly, resolved=not no_resolve,
raw=raw, description=description, group=group, full=full,
Expand All @@ -179,7 +179,7 @@ def _main_func():
wrapper.subsequent_indent = "\t\t\t"
wrapper.fix_sentence_endings = True

for group in iter(results):
for group in sorted(iter(results)):
if len(variables) > 1 or len(results.keys()) > 1 or full:
print "\nResults in group %s"%group
for var in variables:
Expand Down
6 changes: 4 additions & 2 deletions tools/mapping/map_field/README
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ EXAMPLE
To build:

> cd src
> setenv CIMEROOT ~/cime1_1_0
> $CIMEROOT/machines/configure -mach yellowstone
> setenv CIMEROOT ~/cime
> setenv CIME_MODEL cesm
> $CIMEROOT/toolsq/configure --machine yellowstone --macros-format Makefile
> source ./.env_mach_specific.sh
> gmake
> cd ../

Expand Down
4 changes: 4 additions & 0 deletions utils/python/CIME/XML/generic_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ def get_value(self, item, attribute=None, resolved=True, subgroup=None): # pylin
logger.debug("Get Value for " + item)
return None

def get_values(self, vid, attribute=None, resolved=True, subgroup=None):# pylint: disable=unused-argument
logger.debug("Get Values for " + vid)
return []

def set_value(self, vid, value, subgroup=None, ignore_type=True): # pylint: disable=unused-argument
"""
ignore_type is not used in this flavor
Expand Down
1 change: 0 additions & 1 deletion utils/python/CIME/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ def get_values(self, item, attribute=None, resolved=True, subgroup=None):
for env_file in self._env_entryid_files:
# Wait and resolve in self rather than in env_file
results = env_file.get_values(item, attribute, resolved=False, subgroup=subgroup)

if len(results) > 0:
new_results = []
vtype = env_file.get_type_info(item)
Expand Down
3 changes: 2 additions & 1 deletion utils/python/CIME/case_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def _check_pelayouts_require_rebuild(case, models):
# Look to see if $comp_PE_CHANGE_REQUIRES_REBUILD is defined
# for any component
env_mach_pes_locked = EnvMachPes(infile=locked_pes)
env_mach_pes_locked.set_components(case.get_values("COMP_CLASSES"))
for comp in models:
if case.get_value("%s_PE_CHANGE_REQUIRES_REBUILD" % comp):
# Changing these values in env_mach_pes.xml will force
Expand All @@ -40,7 +41,7 @@ def _check_pelayouts_require_rebuild(case, models):
new_inst = case.get_value("NINST_%s" % comp)

if old_tasks != new_tasks or old_threads != new_threads or old_inst != new_inst:
logger.warn("%s pe change requires clean build" % comp)
logger.warn("%s pe change requires clean build %s %s" % (comp, old_tasks, new_tasks))
cleanflag = comp.lower()
run_cmd_no_fail("./case.build --clean %s" % cleanflag)

Expand Down
9 changes: 5 additions & 4 deletions utils/python/tests/scripts_regression_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,11 @@ def test_e_xmlquery(self):
cmd = xmlquery + " NTASKS --subgroup %s --value"%comp
output = run_cmd_no_fail(cmd, from_dir=casedir)
self.assertTrue(output == str(caseresult), msg="%s != %s"%(output, caseresult))
JOB_QUEUE = case.get_value("JOB_QUEUE", subgroup="case.run")
cmd = xmlquery + " JOB_QUEUE --subgroup case.run --value"
output = run_cmd_no_fail(cmd, from_dir=casedir)
self.assertTrue(output == JOB_QUEUE, msg="%s != %s"%(output, JOB_QUEUE))
if MACHINE.has_batch_system():
JOB_QUEUE = case.get_value("JOB_QUEUE", subgroup="case.run")
cmd = xmlquery + " JOB_QUEUE --subgroup case.run --value"
output = run_cmd_no_fail(cmd, from_dir=casedir)
self.assertTrue(output == JOB_QUEUE, msg="%s != %s"%(output, JOB_QUEUE))

cls._do_teardown.append(cls._testroot)

Expand Down

0 comments on commit 9ae308e

Please sign in to comment.