Skip to content

Commit

Permalink
Yohann/host perlmutter (#287)
Browse files Browse the repository at this point in the history
* Initial host config for Perlmutter.

* workaround for perlmutter

* re-enable gcc pragma

---------

Co-authored-by: Yohann Dudouit <[email protected]>
  • Loading branch information
rrsettgast and YohannDudouit authored Sep 2, 2024
1 parent ec26694 commit 0a5f594
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
45 changes: 45 additions & 0 deletions host-configs/LBL/perlmutter-base.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Set up the tpls
set( GEOSX_TPL_ROOT_DIR ${CMAKE_SOURCE_DIR}/../../thirdPartyLibs CACHE PATH "")
set(GEOSX_TPL_DIR ${GEOSX_TPL_ROOT_DIR}/install-${CONFIG_NAME}-release CACHE PATH "")

set(CAMP_DIR ${GEOSX_TPL_DIR}/raja CACHE PATH "")
set(RAJA_DIR ${GEOSX_TPL_DIR}/raja CACHE PATH "")
set( RAJA_ENABLE_VECTORIZATION OFF CACHE BOOL "" FORCE)

set(ENABLE_UMPIRE ON CACHE BOOL "")
set(UMPIRE_DIR ${GEOSX_TPL_DIR}/chai CACHE PATH "")

set(ENABLE_CHAI ON CACHE BOOL "")
set(CHAI_DIR ${GEOSX_TPL_DIR}/chai CACHE PATH "")

set(ENABLE_CALIPER ON CACHE BOOL "")
set(CALIPER_DIR ${GEOSX_TPL_DIR}/caliper CACHE PATH "")

set(ENABLE_ADDR2LINE ON CACHE BOOL "")

# Cuda options
set(ENABLE_CUDA ON CACHE BOOL "")
set(CUDA_TOOLKIT_ROOT_DIR /opt/nvidia/hpc_sdk/Linux_x86_64/22.7/cuda/11.7 CACHE STRING "")
set(CMAKE_CUDA_HOST_COMPILER ${CMAKE_CXX_COMPILER} CACHE STRING "")
set(CMAKE_CUDA_COMPILER ${CUDA_TOOLKIT_ROOT_DIR}/bin/nvcc CACHE STRING "")

set(CMAKE_CUDA_ARCHITECTURES "80" CACHE STRING "")
set(CUDA_ARCH sm_80 CACHE STRING "")
set(CMAKE_CUDA_STANDARD 14 CACHE STRING "")
set(CMAKE_CUDA_FLAGS "-restrict -arch ${CUDA_ARCH} --expt-extended-lambda -Werror cross-execution-space-call,reorder,deprecated-declarations" CACHE STRING "")
set(CMAKE_CUDA_FLAGS_RELEASE "-O3 -DNDEBUG -Xcompiler -DNDEBUG -Xcompiler -O3" CACHE STRING "")
set(CMAKE_CUDA_FLAGS_RELWITHDEBINFO "-g -lineinfo ${CMAKE_CUDA_FLAGS_RELEASE}" CACHE STRING "")
set(CMAKE_CUDA_FLAGS_DEBUG "-g -G -O0 -Xcompiler -O0" CACHE STRING "")

set(CHAI_CUDA_FLAGS "-arch ${CUDA_ARCH}" CACHE STRING "" FORCE)

# Uncomment this line to make nvcc output register usage for each kernel.
# set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --resource-usage" CACHE STRING "" FORCE)

# GTEST options
set(ENABLE_GTEST_DEATH_TESTS OFF CACHE BOOL "")
set(gtest_disable_pthreads ON CACHE BOOL "")

# Documentation
set(ENABLE_UNCRUSTIFY OFF CACHE BOOL "" FORCE)
set(ENABLE_DOXYGEN OFF CACHE BOOL "" FORCE)
12 changes: 12 additions & 0 deletions host-configs/LBL/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
set(CONFIG_NAME "[email protected]" CACHE PATH "")

set(COMPILER_DIR /opt/cray/pe/craype/2.7.20)
set(CMAKE_C_COMPILER ${COMPILER_DIR}/bin/cc CACHE PATH "")
set(CMAKE_CXX_COMPILER ${COMPILER_DIR}/bin/CC CACHE PATH "")

# C++ options
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG -target-accel=nvidia80 " CACHE STRING "")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -target-accel=nvidia80 ${CMAKE_CXX_FLAGS_RELEASE}" CACHE STRING "")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -target-accel=nvidia80 -g " CACHE STRING "")

include(${CMAKE_CURRENT_LIST_DIR}/perlmutter-base.cmake)

0 comments on commit 0a5f594

Please sign in to comment.