Skip to content

Commit

Permalink
Merge pull request #426 from sslattery/hypre_gpu
Browse files Browse the repository at this point in the history
Use new HYPRE cmake and add accelerator support
  • Loading branch information
sslattery authored Jul 2, 2021
2 parents d2536fe + a47dd11 commit 12d0a98
Show file tree
Hide file tree
Showing 9 changed files with 264 additions and 187 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ jobs:
uses: actions/[email protected]
with:
repository: hypre-space/hypre
ref: v2.20.0
ref: v2.22.0
path: hypre
- name: Build hypre
if: ${{ matrix.hypre == 'HYPRE' }}
Expand Down
2 changes: 1 addition & 1 deletion .jenkins
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pipeline {
-D CMAKE_CXX_COMPILER=$KOKKOS_DIR/bin/nvcc_wrapper \
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
-D CMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic" \
-D CMAKE_PREFIX_PATH="$KOKKOS_DIR;$ARBORX_DIR;$HEFFTE_DIR" \
-D CMAKE_PREFIX_PATH="$KOKKOS_DIR;$ARBORX_DIR;$HEFFTE_DIR;$HYPRE_DIR" \
-D MPIEXEC_MAX_NUMPROCS=1 \
-D MPIEXEC_PREFLAGS="--allow-run-as-root;--mca;btl_smcuda_use_cuda_ipc;0" \
-D Cabana_REQUIRE_MPI=ON \
Expand Down
15 changes: 8 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ cmake_minimum_required(VERSION 3.9)
project(Cabana LANGUAGES CXX)
set(PROJECT_VERSION "1.0-dev")

# FIXME: HYPRE workaround. Hypre is currently not exporting the find_package(
# MPI ) to find the MPI::MPI_C targets and therefore we add this here for now
# to ensure those targets are found for HYPRE:
# https://github.com/hypre-space/hypre/pull/423
enable_language( C )

# If the user doesn't provide a build type default to release
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CXX_FLAGS)
#release comes with -O3 by default
Expand Down Expand Up @@ -80,15 +86,10 @@ Cabana_add_dependency( PACKAGE MPI )
Cabana_add_dependency( PACKAGE ArborX )

# find Clang Format
find_package( CLANG_FORMAT 10)
find_package( CLANG_FORMAT 10 )

# find hypre
Cabana_add_dependency( PACKAGE HYPRE )
if(HYPRE_FOUND)
install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindHYPRE.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Cabana )
endif()
Cabana_add_dependency( PACKAGE HYPRE VERSION 2.22.0 )

# find heffte
Cabana_add_dependency( PACKAGE Heffte VERSION 2.0.0 )
Expand Down
2 changes: 1 addition & 1 deletion cajita/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ target_link_libraries(Cajita INTERFACE
)

if(Cabana_ENABLE_HYPRE)
target_link_libraries(Cajita INTERFACE HYPRE::hypre)
target_link_libraries(Cajita INTERFACE HYPRE::HYPRE)
endif()

if(Cabana_ENABLE_HEFFTE)
Expand Down
Loading

0 comments on commit 12d0a98

Please sign in to comment.