Skip to content

Commit

Permalink
Merge pull request #1 from MarkUoLeeds/uol_arc4_complete
Browse files Browse the repository at this point in the history
Uol arc4 complete
  • Loading branch information
MarkUoLeeds authored Feb 22, 2022
2 parents 3a47fc9 + 5ba36a1 commit 36adbed
Show file tree
Hide file tree
Showing 10 changed files with 169 additions and 22 deletions.
42 changes: 42 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,47 @@
======================================================================

Originator: Chris Fischer
Date: 12-7-2021
Tag: cime5.6.37
Answer Changes: None
Tests: Build SMS.f19_g17.B1850.cori-haswell_intel and SMS.f19_g17.B1850.cori-knl_intel
Tested query_config --compsets by hand
scripts_regression_tests
Dependencies:

Brief Summary:
- Update cori modules.
- Fix documentation of seq_flux_mct_alb* variables.
- Fix issue iterating over compsets.
- Fix issue reading streams from user_nl_datm.
- Add a check for case_dir.
- Update comet port.

User interface changes:

PR summary: git log --oneline --first-parent [previous_tag]..master
6ee76f234 Merge pull request #4138 from ESMCI/fischer/cori_update
27b5571ff Merge pull request #4069 from billsacks/fix_albedo_doc
ba4251401 Merge pull request #4044 from jedwards4b/maint-5.6
56b8845f5 Merge pull request #3992 from jedwards4b/bugfix/streams_from_user_nl
ccdea36cd Merge pull request #4004 from jedwards4b/case_dir_check/maint-5.6
4d507fd33 Merge pull request #3928 from jedwards4b/SDSCcomet_port

Modified files: git diff --name-status [previous_tag]
M config/cesm/machines/config_compilers.xml
M config/cesm/machines/config_machines.xml
M scripts/Tools/xmlchange
M scripts/lib/CIME/case/case.py
M scripts/lib/CIME/nmlgen.py
M scripts/query_config
M src/components/data_comps/datm/cime_config/buildnml
M src/drivers/mct/cime_config/namelist_definition_drv.xml


======================================================================

======================================================================

Originator: Chris Fischer
Date: 4-2-2021
Tag: cime5.6.36
Expand Down
32 changes: 32 additions & 0 deletions config/cesm/machines/config_batch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,31 @@
</directives>
</batch_system>

<batch_system type="sge" >
<batch_query args="-j">qstat</batch_query>
<batch_submit>qsub </batch_submit>
<batch_cancel>qdel</batch_cancel>
<batch_env>-v</batch_env>
<batch_directive>#$ </batch_directive>
<jobid_pattern>(\d+)</jobid_pattern>
<depend_string> -hold_jid jobid</depend_string>
<depend_separator> , </depend_separator>
<walltime_format>%H:%M:%S</walltime_format>
<batch_mail_flag>-M</batch_mail_flag>
<batch_mail_type_flag>-m</batch_mail_type_flag>
<batch_mail_type>, bea, b, e, a, n, bes</batch_mail_type>
<submit_args>
<arg flag="-q" name="$JOB_QUEUE"/>
<arg flag="-P" name="$PROJECT"/>
<arg flag="-l h_rt=" name="$JOB_WALLCLOCK_TIME"/>
</submit_args>
<directives>
<directive> -N {{ job_id }}</directive>
<directive> -V </directive>
<directive> -l nodes={{ num_nodes }},ppn={{ tasks_per_node }},tpp={{ thread_count }}</directive>
</directives>
</batch_system>

<batch_system type="slurm" >
<batch_query per_job_arg="-j">squeue</batch_query>
<batch_cancel>scancel</batch_cancel>
Expand Down Expand Up @@ -218,6 +243,13 @@
</queues>
</batch_system>

<batch_system MACH="arc4" type="sge">
<queues>
<queue walltimemax="48:00:00" nodemin="1" nodemax="149" default="true" >40core-192G.q</queue>
<queue walltimemax="48:00:00" nodemax="1">planet.q</queue>
</queues>
</batch_system>

<!-- athena is lsf -->
<batch_system MACH="athena" type="lsf">
<batch_env>none</batch_env>
Expand Down
12 changes: 12 additions & 0 deletions config/cesm/machines/config_compilers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,18 @@ using a fortran linker.
</LDFLAGS>
</compiler>

<compiler MACH="arc4" COMPILER="intel">
<PNETCDF_PATH>$ENV{NETCDF_HOME}</PNETCDF_PATH>
<NETCDF_PATH>$ENV{NETCDF_HOME}</NETCDF_PATH>
<SLIBS>
<append> -L$ENV{NETCDF_HOME}/lib -lnetcdff -lnetcdf -L$ENV{PNETCDF_PATH}/lib -lpnetcdf -mkl</append>
</SLIBS>
<LDFLAGS>
<append>-mkl </append>
</LDFLAGS>
<ESMF_LIBDIR>$ENV{ESMF_LIBDIR}</ESMF_LIBDIR>
</compiler>

