Skip to content

Commit bc3f8b8

Browse files
AaronDonahuebrhillman
authored andcommitted
Merge pull request #2969 from trey-ornl/trey/cime_config/frontier-gnu
Move Frontier build to gfortran and latest rocm
1 parent 57aa3e2 commit bc3f8b8

16 files changed

+73
-640
lines changed

cime_config/machines/Depends.crusher-gpu.crayclang.cmake

Lines changed: 0 additions & 43 deletions
This file was deleted.

cime_config/machines/cmake_macros/amdclang_crusher.cmake

Lines changed: 0 additions & 12 deletions
This file was deleted.

cime_config/machines/cmake_macros/amdclanggpu_crusher.cmake

Lines changed: 0 additions & 26 deletions
This file was deleted.

cime_config/machines/cmake_macros/crayclang-scream_crusher-scream-cpu.cmake

Lines changed: 0 additions & 12 deletions
This file was deleted.

cime_config/machines/cmake_macros/crayclang-scream_crusher-scream-gpu.cmake

Lines changed: 0 additions & 28 deletions
This file was deleted.

cime_config/machines/cmake_macros/crayclang-scream_crusher-scream.cmake

Lines changed: 0 additions & 12 deletions
This file was deleted.

cime_config/machines/cmake_macros/crayclang_crusher.cmake

Lines changed: 0 additions & 10 deletions
This file was deleted.

cime_config/machines/cmake_macros/crayclanggpu_crusher.cmake

Lines changed: 0 additions & 63 deletions
This file was deleted.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
set(MPICC "cc")
2+
set(MPICXX "hipcc") # Needs MPICH_CXX to use hipcc
3+
set(MPIFC "ftn") # Linker needs to be the Cray wrapper ftn, not mpif90
4+
set(SCC "cc")
5+
set(SCXX "hipcc")
6+
set(SFC "ftn")
7+
8+
string(APPEND CPPDEFS " -DLINUX -DFORTRANUNDERSCORE -DNO_R16 -DCPRGNU -DSCREAM_SYSTEM_WORKAROUND_P3_PART2")
9+
if (COMP_NAME STREQUAL gptl)
10+
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY")
11+
endif()
12+
string(APPEND CMAKE_Fortran_FLAGS " -fconvert=big-endian -ffree-line-length-none -ffixed-line-length-none -fallow-argument-mismatch")
13+
14+
string(APPEND CMAKE_C_FLAGS_DEBUG " -O0 -g -Wall -fbacktrace -fcheck=bounds -ffpe-trap=invalid,zero,overflow")
15+
string(APPEND CMAKE_Fortran_FLAGS_DEBUG " -O0 -g -Wall -fbacktrace -fcheck=bounds -ffpe-trap=zero,overflow")
16+
string(APPEND CMAKE_CXX_FLAGS_DEBUG " -O0 -g -Wall -fbacktrace")
17+
18+
string(APPEND CMAKE_C_FLAGS_RELEASE " -g -O2")
19+
string(APPEND CMAKE_CXX_FLAGS_RELEASE " -g -O2")
20+
string(APPEND CMAKE_Fortran_FLAGS_RELEASE " -g -O2")
21+
22+
if (COMP_NAME STREQUAL csm_share)
23+
string(APPEND CMAKE_C_FLAGS " -std=c99")
24+
endif()
25+
string(APPEND CMAKE_Fortran_FORMAT_FIXED_FLAG " -ffixed-form")
26+
string(APPEND CMAKE_Fortran_FORMAT_FREE_FLAG " -ffree-form")
27+
28+
set(E3SM_LINK_WITH_FORTRAN "TRUE")
29+
string(APPEND CMAKE_CXX_FLAGS " -I$ENV{MPICH_DIR}/include")
30+
string(APPEND CMAKE_EXE_LINKER_FLAGS " -L$ENV{ROCM_PATH}/lib -lamdhip64")
31+
32+
if (compile_threaded)
33+
string(APPEND CMAKE_C_FLAGS " -fopenmp")
34+
string(APPEND CMAKE_Fortran_FLAGS " -fopenmp")
35+
string(APPEND CMAKE_CXX_FLAGS " -fopenmp=libgomp")
36+
string(APPEND CMAKE_EXE_LINKER_FLAGS " -fopenmp")
37+
endif()
38+
39+
string(APPEND KOKKOS_OPTIONS " -DKokkos_ENABLE_HIP=On -DKokkos_ARCH_ZEN3=On -DKokkos_ARCH_VEGA90A=On -DKokkos_ENABLE_OPENMP=Off")
40+
41+
set(USE_HIP "TRUE")
42+
string(APPEND CMAKE_HIP_FLAGS "$ENV{CXXFLAGS} --offload-arch=gfx90a -munsafe-fp-atomics")

cime_config/machines/cmake_macros/gnu_crusher.cmake

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)