Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #605 from masterleinad/fix_trilinos_external_kokkos
Browse files Browse the repository at this point in the history
  • Loading branch information
masterleinad committed Aug 24, 2023
2 parents d44f722 + d3d9519 commit 60a4cbd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "data"]
path = data
url = ../DTKData.git
url = https://github.com/ORNL-CEES/DTKData
[submodule "arborx"]
path = packages/Search
url = ../../arborx/arborx.git
Expand Down
19 changes: 6 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ IF (NOT TRIBITS_PROCESSING_PACKAGE)
## FLAGS
##---------------------------------------------------------------------------##

SET(CMAKE_CXX_STANDARD 14)
SET(CMAKE_CXX_STANDARD 17)

##---------------------------------------------------------------------------##
## TriBITS package processing
Expand All @@ -60,30 +60,23 @@ ELSE()
IF(${PACKAGE_NAME}_TRILINOS_TPL)
LIST(APPEND CMAKE_PREFIX_PATH ${TPL_Trilinos_LIBRARY_DIRS}/.. /usr/local/cuda/lib64)

# Find the available devices in Kokkos.
FIND_PATH(_Kokkos_SETTINGS
NAMES KokkosConfig.cmake
PATHS ${KOKKOS_PREFIX}
${TPL_Trilinos_LIBRARY_DIRS}/cmake/Kokkos
${Trilinos_DIR}/../Kokkos)
INCLUDE(${_Kokkos_SETTINGS}/KokkosConfig.cmake)
ASSERT_DEFINED(Kokkos_DEVICES)
find_package(Kokkos REQUIRED QUIET HINTS ${Trilinos_DIR}/../Kokkos)

# Hijack Tpetra ETI
SET(${PACKAGE_NAME}_ETI_SCALARS "double")
SET(${PACKAGE_NAME}_ETI_LORDS "int")
SET(${PACKAGE_NAME}_ETI_GORDS "long")
SET(${PACKAGE_NAME}_ETI_NODES "") # start with the empty list
IF ("SERIAL" IN_LIST Kokkos_DEVICES)
IF (Kokkos_ENABLE_SERIAL)
LIST(APPEND ${PACKAGE_NAME}_ETI_NODES "Kokkos::Compat::KokkosSerialWrapperNode")
ENDIF()
IF ("OPENMP" IN_LIST Kokkos_DEVICES)
IF (Kokkos_ENABLE_OPENMP)
LIST(APPEND ${PACKAGE_NAME}_ETI_NODES "Kokkos::Compat::KokkosOpenMPWrapperNode")
ENDIF()
IF ("CUDA" IN_LIST Kokkos_DEVICES)
IF (Kokkos_ENABLE_CUDA)
LIST(APPEND ${PACKAGE_NAME}_ETI_NODES "Kokkos::Compat::KokkosCudaWrapperNode")
ENDIF()
IF("THREADS" IN_LIST Kokkos_DEVICES)
IF(Kokkos_ENABLE_THREADS)
LIST(APPEND ${PACKAGE_NAME}_ETI_NODES "Kokkos::Compat::KokkosThreadsWrapperNode")
ENDIF()
ELSE()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ struct MovingLeastSquaresOperatorImpl
ArborX::Point{{source_points( j, 0 ),
source_points( j, 1 ),
source_points( j, 2 )}},
ArborX::Point{{0., 0., 0.}} );
ArborX::Point{0., 0., 0.} );

if ( new_distance > distance )
distance = new_distance;
Expand Down Expand Up @@ -162,7 +162,7 @@ struct MovingLeastSquaresOperatorImpl
phi( i ) = rbf( ArborX::Details::distance(
ArborX::Point{{source_points( i, 0 ), source_points( i, 1 ),
source_points( i, 2 )}},
ArborX::Point{{0., 0., 0.}} ) );
ArborX::Point{0., 0., 0.} ) );
} );
Kokkos::fence();
return phi;
Expand Down

0 comments on commit 60a4cbd

Please sign in to comment.