Skip to content

Commit

Permalink
remove SMP_PRESENT and replace with BUILD_THREADED
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Dec 14, 2023
1 parent 2ec465c commit d68b8af
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
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
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

0 comments on commit d68b8af

Please sign in to comment.