Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove SMP_PRESENT and replace with BUILD_THREADED #4546

Merged
merged 14 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
env:
INIT: "false"
CIME_MODEL: "cesm"
CIME_DRIVER: "mct"
CIME_DRIVER: "nuopc"
UPDATE_CIME: "true"
GIT_SHALLOW: "true"
CIME_TEST_PLATFORM: ubuntu-latest
Expand Down Expand Up @@ -108,6 +108,9 @@ jobs:
# exclude nuopc driver when running e3sm tests
- model: "e3sm"
driver: "nuopc"
# exclude mct driver when running cesm tests
- model: "cesm"
driver: "mct"
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions CIME/BuildTools/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,13 @@ def __init__(self, compiler, mpilib, debug, comp_interface, threading=False):
"DEBUG": debug,
"COMP_INTERFACE": comp_interface,
"PIO_VERSION": 2,
"SMP_PRESENT": threading,
"BUILD_THREADED": threading,
"MODEL": get_model(),
"SRCROOT": get_src_root(),
}

def get_build_threaded(self):
return self.get_value("SMP_PRESENT")
return self.get_value("BUILD_THREADED")

def get_case_root(self):
"""Returns the root directory for this case."""
Expand Down
2 changes: 1 addition & 1 deletion CIME/Tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ifeq ($(strip $(SMP)),TRUE)
THREADDIR = threads
compile_threaded = TRUE
else
ifeq ($(strip $(SMP_PRESENT)),TRUE)
ifeq ($(strip $(BUILD_THREADED)),TRUE)
THREADDIR = threads
compile_threaded = TRUE
else
Expand Down
2 changes: 1 addition & 1 deletion CIME/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"OS",
"PIO_VERSION",
"SHAREDLIBROOT",
"SMP_PRESENT",
"BUILD_THREADED",
"USE_ESMF_LIB",
"USE_MOAB",
"CAM_CONFIG_OPTS",
Expand Down
4 changes: 2 additions & 2 deletions CIME/case/case_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def _case_setup_impl(

case.initialize_derived_attributes()

case.set_value("SMP_PRESENT", case.get_build_threaded())
case.set_value("BUILD_THREADED", case.get_build_threaded())

else:
case.check_pelayouts_require_rebuild(models)
Expand All @@ -361,7 +361,7 @@ def _case_setup_impl(
cost_per_node = case.get_value("COSTPES_PER_NODE")
case.set_value("COST_PES", case.num_nodes * cost_per_node)
threaded = case.get_build_threaded()
case.set_value("SMP_PRESENT", threaded)
case.set_value("BUILD_THREADED", threaded)
if threaded and case.total_tasks * case.thread_count > cost_per_node:
smt_factor = max(
1.0, int(case.get_value("MAX_TASKS_PER_NODE") / cost_per_node)
Expand Down
4 changes: 2 additions & 2 deletions CIME/data/config/xml_schemas/env_mach_specific.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<xs:attribute name="comp_interface" type="xs:string"/>
<xs:attribute name="gpu_type" type="xs:string"/>
<xs:attribute name="gpu_offload" type="xs:string"/>
<xs:attribute name="SMP_PRESENT" type="xs:string"/>
<xs:attribute name="BUILD_THREADED" type="xs:string"/>
<xs:attribute name="value" type="xs:string"/>
<xs:attribute name="unit_testing" type="xs:boolean"/>
<xs:attribute name="queue" type="xs:string"/>
Expand Down Expand Up @@ -138,7 +138,7 @@
<xs:attribute ref="mpilib"/>
<xs:attribute ref="compiler"/>
<xs:attribute ref="unit_testing"/>
<xs:attribute ref="SMP_PRESENT"/>
<xs:attribute ref="BUILD_THREADED"/>
</xs:complexType>
</xs:element>
<xs:element name="resource">
Expand Down
2 changes: 1 addition & 1 deletion CIME/non_py/cprnc
Submodule cprnc updated 1 files
+3 −6 CMakeLists.txt
4 changes: 2 additions & 2 deletions CIME/tests/test_sys_cime_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def test_cime_case_build_threaded_1(self):
)

with Case(casedir, read_only=False) as case:
build_threaded = case.get_value("SMP_PRESENT")
build_threaded = case.get_value("BUILD_THREADED")
self.assertFalse(build_threaded)

build_threaded = case.get_build_threaded()
Expand All @@ -254,7 +254,7 @@ def test_cime_case_build_threaded_2(self):
)

with Case(casedir, read_only=False) as case:
build_threaded = case.get_value("SMP_PRESENT")
build_threaded = case.get_value("BUILD_THREADED")
self.assertTrue(build_threaded)

build_threaded = case.get_build_threaded()
Expand Down
8 changes: 4 additions & 4 deletions CIME/tests/test_unit_xml_machines.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@
<env name="NETCDF_FORTRAN_PATH">/opt/ubuntu/pe/netcdf-hdf5parallel/4.8.1.3/gnu/9.1/</env>
<env name="PNETCDF_PATH">$SHELL{dirname $(dirname $(which pnetcdf_version))}</env>
</environment_variables>
<environment_variables SMP_PRESENT="TRUE">
<environment_variables BUILD_THREADED="TRUE">
<env name="OMP_STACKSIZE">128M</env>
</environment_variables>
<environment_variables SMP_PRESENT="TRUE" compiler="gnu">
<environment_variables BUILD_THREADED="TRUE" compiler="gnu">
<env name="OMP_PLACES">cores</env>
</environment_variables>
</machine>
Expand Down Expand Up @@ -126,10 +126,10 @@
<env name="NETCDF_FORTRAN_PATH">/opt/ubuntu/pe/netcdf-hdf5parallel/4.8.1.3/gnu/9.1/</env>
<env name="PNETCDF_PATH">$SHELL{dirname $(dirname $(which pnetcdf_version))}</env>
</environment_variables>
<environment_variables SMP_PRESENT="TRUE">
<environment_variables BUILD_THREADED="TRUE">
<env name="OMP_STACKSIZE">128M</env>
</environment_variables>
<environment_variables SMP_PRESENT="TRUE" compiler="gnu">
<environment_variables BUILD_THREADED="TRUE" compiler="gnu">
<env name="OMP_PLACES">cores</env>
</environment_variables>
</machine>
Expand Down
10 changes: 5 additions & 5 deletions Externals.cfg
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
[ccs_config]
tag = ccs_config_cesm0.0.76
tag = ccs_config_cesm0.0.88
protocol = git
repo_url = https://github.com/ESMCI/ccs_config_cesm
local_path = ccs_config
required = True

[cmeps]
tag = cmeps0.14.38
tag = cmeps0.14.47
protocol = git
repo_url = https://github.com/ESCOMP/CMEPS.git
local_path = components/cmeps
required = True

[cdeps]
tag = cdeps1.0.19
tag = cdeps1.0.26
protocol = git
repo_url = https://github.com/ESCOMP/CDEPS.git
local_path = components/cdeps
externals = Externals_CDEPS.cfg
required = True

[cpl7]
tag = cpl77.0.6
tag = cpl77.0.8
protocol = git
repo_url = https://github.com/ESCOMP/CESM_CPL7andDataComps
local_path = components/cpl7
Expand All @@ -42,7 +42,7 @@ local_path = libraries/mct
required = True

[parallelio]
tag = pio2_6_0
tag = pio2_6_2
protocol = git
repo_url = https://github.com/NCAR/ParallelIO
local_path = libraries/parallelio
Expand Down
2 changes: 1 addition & 1 deletion docker/config_machines.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<config_machines version="2.0">
<machine MACH="docker">
<DESC>Docker</DESC>
<NODENAME_REGEX>docker</NODENAME_REGEX>
<!-- <NODENAME_REGEX>docker</NODENAME_REGEX> -->
<OS>LINUX</OS>
<PROXY />
<COMPILERS>gnu,gnuX</COMPILERS>
Expand Down
Loading