<compiler MACH="athena">
<CPPDEFS>
<!-- these flags enable nano timers -->
Expand Down
77 changes: 64 additions & 13 deletions config/cesm/machines/config_machines.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,57 @@ This allows using a different mpirun command to launch unit tests
</environment_variables>
</machine>

<machine MACH="arc4">
<DESC>A port of CEM to the Leeds ARC4 machine, batch system is sge. CEMAC.</DESC>
<NODENAME_REGEX>.*.arc*</NODENAME_REGEX>
<OS>LINUX</OS>
<COMPILERS>intel</COMPILERS>
<MPILIBS>intelmpi,openmpi,mpich</MPILIBS>
<CIME_OUTPUT_ROOT>/nobackup/$ENV{USER}/cesm_sims</CIME_OUTPUT_ROOT>
<DIN_LOC_ROOT>$ENV{ARC4_CESM2_ROOT}/inputdata</DIN_LOC_ROOT>
<DIN_LOC_ROOT_CLMFORC>$ENV{ARC4_CESM2_ROOT}/inputdata/atm/datm7</DIN_LOC_ROOT_CLMFORC>
<DOUT_S_ROOT>${CIME_OUTPUT_ROOT}/archive/$CASE</DOUT_S_ROOT>
<BASELINE_ROOT>${CIME_OUTPUT_ROOT}/cesm_baselines</BASELINE_ROOT>
<CCSM_CPRNC>${CIMEROOT}/tools/cprnc</CCSM_CPRNC>
<GMAKE>make</GMAKE>
<GMAKE_J>16</GMAKE_J>
<BATCH_SYSTEM>sge</BATCH_SYSTEM>
<SUPPORTED_BY>cemac-at-leeds.ac.uk</SUPPORTED_BY>
<MAX_TASKS_PER_NODE>40</MAX_TASKS_PER_NODE>
<MAX_MPITASKS_PER_NODE>40</MAX_MPITASKS_PER_NODE>
<PROJECT_REQUIRED>FALSE</PROJECT_REQUIRED>
<mpirun mpilib="default">
<executable>mpirun</executable>
<arguments>
<arg name="ntasks"> -np {{ total_tasks }} </arg>
</arguments>
</mpirun>

<module_system type="module" allow_error="true">
<init_path lang="perl">/apps/Modules/default/init/perl.pm</init_path>
<init_path lang="python">/apps/Modules/default/init/python.py</init_path>
<init_path lang="sh">/apps/Modules/default/init/sh</init_path>
<init_path lang="csh">/apps/Modules/default/init/csh</init_path>
<cmd_path lang="perl">module</cmd_path>
<cmd_path lang="python">module</cmd_path>
<cmd_path lang="sh">module</cmd_path>
<cmd_path lang="csh">module</cmd_path>
<modules compiler="intel">
<command name="unload">openmpi</command>
<command name="load">intel/19.0.4</command>
<command name="load">intelmpi/2019.4.243</command>
<command name="load">netcdf/4.6.3</command>
<command name="load">esmf</command>
</modules>
</module_system>
<environment_variables>
<env name="OMP_STACKSIZE">64M</env>
</environment_variables>
<resource_limits>
<resource name="RLIMIT_STACK">-1</resource>
</resource_limits>
</machine>

<machine MACH="athena">
<DESC> CMCC IBM iDataPlex, os is Linux, 16 pes/node, batch system is LSFd mpich</DESC>
<NODENAME_REGEX>.*.cluster.net</NODENAME_REGEX>
Expand Down Expand Up @@ -762,19 +813,19 @@ This allows using a different mpirun command to launch unit tests
<command name="switch">cray-libsci/19.02.1</command>
</modules>
<modules>
<command name="load">cray-mpich/7.7.8</command>
<command name="load">cray-mpich/7.7.10</command>
</modules>
<modules mpilib="mpi-serial">
<command name="load">cray-hdf5/1.10.5.0</command>
<command name="load">cray-netcdf/4.6.3.0</command>
<command name="load">cray-hdf5/1.10.5.2</command>
<command name="load">cray-netcdf/4.6.3.2</command>
</modules>
<modules mpilib="!mpi-serial">
<command name="load">cray-netcdf-hdf5parallel/4.6.3.0</command>
<command name="load">cray-hdf5-parallel/1.10.5.0</command>
<command name="load">cray-parallel-netcdf/1.11.1.0</command>
<command name="load">cray-netcdf-hdf5parallel/4.6.3.2</command>
<command name="load">cray-hdf5-parallel/1.10.5.2</command>
<command name="load">cray-parallel-netcdf/1.11.1.1</command>
</modules>
<modules>
<command name="load">cmake/3.14.4</command>
<command name="load">cmake/3.21.3</command>
</modules>
</module_system>
<environment_variables>
Expand Down Expand Up @@ -868,16 +919,16 @@ This allows using a different mpirun command to launch unit tests
<command name="switch">cray-libsci/19.02.1</command>
</modules>
<modules>
<command name="load">cray-mpich/7.7.8</command>
<command name="load">cray-mpich/7.7.10</command>
</modules>
<modules mpilib="mpi-serial">
<command name="load">cray-hdf5/1.10.5.0</command>
<command name="load">cray-netcdf/4.6.3.0</command>
<command name="load">cray-hdf5/1.10.5.2</command>
<command name="load">cray-netcdf/4.6.3.2</command>
</modules>
<modules mpilib="!mpi-serial">
<command name="load">cray-netcdf-hdf5parallel/4.6.3.0</command>
<command name="load">cray-hdf5-parallel/1.10.5.0</command>
<command name="load">cray-parallel-netcdf/1.11.1.0</command>
<command name="load">cray-netcdf-hdf5parallel/4.6.3.2</command>
<command name="load">cray-hdf5-parallel/1.10.5.2</command>
<command name="load">cray-parallel-netcdf/1.11.1.1</command>
</modules>
</module_system>
<environment_variables>
Expand Down
1 change: 1 addition & 0 deletions scripts/Tools/xmlchange
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ def xmlchange(caseroot, listofsettings, xmlfile, xmlid, xmlval, subgroup,
append, noecho, force, dryrun):

