Skip to content

Commit

Permalink
Merge branch 'master' into update-hypre
Browse files Browse the repository at this point in the history
  • Loading branch information
victorapm committed Jan 23, 2024
2 parents 2de34dc + 66f10a9 commit 36cad01
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 17 deletions.
24 changes: 13 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ ExternalProject_Add( chai
URL ${CHAI_URL}
INSTALL_DIR ${CHAI_DIR}
DEPENDS raja
PATCH_COMMAND patch -p0 < ${TPL_MIRROR_DIR}/umpire_fcompare-debug-second.patch
BUILD_COMMAND ${TPL_BUILD_COMMAND}
INSTALL_COMMAND ${TPL_INSTALL_COMMAND}
CMAKE_GENERATOR ${TPL_GENERATOR}
Expand Down Expand Up @@ -413,7 +414,7 @@ ExternalProject_Add( chai
-D CMAKE_POSITION_INDEPENDENT_CODE=${CMAKE_POSITION_INDEPENDENT_CODE}
-D CHAI_ENABLE_RAJA_PLUGIN=ON
-D RAJA_DIR=${RAJA_DIR}/lib/cmake/raja
-D UMPIRE_ENABLE_C=ON
-D UMPIRE_ENABLE_C=ON
)

list(APPEND build_list chai )
Expand Down Expand Up @@ -805,14 +806,15 @@ if( ENABLE_HYPRE )
if( ENABLE_HYPRE_DEVICE STREQUAL "CUDA" )
list( APPEND HYPRE_DEPENDS chai )
string( SUBSTRING ${CUDA_ARCH} 3 -1 HYPRE_CUDA_SM ) # sm_XY -> XY
set( HYPRE_CUDA_FLAGS "--with-cuda --with-cuda-home=${CUDA_TOOLKIT_ROOT_DIR} \
--enable-cusparse \
--enable-unified-memory \
--with-gpu-arch=${HYPRE_CUDA_SM} \
--with-umpire \
--with-umpire-include=${CHAI_DIR}/include \
--with-umpire-lib-dirs=${CHAI_DIR}/lib \
--with-umpire-libs=umpire " )
set( HYPRE_CUDA_FLAGS "\
--with-cuda --with-cuda-home=${CUDA_TOOLKIT_ROOT_DIR} \
--enable-cusparse \
--enable-unified-memory \
--with-gpu-arch=${HYPRE_CUDA_SM} \
--with-umpire \
--with-umpire-include=${CHAI_DIR}/include \
--with-umpire-lib-dirs=${CHAI_DIR}/lib \
--with-umpire-libs=umpire " )

elseif( ENABLE_HYPRE_DEVICE STREQUAL "HIP" )
message( FATAL_ERROR "hip tpls build only supported through spack" )
Expand Down Expand Up @@ -878,7 +880,7 @@ if(ENABLE_SUITESPARSE)
set( SUITESPARSE_DEPENDS metis )

if( GEOSX_GLOBALINDEX_TYPE_FLAG EQUAL 0 )
set( SUITESPARSE_LONG_INT_FLAGS "-DSuiteSparse_long=int -DSuiteSparse_long_max=2147483647 -DSuiteSparse_long_idd=\\\"d\\\" -D\'SuiteSparse_long_id=\\\"%d\\\"\'" )
set( SUITESPARSE_LONG_INT_FLAGS "-DSuiteSparse_long=int -DSuiteSparse_long_max=2147483647 -DSuiteSparse_long_idd=\\\"d\\\" -D\'SuiteSparse_long_id=\\\"%d\\\"\'" )
elseif( GEOSX_GLOBALINDEX_TYPE_FLAG EQUAL 2 )
set( SUITESPARSE_LONG_INT_FLAGS "-D\'SuiteSparse_long=long long int\' -DSuiteSparse_long_max=2147483647 -DSuiteSparse_long_idd=\\\"d\\\" -D\'SuiteSparse_long_id=\\\"%d\\\"\'" )
endif()
Expand Down Expand Up @@ -1142,7 +1144,7 @@ endif( ENABLE_MPI )
CMAKE_ARGS -D CMAKE_C_COMPILER=${VTK_C_COMPILER}
-D CMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-D CMAKE_CXX_COMPILER=${VTK_CXX_COMPILER}
-D CMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
-D CMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
-D VTK_USE_MPI=${VTK_USE_MPI}
-D VTK_MODULE_ENABLE_VTK_IOParallelXML=${VTK_MODULE_ENABLE_VTK_IOParallelXML}
-D VTK_MODULE_ENABLE_VTK_FiltersParallelDIY2=${VTK_MODULE_ENABLE_VTK_FiltersParallelDIY2}
Expand Down
12 changes: 6 additions & 6 deletions host-configs/TOTAL/pangea3-gcc8.4.1-openmpi-4.1.2.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# hostconfig for pangea3
#
# export MODULEPATH=/workrd/SCR/NUM/geosx_num/module_files:$MODULEPATH
# module load cmake/3.21.4 gcc/8.4.1 cuda/11.0.3 ompi/4.1.2 openblas/0.3.18 python4geosx/p3/gcc8.4.1-ompi4.1.2
#
set(CONFIG_NAME "pangea3-gcc8.4.1-ompi-4.1.2" CACHE PATH "")

Expand All @@ -16,7 +14,7 @@ set(CMAKE_CXX_COMPILER g++ CACHE PATH "")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG -mcpu=power9 -mtune=power9" CACHE STRING "")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g ${CMAKE_CXX_FLAGS_RELEASE}" CACHE STRING "")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g" CACHE STRING "")
set(CMAKE_CXX_STANDARD 14 CACHE STRING "")
set(CMAKE_CXX_STANDARD 17 CACHE STRING "")

