Skip to content

Commit

Permalink
Merge pull request #3123 from ESMCI/jgfouca/branch-for-acme-split-201…
Browse files Browse the repository at this point in the history
…9-05-28

Jgfouca/branch for acme split 2019 05 28

Change List:

Add first stage of ocean/ice shelf coupling
Bring COMPOSE semi-Lagrangian tracer transport code into HOMME and E3SM (required minor changes to build.py)
Add checkpoint of timing data immediately after initialization
bless_test_results: Be able to handle build-only tests
Test suite: scripts_regression_tests
Test baseline:
Test namelist changes:
Test status: BFB

Fixes [CIME Github issue #]

User interface changes?:

Update gh-pages html (Y/N)?:

Code review: @jedwards4b
  • Loading branch information
jgfouca authored Jun 3, 2019
2 parents 6493b34 + e218c9b commit 5c43a15
Show file tree
Hide file tree
Showing 16 changed files with 1,395 additions and 165 deletions.
27 changes: 25 additions & 2 deletions config/e3sm/config_grids.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1232,6 +1232,16 @@
<mask>oQU120</mask>
</model_grid>

<model_grid alias="T62_oEC60to30v3wLI_ais20" compset="MPASO.*_MALI">
<grid name="atm">T62</grid>
<grid name="lnd">T62</grid>
<grid name="ocnice">oEC60to30v3wLI</grid>
<grid name="rof">rx1</grid>
<grid name="glc">mpas.ais20km</grid>
<grid name="wav">null</grid>
<mask>oEC60to30v3wLI</mask>
</model_grid>

<!-- The following grid is only used for ADWAV testing -->
<model_grid alias="ww3a" compset="_WW3|DWAV">
<grid name="wav">ww3a</grid>
Expand Down Expand Up @@ -2955,12 +2965,25 @@
</gridmap>

<gridmap glc_grid="mpas.ais20km" ocn_grid="oQU120">
<map name="GLC2ICE_FMAPNAME">cpl/gridmaps/mpas.ais20km/map_ais20km_to_oQU120_aave.160331.nc</map>
<map name="GLC2ICE_SMAPNAME">cpl/gridmaps/mpas.ais20km/map_ais20km_to_oQU120_nearestdtos.160331.nc</map>
<map name="GLC2OCN_FMAPNAME">cpl/gridmaps/mpas.ais20km/map_ais20km_to_oQU120_aave.160331.nc</map>
<map name="OCN2GLC_FMAPNAME">cpl/gridmaps/oQU120/map_oQU120_to_ais20km_aave.160331.nc</map>
<map name="GLC2OCN_SMAPNAME">cpl/gridmaps/mpas.ais20km/map_ais20km_to_oQU120_nearestdtos.160331.nc</map>
<map name="GLC2OCN_LIQ_RMAPNAME">cpl/gridmaps/mpas.ais20km/map_ais20km_to_oQU120_nearestdtos.160331.nc</map>
<map name="GLC2OCN_ICE_RMAPNAME">cpl/gridmaps/mpas.ais20km/map_ais20km_to_oQU120_nearestdtos.160331.nc</map>
<map name="OCN2GLC_SMAPNAME">cpl/gridmaps/oQU120/map_oQU120_to_ais20km_nearestdtos.160331.nc</map>
<map name="OCN2GLC_FMAPNAME">cpl/gridmaps/oQU120/map_oQU120_to_ais20km_aave.160331.nc</map>
<map name="OCN2GLC_SMAPNAME">cpl/gridmaps/oQU120/map_oQU120_to_ais20km_neareststod.160331.nc</map>
</gridmap>

<gridmap glc_grid="mpas.ais20km" ocn_grid="oEC60to30v3wLI">
<map name="GLC2ICE_FMAPNAME">cpl/gridmaps/mpas.ais20km/map_ais20km_to_oEC60to30v3wLI_nomask_aave.190207.nc</map>
<map name="GLC2ICE_SMAPNAME">cpl/gridmaps/mpas.ais20km/map_ais20km_to_oEC60to30v3wLI_nomask_nearestdtos.190207.nc</map>
<map name="GLC2OCN_FMAPNAME">cpl/gridmaps/mpas.ais20km/map_ais20km_to_oEC60to30v3wLI_nomask_aave.190207.nc</map>
<map name="GLC2OCN_SMAPNAME">cpl/gridmaps/mpas.ais20km/map_ais20km_to_oEC60to30v3wLI_nomask_nearestdtos.190207.nc</map>
<map name="GLC2OCN_LIQ_RMAPNAME">cpl/gridmaps/mpas.ais20km/map_ais20km_to_oEC60to30v3wLI_nomask_nearestdtos.190207.nc</map>
<map name="GLC2OCN_ICE_RMAPNAME">cpl/gridmaps/mpas.ais20km/map_ais20km_to_oEC60to30v3wLI_nomask_nearestdtos.190207.nc</map>
<map name="OCN2GLC_FMAPNAME">cpl/gridmaps/oEC60to30v3wLI/map_oEC60to30v3wLI_nomask_to_ais20km_aave.190207.nc</map>
<map name="OCN2GLC_SMAPNAME">cpl/gridmaps/oEC60to30v3wLI/map_oEC60to30v3wLI_nomask_to_ais20km_neareststod.190207.nc</map>
</gridmap>

</gridmaps>
Expand Down
2 changes: 1 addition & 1 deletion config/e3sm/machines/config_machines.xml
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@
<command name="load">sems-git</command>
<command name="load">acme-binutils</command>
<command name="load">sems-python/2.7.9</command>
<command name="load">sems-cmake/2.8.12</command>
<command name="load">sems-cmake/3.10.3</command>
</modules>
<modules compiler="gnu">
<command name="load">sems-gcc/7.3.0</command>
Expand Down
14 changes: 8 additions & 6 deletions scripts/lib/CIME/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ def xml_to_make_variable(case, varname):
return "{}=\"{}\" ".format(varname, varvalue)


###############################################################################
def uses_kokkos(case):
###############################################################################
cam_target = case.get_value("CAM_TARGET")
return cam_target in ("preqx_kokkos", "theta-l")

###############################################################################
def _build_model(build_threaded, exeroot, incroot, complist,
lid, caseroot, cimeroot, compiler, buildlist, comp_interface):
Expand Down Expand Up @@ -228,12 +234,11 @@ def _build_libraries(case, exeroot, sharedpath, caseroot, cimeroot, libroot, lid
os.makedirs(shared_item)

mpilib = case.get_value("MPILIB")
cam_target = case.get_value("CAM_TARGET")
libs = ["gptl", "mct", "pio", "csm_share"]
if mpilib == "mpi-serial":
libs.insert(0, mpilib)

if cam_target == "preqx_kokkos":
if uses_kokkos(case):
libs.append("kokkos")

logs = []
Expand Down Expand Up @@ -444,8 +449,6 @@ def _case_build_impl(caseroot, case, sharedlib_only, model_only, buildlist,
if get_model() == "e3sm" and mach == "titan" and compiler == "pgiacc":
case.set_value("CAM_TARGET", "preqx_acc")

cam_target = case.get_value("CAM_TARGET")

# This is a timestamp for the build , not the same as the testid,
# and this case may not be a test anyway. For a production
# experiment there may be many builds of the same case.
Expand Down Expand Up @@ -495,8 +498,7 @@ def _case_build_impl(caseroot, case, sharedlib_only, model_only, buildlist,

if not sharedlib_only:
os.environ["INSTALL_SHAREDPATH"] = os.path.join(exeroot, sharedpath) # for MPAS makefile generators
# Set USE_KOKKOS to true if cam is preqx_kokkos
if cam_target == "preqx_kokkos":
if uses_kokkos(case):
os.environ["USE_KOKKOS"] = "TRUE"

logs.extend(_build_model(build_threaded, exeroot, incroot, complist,
Expand Down
5 changes: 3 additions & 2 deletions scripts/lib/CIME/case/check_lockedfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
from CIME.XML.env_case import EnvCase
from CIME.XML.env_mach_pes import EnvMachPes
from CIME.XML.env_batch import EnvBatch
from CIME.utils import run_cmd_no_fail
from CIME.locked_files import unlock_file, LOCKED_DIR
from CIME.build import clean

logger = logging.getLogger(__name__)

import glob, six
Expand Down Expand Up @@ -39,7 +40,7 @@ def check_pelayouts_require_rebuild(self, models):
if old_tasks != new_tasks or old_threads != new_threads or old_inst != new_inst:
logging.warning("{} pe change requires clean build {} {}".format(comp, old_tasks, new_tasks))
cleanflag = comp.lower()
run_cmd_no_fail("./case.build --clean {}".format(cleanflag))
clean(self, cleanlist=[cleanflag])

unlock_file("env_mach_pes.xml", self.get_value("CASEROOT"))

Expand Down
7 changes: 5 additions & 2 deletions scripts/lib/CIME/hist_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
from CIME.XML.standard_module_setup import *
from CIME.test_status import TEST_NO_BASELINES_COMMENT, TEST_STATUS_FILENAME
from CIME.utils import get_current_commit, get_timestamp, get_model, safe_copy, SharedArea
from CIME.utils import get_current_commit, get_timestamp, get_model, safe_copy, SharedArea, parse_test_name

import logging, os, re, filecmp
logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -572,7 +572,10 @@ def _generate_baseline_impl(case, baseline_dir=None, allow_baseline_overwrite=Fa
safe_copy(newestcpllogfile, os.path.join(basegen_dir, "{}.log.gz".format(cplname)), preserve_meta=False)

testname = case.get_value("TESTCASE")
expect(num_gen > 0 or testname == "PFS", "Could not generate any hist files for case '{}', something is seriously wrong".format(os.path.join(rundir, testcase)))
testopts = parse_test_name(case.get_value("CASEBASEID"))[1]
testopts = [] if testopts is None else testopts
expect(num_gen > 0 or (testname == "PFS" or "B" in testopts),
"Could not generate any hist files for case '{}', something is seriously wrong".format(os.path.join(rundir, testcase)))

if get_model() == "e3sm":
bless_log = os.path.join(basegen_dir, BLESS_LOG_NAME)
Expand Down
108 changes: 108 additions & 0 deletions src/drivers/mct/cime_config/config_component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1626,6 +1626,42 @@
<desc>glc2lnd state mapping file decomp type</desc>
</entry>

<entry id="GLC2ICE_FMAPNAME">
<type>char</type>
<default_value>idmap_ignore</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>glc2ice flux mapping file - the default value idmap_ignore, if set, will be ignored by buildnml and
will generate a runtime error if in fact a file is required for the given compset</desc>
</entry>

<entry id="GLC2ICE_FMAPTYPE">
<type>char</type>
<valid_values>X,Y</valid_values>
<default_value>X</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>glc2ice flux mapping file decomp type</desc>
</entry>

<entry id="GLC2ICE_SMAPNAME">
<type>char</type>
<default_value>idmap_ignore</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>glc2ice state mapping file - the default value idmap_ignore, if set, will be ignored by buildnml and
will generate a runtime error if in fact a file is required for the given compset</desc>
</entry>

<entry id="GLC2ICE_SMAPTYPE">
<type>char</type>
<valid_values>X,Y</valid_values>
<default_value>X</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>glc2ice state mapping file decomp type</desc>
</entry>

<entry id="GLC2ICE_RMAPNAME">
<type>char</type>
<default_value>idmap_ignore</default_value>
Expand All @@ -1644,6 +1680,42 @@
<desc>glc2ice runoff mapping file decomp type</desc>
</entry>

<entry id="GLC2OCN_FMAPNAME">
<type>char</type>
<default_value>idmap_ignore</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>glc2ocn flux mapping file - the default value idmap_ignore, if set, will be ignored by buildnml and
will generate a runtime error if in fact a file is required for the given compset</desc>
</entry>

<entry id="GLC2OCN_FMAPTYPE">
<type>char</type>
<valid_values>X,Y</valid_values>
<default_value>Y</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>glc2ocn flux mapping file decomp type</desc>
</entry>

<entry id="GLC2OCN_SMAPNAME">
<type>char</type>
<default_value>idmap_ignore</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>glc2ocn state mapping file - the default value idmap_ignore, if set, will be ignored by buildnml and
will generate a runtime error if in fact a file is required for the given compset</desc>
</entry>

<entry id="GLC2OCN_SMAPTYPE">
<type>char</type>
<valid_values>X,Y</valid_values>
<default_value>Y</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>glc2ocn state mapping file decomp type</desc>
</entry>

<entry id="GLC2OCN_LIQ_RMAPNAME">
<type>char</type>
<default_value>idmap_ignore</default_value>
Expand Down Expand Up @@ -1680,6 +1752,42 @@
<desc>glc2ocn runoff mapping file decomp type for ice runoff</desc>
</entry>

<entry id="OCN2GLC_FMAPNAME">
<type>char</type>
<default_value>idmap_ignore</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>ocn2glc flux mapping file - the default value idmap_ignore, if set, will be ignored by buildnml and
will generate a runtime error if in fact a file is required for the given compset</desc>
</entry>

<entry id="OCN2GLC_FMAPTYPE">
<type>char</type>
<valid_values>X,Y</valid_values>
<default_value>Y</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>ocn2glc flux mapping file decomp type</desc>
</entry>

<entry id="OCN2GLC_SMAPNAME">
<type>char</type>
<default_value>idmap_ignore</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>ocn2glc state mapping file - the default value idmap_ignore, if set, will be ignored by buildnml and
will generate a runtime error if in fact a file is required for the given compset</desc>
</entry>

<entry id="OCN2GLC_SMAPTYPE">
<type>char</type>
<valid_values>X,Y</valid_values>
<default_value>Y</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>ocn2glc state mapping file decomp type</desc>
</entry>

<entry id="OCN2WAV_SMAPNAME">
<type>char</type>
<default_value>idmap</default_value>
Expand Down
78 changes: 7 additions & 71 deletions src/drivers/mct/cime_config/config_component_e3sm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@
<default_value>12</default_value>
<group>run_flags</group>
<file>env_run.xml</file>
<desc>timer detail FIXME - add documentation</desc>
<desc>Sets maximum number of run loop timing data checkpoints.
This sets values for tprof_option and tprof_n that determine
the timing output file frequency. If less than one, uses
defaults for tprof_option and tprof_n and also allows them
to be set in user_nl_cpl.</desc>
</entry>

<entry id="DOUT_S_SAVE_INTERIM_RESTART_FILES">
Expand Down Expand Up @@ -352,7 +356,7 @@
<value compset="_DLND.*_CISM\d">1</value>
<value compset="_DLND.*_MALI">1</value>
<value compset="_SLND.*SOCN.*_MALI">1</value>
<value compset="_DATM.*_SLND.*MPASO.*_MALI">24</value>
<value compset="_DATM.*_SLND.*MPASO.*_MALI">$ATM_NCPL</value>
<value compset="_CAM.*_CLM.*MPASO">48</value>
<value compset="_CAM.*_CLM.*MPASO" grid="a%ne4np4">$ATM_NCPL</value>
<value compset="_CAM.*_CLM.*MPASO" grid="a%ne11np4">12</value>
Expand All @@ -372,7 +376,7 @@
<value compset="_DLND.*_CISM\d">1</value>
<value compset="_DLND.*_MALI">1</value>
<value compset="_SLND.*SOCN.*_MALI">1</value>
<value compset="_DATM.*_SLND.*MPASO.*_MALI">24</value>
<value compset="_DATM.*_SLND.*MPASO.*_MALI">$ATM_NCPL</value>
<value compset="_CAM.*_CLM.*MPASO">$ATM_NCPL</value>
</values>
<group>run_coupling</group>
Expand Down Expand Up @@ -722,74 +726,6 @@
compsets.</desc>
</entry>

<entry id="OCN2GLC_FMAPNAME">
<type>char</type>
<default_value>idmap</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>ocn2glc flux mapping file</desc>
</entry>

<entry id="OCN2GLC_FMAPTYPE">
<type>char</type>
<valid_values>X,Y</valid_values>
<default_value>Y</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>ocn2glc flux mapping file decomp type</desc>
</entry>

<entry id="OCN2GLC_SMAPNAME">
<type>char</type>
<default_value>idmap</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>ocn2glc state mapping file</desc>
</entry>

<entry id="OCN2GLC_SMAPTYPE">
<type>char</type>
<valid_values>X,Y</valid_values>
<default_value>Y</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>ocn2glc state mapping file decomp type</desc>
</entry>

<entry id="GLC2OCN_FMAPNAME">
<type>char</type>
<default_value>idmap</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>glc2ocn flux mapping file</desc>
</entry>

<entry id="GLC2OCN_FMAPTYPE">
<type>char</type>
<valid_values>X,Y</valid_values>
<default_value>Y</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>glc2ocn flux mapping file decomp type</desc>
</entry>

<entry id="GLC2OCN_SMAPNAME">
<type>char</type>
<default_value>idmap</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>glc2ocn state mapping file</desc>
</entry>

<entry id="GLC2OCN_SMAPTYPE">
<type>char</type>
<valid_values>X,Y</valid_values>
<default_value>Y</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>glc2ocn state mapping file decomp type</desc>
</entry>

<entry id="CCSM_GCOST">
<type>integer</type>
<valid_values></valid_values>
Expand Down
Loading

0 comments on commit 5c43a15

Please sign in to comment.