with Case(caseroot, read_only=False) as case:
expect(os.path.isdir(caseroot), "Directory {} does not appear to be a valid case directory".format(caseroot))
comp_classes = case.get_values("COMP_CLASSES")
if xmlfile:
case.set_file(xmlfile)
Expand Down
3 changes: 3 additions & 0 deletions scripts/lib/CIME/case/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ def __init__(self, case_root=None, read_only=True):

if case_root is None:
case_root = os.getcwd()

expect(not os.path.isdir(case_root) or os.path.isfile(os.path.join(case_root,"env_case.xml")), "Directory {} does not appear to be a valid case directory".format(case_root))

self._caseroot = case_root
logger.debug("Initializing Case.")
self._read_only_mode = True
Expand Down
11 changes: 9 additions & 2 deletions scripts/lib/CIME/nmlgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,15 @@ def get_default(self, name, config=None, allow_none=False):
return default

def get_streams(self):
"""Get a list of all streams used for the current data model mode."""
return self.get_default("streamslist")
"""Get a list of all streams used for the current data model mode, possibly modified in user_nl_dxxx."""
streams = self.get_value("streams")
if streams[0]:
streams[:] = [text.split(" ",1)[0] for text in streams]
streams[:] = [text.split("txt.",1)[1] for text in streams]
else:
streams = self.get_default("streamslist")

return streams

def clean_streams(self):
for variable in self._streams_variables:
Expand Down
3 changes: 1 addition & 2 deletions scripts/query_config
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def query_compsets(files, name, xml=False):
query compset definition give a compset name
"""
# Determine valid component values by checking the value attributes for COMPSETS_SPEC_FILE
components = get_compsets()
_, components = get_compsets()
match_found = None
all_components = False
if re.search("^all$", name): # print all compsets
Expand All @@ -74,7 +74,6 @@ def query_compsets(files, name, xml=False):
# If name is not a valid argument - exit with error
expect(match_found is not None,
"Invalid input argument {}, valid input arguments are {}".format(name, components))

if all_components: # print all compsets
for component in components:
# the all_components flag will only print available components
Expand Down
6 changes: 3 additions & 3 deletions src/components/data_comps/datm/cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ def _create_namelists(case, confdir, inst_string, infile, nmlgen, data_list_path
# may return a string or a list. See issue #877 in ESMCI/cime
#
#pylint: disable=no-member
if datm_presaero != "none":
if datm_presaero != "none" and not any(x.startswith('presaero') for x in streams):
streams.append("presaero.{}".format(datm_presaero))

if datm_topo != "none":
if datm_topo != "none" and not any(x.startswith('topo') for x in streams):
streams.append("topo.{}".format(datm_topo))

if datm_co2_tseries != "none":
if datm_co2_tseries != "none" and not any(x.startswith('co2tseries') for x in streams):
streams.append("co2tseries.{}".format(datm_co2_tseries))

# Add bias correction stream if given in namelist.
Expand Down
4 changes: 2 additions & 2 deletions src/drivers/mct/cime_config/namelist_definition_drv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4246,7 +4246,7 @@
<category>seq_flux_mct</category>
<group>seq_flux_mct_inparm</group>
<desc>
Surface albedo for direct radiation
Surface albedo for diffuse radiation
</desc>
<values>
<value>0.06</value>
Expand All @@ -4259,7 +4259,7 @@
<category>seq_flux_mct</category>
<group>seq_flux_mct_inparm</group>
<desc>
Surface albedo for diffuse radiation
Surface albedo for direct radiation
</desc>
<values>
<value>0.07</value>
Expand Down

0 comments on commit 36adbed

Please sign in to comment.