# Fortran options
set(CMAKE_Fortran_COMPILER gfortran CACHE PATH "")
Expand Down Expand Up @@ -49,9 +47,8 @@ if (DEFINED ENV{CUDA_ROOT})
set(CMAKE_CUDA_COMPILER ${CUDA_TOOLKIT_ROOT_DIR}/bin/nvcc CACHE STRING "")
set(CUDA_ARCH sm_70 CACHE STRING "")
set(CMAKE_CUDA_ARCHITECTURES 70 CACHE STRING "")
set(CMAKE_CUDA_STANDARD 14 CACHE STRING "")
### The inclusion of -std=c++14 is a workaround for a cuda10/gcc8 bug ###
set(CMAKE_CUDA_FLAGS "-restrict -arch ${CUDA_ARCH} --expt-extended-lambda -Werror cross-execution-space-call,reorder,deprecated-declarations -Xcompiler -std=c++14" CACHE STRING "")
set(CMAKE_CUDA_STANDARD 17 CACHE STRING "")
set(CMAKE_CUDA_FLAGS "-restrict -arch ${CUDA_ARCH} --expt-relaxed-constexpr --expt-extended-lambda -Werror cross-execution-space-call,reorder,deprecated-declarations -Xcompiler -std=c++17" CACHE STRING "")
set(CMAKE_CUDA_FLAGS_RELEASE "-O3 -DNDEBUG -Xcompiler -DNDEBUG -Xcompiler -O3 -Xcompiler -mcpu=powerpc64le -Xcompiler -mtune=powerpc64le" 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 "")
Expand Down Expand Up @@ -106,3 +103,6 @@ set(ENABLE_HYPRE ON CACHE BOOL "")
set(ENABLE_HYPRE_DEVICE "CUDA" CACHE STRING "")

set(SCOTCH_NUM_PROC 1 CACHE STRING "" )

# Enable recording CUDA API calls in Caliper
set(ENABLE_CALIPER_WITH_CUPTI ON CACHE BOOL "" FORCE)
17 changes: 17 additions & 0 deletions tplMirror/umpire_fcompare-debug-second.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
*** src/tpl/umpire/src/tpl/CMakeLists.txt 2023-07-06 14:40:05.000000000 -0700
--- src/tpl/umpire/src/tpl/CMakeLists.txt.patch 2024-01-10 12:16:01.869448000 -0800
***************
*** 193,204 ****
endif ()
endif ()

- if (C_COMPILER_FAMILY_IS_GNU)
- target_compile_options(umpire_tpl_fmt
- INTERFACE
- $<$<COMPILE_LANGUAGE:CXX>:-fcompare-debug-second>)
- endif ()
-
install(TARGETS
umpire_tpl_fmt
EXPORT umpire-targets
--- 193,198 ----

0 comments on commit 36cad01

Please sign in to comment.