Skip to content

Commit cc81b1f

Browse files
committed
Add SCREAM_SYSTEM_WORKAROUND_P3_PART2. Return support for crayclang-scream. Rename craygnuamdgpu.
1 parent dba1054 commit cc81b1f

File tree

4 files changed

+35
-8
lines changed

4 files changed

+35
-8
lines changed

cime_config/machines/cmake_macros/craygnu-hipcc.cmake renamed to cime_config/machines/cmake_macros/craygnuamdgpu.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set(SCC "cc")
55
set(SCXX "hipcc")
66
set(SFC "ftn")
77

8-
string(APPEND CPPDEFS " -DLINUX -DFORTRANUNDERSCORE -DNO_R16 -DCPRGNU")
8+
string(APPEND CPPDEFS " -DLINUX -DFORTRANUNDERSCORE -DNO_R16 -DCPRGNU -DSCREAM_SYSTEM_WORKAROUND_P3_PART2")
99
if (COMP_NAME STREQUAL gptl)
1010
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY")
1111
endif()

cime_config/machines/config_machines.xml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,7 @@
10981098
<DESC>Frontier. AMD EPYC 7A53 64C nodes, 128 hwthreads, 512GB DDR4, 4 MI250X GPUs.</DESC>
10991099
<NODENAME_REGEX>.*frontier.*</NODENAME_REGEX>
11001100
<OS>CNL</OS>
1101-
<COMPILERS>craygnu-hipcc</COMPILERS>
1101+
<COMPILERS>craygnuamdgpu,crayclang-scream</COMPILERS>
11021102
<MPILIBS>mpich</MPILIBS>
11031103
<PROJECT>cli115</PROJECT>
11041104
<SAVE_TIMING_DIR>/lustre/orion/proj-shared/cli115</SAVE_TIMING_DIR>
@@ -1135,7 +1135,7 @@
11351135
<cmd_path lang="sh">module</cmd_path>
11361136
<cmd_path lang="csh">module</cmd_path>
11371137
<cmd_path lang="python">/usr/share/lmod/lmod/libexec/lmod python</cmd_path>
1138-
<modules>
1138+
<modules compiler="craygnuamdgpu">
11391139
<command name="reset"></command>
11401140
<!-- PrgEnv-gnu before cpe, or cray-mpich module doesn't update correctly -->
11411141
<command name="load">PrgEnv-gnu</command>
@@ -1152,6 +1152,25 @@
11521152
<command name="load">cray-parallel-netcdf</command>
11531153
<command name="unload">darshan-runtime</command>
11541154
</modules>
1155+
<modules compiler="crayclang-scream">
1156+
<command name="reset"></command>
1157+
<command name="load">cpe/22.12</command>
1158+
<command name="load">craype-accel-amd-gfx90a</command>
1159+
<command name="load">rocm/5.4.0</command>
1160+
<command name="load">libunwind/1.6.2</command>
1161+
<command name="load">cce/15.0.1</command>
1162+
<command name="load">libfabric/1.15.2.0</command>
1163+
<command name="load">craype/2.7.20</command>
1164+
<command name="load">cray-mpich/8.1.26</command>
1165+
<command name="load">cray-python/3.9.13.1</command>
1166+
<command name="load">subversion/1.14.1</command>
1167+
<command name="load">git/2.36.1</command>
1168+
<command name="load">cmake/3.21.3</command>
1169+
<command name="load">cray-hdf5-parallel/1.12.2.1</command>
1170+
<command name="load">cray-netcdf-hdf5parallel/4.9.0.1</command>
1171+
<command name="load">cray-parallel-netcdf/1.12.3.1</command>
1172+
<command name="unload">darshan-runtime</command>
1173+
</modules>
11551174
</module_system>
11561175

11571176
<RUNDIR>$CIME_OUTPUT_ROOT/$CASE/run</RUNDIR>
@@ -1176,9 +1195,13 @@
11761195
<env name="OMP_PLACES">threads</env>
11771196
</environment_variables>
11781197

1179-
<environment_variables compiler="craygnu-hipcc" mpilib="mpich">
1198+
<environment_variables compiler="craygnuamdgpu" mpilib="mpich">
11801199
<env name="ADIOS2_ROOT">$SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /sw/frontier/spack-envs/cpe24.07-gpu/opt/gcc-13.2/adios2-2.10.0-cyq7kvlfq5nixmw5unih2gjdkhvitava; else echo "$ADIOS2_ROOT"; fi}</env>
11811200
</environment_variables>
1201+
<environment_variables compiler="crayclang-scream" mpilib="mpich">
1202+
<env name="ADIOS2_ROOT">$SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /lustre/orion/cli115/world-shared/frontier/3rdparty/adios2/2.9.1/cray-mpich-8.1.26/crayclang-scream-14.0.0; else echo "$ADIOS2_ROOT"; fi}</env>
1203+
</environment_variables>
1204+
11821205
</machine>
11831206

11841207
<!-- Skylake nodes of Stampede2 at TACC -->

components/eamxx/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -550,9 +550,8 @@ DisableMpiCxxBindings()
550550
if (SCREAM_DOUBLE_PRECISION)
551551
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
552552
set(SCREAM_Fortran_FLAGS -real-size 64)
553-
#elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "[Cc]lang" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "HIPCC")
554-
#find what is crayclang id in cmake
555-
#set(SCREAM_Fortran_FLAGS -s default32 -eZ)
553+
elseif("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "Cray")
554+
set(SCREAM_Fortran_FLAGS -s default32 -eZ)
556555
else()
557556
set(SCREAM_Fortran_FLAGS -fdefault-real-8 -fdefault-double-8)
558557
endif()

components/eamxx/src/physics/p3/disp/p3_main_impl_part2_disp.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ namespace p3 {
1010
* this file, #include p3_functions.hpp instead.
1111
*/
1212

13+
#ifdef SCREAM_SYSTEM_WORKAROUND_P3_PART2
14+
#pragma clang optimize off
15+
#endif
1316
template <>
1417
void Functions<Real,DefaultDevice>
1518
::p3_main_part2_disp(
@@ -130,7 +133,9 @@ ::p3_main_part2_disp(
130133
if (!hydrometeorsPresent(i)) return;
131134
});
132135
}
133-
136+
#ifdef SCREAM_SYSTEM_WORKAROUND_P3_PART2
137+
#pragma clang optimize on
138+
#endif
134139
} // namespace p3
135140
} // namespace scream
136141

0 commit comments

Comments
 (0)