Skip to content

Commit

Permalink
Merge remote-tracking branch 'trey-ornl/scream/trey/cime_config/front…
Browse files Browse the repository at this point in the history
…ier-gnu' into trey/caar/frontier-gnu
  • Loading branch information
trey-ornl committed Sep 23, 2024
2 parents b610754 + cc81b1f commit aac6e7c
Show file tree
Hide file tree
Showing 16 changed files with 72 additions and 640 deletions.
43 changes: 0 additions & 43 deletions cime_config/machines/Depends.crusher-gpu.crayclang.cmake

This file was deleted.

12 changes: 0 additions & 12 deletions cime_config/machines/cmake_macros/amdclang_crusher.cmake

This file was deleted.

26 changes: 0 additions & 26 deletions cime_config/machines/cmake_macros/amdclanggpu_crusher.cmake

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions cime_config/machines/cmake_macros/crayclang_crusher.cmake

This file was deleted.

63 changes: 0 additions & 63 deletions cime_config/machines/cmake_macros/crayclanggpu_crusher.cmake

This file was deleted.

42 changes: 42 additions & 0 deletions cime_config/machines/cmake_macros/craygnuamdgpu.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
set(MPICC "cc")
set(MPICXX "hipcc") # Needs MPICH_CXX to use hipcc
set(MPIFC "ftn") # Linker needs to be the Cray wrapper ftn, not mpif90
set(SCC "cc")
set(SCXX "hipcc")
set(SFC "ftn")

string(APPEND CPPDEFS " -DLINUX -DFORTRANUNDERSCORE -DNO_R16 -DCPRGNU -DSCREAM_SYSTEM_WORKAROUND_P3_PART2")
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY")
endif()
string(APPEND CMAKE_Fortran_FLAGS " -fconvert=big-endian -ffree-line-length-none -ffixed-line-length-none -fallow-argument-mismatch")

string(APPEND CMAKE_C_FLAGS_DEBUG " -O0 -g -Wall -fbacktrace -fcheck=bounds -ffpe-trap=invalid,zero,overflow")
string(APPEND CMAKE_Fortran_FLAGS_DEBUG " -O0 -g -Wall -fbacktrace -fcheck=bounds -ffpe-trap=zero,overflow")
string(APPEND CMAKE_CXX_FLAGS_DEBUG " -O0 -g -Wall -fbacktrace")

string(APPEND CMAKE_C_FLAGS_RELEASE " -g -O2")
string(APPEND CMAKE_CXX_FLAGS_RELEASE " -g -O2")
string(APPEND CMAKE_Fortran_FLAGS_RELEASE " -g -O2")

if (COMP_NAME STREQUAL csm_share)
string(APPEND CMAKE_C_FLAGS " -std=c99")
endif()
string(APPEND CMAKE_Fortran_FORMAT_FIXED_FLAG " -ffixed-form")
string(APPEND CMAKE_Fortran_FORMAT_FREE_FLAG " -ffree-form")

set(E3SM_LINK_WITH_FORTRAN "TRUE")
string(APPEND CMAKE_CXX_FLAGS " -I$ENV{MPICH_DIR}/include")
string(APPEND CMAKE_EXE_LINKER_FLAGS " -L$ENV{ROCM_PATH}/lib -lamdhip64")

if (compile_threaded)
string(APPEND CMAKE_C_FLAGS " -fopenmp")
string(APPEND CMAKE_Fortran_FLAGS " -fopenmp")
string(APPEND CMAKE_CXX_FLAGS " -fopenmp=libgomp")
string(APPEND CMAKE_EXE_LINKER_FLAGS " -fopenmp")
endif()

string(APPEND KOKKOS_OPTIONS " -DKokkos_ENABLE_HIP=On -DKokkos_ARCH_ZEN3=On -DKokkos_ARCH_VEGA90A=On -DKokkos_ENABLE_OPENMP=Off")

set(USE_HIP "TRUE")
string(APPEND CMAKE_HIP_FLAGS "$ENV{CXXFLAGS} --offload-arch=gfx90a -munsafe-fp-atomics")
15 changes: 0 additions & 15 deletions cime_config/machines/cmake_macros/gnu_crusher.cmake

This file was deleted.

25 changes: 0 additions & 25 deletions cime_config/machines/cmake_macros/gnugpu_crusher.cmake

This file was deleted.

Loading

0 comments on commit aac6e7c

Please sign in to comment.