Skip to content

Commit

Permalink
Merge branch 'jgfouca/branch-for-to-acme-11-13-2017-pr' into master (PR
Browse files Browse the repository at this point in the history
#1896)

Update cime to ESMCI 5.4.0-alpha.09

Feature list:

Add optional COSTPES_PER_NODE field
Bugfix for checking locked files, BUILD_COMPLETE should not cause check to fail

[BFB]

* jgfouca/branch-for-to-acme-11-13-2017-pr:
  fix pylint issue
  rename
  locked files needs to handle BUILD_COMPLETE better
  Switch melvin to use officially supported pfunit
  add optional COST_PER_NODE
  Remove hardcoded email options for lc_slurm, cascade, constance, sooty
  Fix cobalt indent
  Remove hardcoded mail option for PBS
  Revert "Revert the change to edison as this is now in E3SM-Project/E3SM#1888"
  Revert the change to edison as this is now in E3SM-Project/E3SM#1888
  Undo/remove things that keep causing problems in the ESMCI merge.
  Update Slurm task-to-core affinities
  Efficiency updates for coupler bypass
  • Loading branch information
jgfouca committed Nov 14, 2017
2 parents 159831a + 9442c93 commit e96e7ce
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 8 deletions.
2 changes: 1 addition & 1 deletion config/acme/machines/config_compilers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ for mct, etc.
<CONFIG_ARGS> --host=Linux </CONFIG_ARGS>
<NETCDF_PATH>$(NETCDFROOT)</NETCDF_PATH>
<PNETCDF_PATH>$(PNETCDFROOT)</PNETCDF_PATH>
<PFUNIT_PATH MPILIB="mpi-serial" compile_threaded="false">/sems-data-store/ACME/pfunit/pfunit-3.2.8</PFUNIT_PATH>
<PFUNIT_PATH MPILIB="mpi-serial" compile_threaded="false">$SEMS_PFUNIT_ROOT</PFUNIT_PATH>
<ADD_SLIBS> $(shell $(NETCDF_PATH)/bin/nf-config --flibs) -lblas -llapack</ADD_SLIBS>
<CXX_LIBS>-lstdc++ -lmpi_cxx</CXX_LIBS>
<ALBANY_PATH>/projects/install/rhel6-x86_64/ACME/AlbanyTrilinos/Albany/build/install</ALBANY_PATH>
Expand Down
2 changes: 2 additions & 0 deletions config/acme/machines/config_machines.xml
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@
<modules>
<command name="purge"/>
<command name="load">sems-env</command>
<command name="load">acme-env</command>
<command name="load">sems-git</command>
<command name="load">sems-python/2.7.9</command>
<command name="load">sems-cmake/2.8.12</command>
Expand All @@ -602,6 +603,7 @@
</modules>
<modules mpilib="mpi-serial">
<command name="load">sems-netcdf/4.4.1/exo</command>
<command name="load">acme-pfunit/3.2.8/base</command>
</modules>
<modules mpilib="!mpi-serial">
<command name="load">sems-openmpi/1.8.7</command>
Expand Down
2 changes: 2 additions & 0 deletions config/cesm/machines/config_machines.xml
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@
<SUPPORTED_BY>cseg</SUPPORTED_BY>
<MAX_TASKS_PER_NODE>256</MAX_TASKS_PER_NODE>
<MAX_MPITASKS_PER_NODE>64</MAX_MPITASKS_PER_NODE>
<COSTPES_PER_NODE>68</COSTPES_PER_NODE>
<mpirun mpilib="default">
<executable>srun</executable>
<arguments>
Expand Down Expand Up @@ -1843,6 +1844,7 @@
<SUPPORTED_BY>cseg</SUPPORTED_BY>
<MAX_TASKS_PER_NODE>30</MAX_TASKS_PER_NODE>
<MAX_MPITASKS_PER_NODE>15</MAX_MPITASKS_PER_NODE>
<COSTPES_PER_NODE>16</COSTPES_PER_NODE>
<PROJECT_REQUIRED>TRUE</PROJECT_REQUIRED>
<mpirun mpilib="default" unit_testing="true">
<!-- For unit testing, avoid all of the extra stuff that we use before and
Expand Down
3 changes: 3 additions & 0 deletions config/xml_schemas/config_machines.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
<xs:element name="GMAKE_J" type="xs:integer"/>
<xs:element name="MAX_TASKS_PER_NODE" type="xs:integer"/>
<xs:element name="MAX_MPITASKS_PER_NODE" type="xs:integer"/>
<xs:element name="COSTPES_PER_NODE" type="xs:integer"/>
<xs:element name="PROJECT_REQUIRED" type="xs:NCName"/>
<xs:element name="GMAKE" type="xs:string"/>
<xs:element name="TESTS" type="xs:string"/>
Expand Down Expand Up @@ -114,6 +115,8 @@
<!-- MAX_MPITASKS_PER_NODE: number of physical PES per shared node on
this machine, in practice the MPI tasks per node will not exceed this value -->
<xs:element ref="MAX_MPITASKS_PER_NODE" minOccurs="1" maxOccurs="1"/>
<!-- Optional cost factor per node unit -->
<xs:element ref="COSTPES_PER_NODE" minOccurs="0" maxOccurs="1"/>
<!-- PROJECT_REQUIRED: Does this machine require a project to be specified to
the batch system? See PROJECT above -->
<xs:element ref="PROJECT_REQUIRED" minOccurs="0" maxOccurs="1"/>
Expand Down
2 changes: 0 additions & 2 deletions scripts/lib/CIME/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -1334,8 +1334,6 @@ def set_file(self, xmlfile):
gfile = GenericXML(infile=xmlfile)
ftype = gfile.get_id()

self.flush(flushall=True)

logger.warning("setting case file to {}".format(xmlfile))
components = self.get_value("COMP_CLASSES")
new_env_file = None
Expand Down
12 changes: 8 additions & 4 deletions scripts/lib/CIME/check_lockedfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,14 @@ def check_lockedfiles(case):
continue
diffs = f1obj.compare_xml(f2obj)
if diffs:

logging.warning("File {} has been modified".format(lfile))
toggle_build_status = False
for key in diffs.keys():
print(" found difference in {} : case {} locked {}"
.format(key, repr(diffs[key][0]), repr(diffs[key][1])))

if key != "BUILD_COMPLETE":
print(" found difference in {} : case {} locked {}"
.format(key, repr(diffs[key][0]), repr(diffs[key][1])))
toggle_build_status = True
if objname == "env_mach_pes":
expect(False, "Invoke case.setup --reset ")
elif objname == "env_case":
Expand All @@ -128,8 +131,9 @@ def check_lockedfiles(case):
case.set_value("BUILD_STATUS", 2)
logging.critical("Changing PIO_VERSION requires running "
"case.build --clean-all and rebuilding")
else:
elif toggle_build_status:
case.set_value("BUILD_STATUS", 1)
f2obj.set_value("BUILD_COMPLETE", False)
elif objname == "env_batch":
expect(False, "Batch configuration has changed, please run case.setup --reset")
else:
Expand Down
7 changes: 6 additions & 1 deletion scripts/lib/CIME/get_timing.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,18 @@ def _getTiming(self, inst=0):
run_type = self.case.get_value("RUN_TYPE")
stop_option = self.case.get_value("STOP_OPTION")
stop_n = self.case.get_value("STOP_N")

cost_pes = self.case.get_value("COST_PES")
costpes_per_node = self.case.get_value("COSTPES_PER_NODE")

totalpes = self.case.get_value("TOTALPES")
max_mpitasks_per_node = self.case.get_value("MAX_MPITASKS_PER_NODE")
smt_factor = max(1,int(self.case.get_value("MAX_TASKS_PER_NODE") / max_mpitasks_per_node))

if cost_pes > 0:
pecost = cost_pes
elif costpes_per_node:
pecost = self.case.num_nodes * costpes_per_node
else:
pecost = totalpes

Expand Down Expand Up @@ -309,7 +314,7 @@ def _getTiming(self, inst=0):

self.write("\n")
self.write(" total pes active : {} \n".format(totalpes*maxthrds*smt_factor ))
self.write(" pes per node : {} \n".format(max_mpitasks_per_node))
self.write(" mpi tasks per node : {} \n".format(max_mpitasks_per_node))
self.write(" pe count for cost estimate : {} \n".format(pecost))
self.write("\n")

Expand Down
8 changes: 8 additions & 0 deletions src/drivers/mct/cime_config/config_component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2063,6 +2063,14 @@
<default_value>0</default_value>
<group>mach_pes_last</group>
<file>env_mach_pes.xml</file>
<desc>pes or cores per node for mpitasks </desc>
</entry>

<entry id="COSTPES_PER_NODE">
<type>integer</type>
<default_value>$MAX_MPITASKS_PER_NODE</default_value>
<group>mach_pes_last</group>
<file>env_mach_pes.xml</file>
<desc>pes or cores per node for accounting purposes </desc>
</entry>

Expand Down

0 comments on commit e96e7ce

Please sign in to comment.