Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tpetra wrapper update #105

Open
wants to merge 30 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ab33990
WIP: Trilinos mpi build
Adrian-Diaz Oct 9, 2024
d6405f0
ENH: Trilinos build logic for mpi wrappers
Adrian-Diaz Oct 10, 2024
8038c93
WIP: tpetra wrapper example
Adrian-Diaz Oct 11, 2024
8ede079
WIP: Tpetra wrapper example
Adrian-Diaz Oct 12, 2024
d3ba93a
WIP: tpetra mpi wrapper example
Adrian-Diaz Oct 14, 2024
2ff07c2
WIP: ann distributed example
Adrian-Diaz Oct 14, 2024
d11131f
WIP: tpetra MPI example
Adrian-Diaz Oct 14, 2024
346082b
COMP: tpetra example
Adrian-Diaz Oct 14, 2024
ddce5da
WIP: tpetra MPI example
Adrian-Diaz Oct 15, 2024
b347337
BUG: tpetra mpi example
Adrian-Diaz Oct 15, 2024
ce95c17
Merge branch 'lanl:main' into Adrian's-Branch
Adrian-Diaz Oct 15, 2024
1ee9321
ENH: add Intel MKL support for Trilinos build
Adrian-Diaz Oct 15, 2024
4696b3b
WIP: partition support
Adrian-Diaz Oct 18, 2024
3a0e43e
WIP: tpetra mpi wrapper partitioning
Adrian-Diaz Oct 19, 2024
3acabc4
ENH: repartitioning with zoltan2
Adrian-Diaz Oct 20, 2024
758a2f7
WIP: tpetra comm plan
Adrian-Diaz Oct 22, 2024
9ce20d0
ENH: comm plan object for tpetra wrapper types
Adrian-Diaz Oct 23, 2024
a954734
BUG: move laplace mpi example in cmake list
Adrian-Diaz Oct 25, 2024
492175d
WIP: crs matrix tpetra wrapper
Adrian-Diaz Oct 25, 2024
cdc0add
WIP: Tpetra crs matrix wrapper
Adrian-Diaz Oct 30, 2024
b5a7fd9
WIP: tpetra wrappers + ENH: kokkos ann examples
Adrian-Diaz Oct 31, 2024
bdc3d74
WIP: tpetra wrappers
Adrian-Diaz Nov 1, 2024
d88684d
WIP: tpetra wrapper
Adrian-Diaz Nov 1, 2024
dabd8bf
WIP: tpetra wrappers
Adrian-Diaz Nov 2, 2024
ddc4e8b
ENH: switch to direct view for performance
Adrian-Diaz Nov 4, 2024
725cb30
WIP: tpetra wrappers
Adrian-Diaz Nov 5, 2024
8724f1e
ENH: FArray type up to 7D
Adrian-Diaz Nov 5, 2024
ff78374
WIP: attempt at compiling layout right tpetra type
Adrian-Diaz Nov 8, 2024
595ee27
ENH: TpetraDFArray test/example
Adrian-Diaz Nov 11, 2024
3632dda
ENH: Layout right distributed array
Adrian-Diaz Nov 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,20 @@ if(Matar_ENABLE_KOKKOS)
if("${Matar_KOKKOS_PACKAGE}" STREQUAL "Trilinos")
find_package(Trilinos REQUIRED)
add_definitions(-DTRILINOS_INTERFACE=1)
elseif(Matar_ENABLE_TRILINOS)
find_package(Trilinos REQUIRED)
add_definitions(-DTRILINOS_INTERFACE=1)
else()
find_package(Kokkos REQUIRED)
endif()
if (Matar_ENABLE_MPI)
find_package(MPI REQUIRED)
add_definitions(-DHAVE_MPI=1)
target_link_libraries(matar INTERFACE Kokkos::kokkos MPI::MPI_CXX)
if(Matar_ENABLE_TRILINOS)
target_link_libraries(matar INTERFACE Trilinos::all_selected_libs MPI::MPI_CXX)
else()
target_link_libraries(matar INTERFACE Kokkos::kokkos MPI::MPI_CXX)
endif()
else()
target_link_libraries(matar INTERFACE Kokkos::kokkos)
endif()
Expand Down
64 changes: 56 additions & 8 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ if (NOT TARGET distclean)
INCLUDE(../cmake/Modules/TargetDistclean.cmake OPTIONAL)
endif (NOT TARGET distclean)

find_package(Matar REQUIRED)
set(LINKING_LIBRARIES matar)

find_package(Matar REQUIRED)
if (MPI)
find_package(MPI REQUIRED)
add_definitions(-DHAVE_MPI=1)
Expand All @@ -36,9 +36,43 @@ if (NOT KOKKOS)
endif()

if (KOKKOS)
find_package(Kokkos REQUIRED) #new
if (Matar_ENABLE_TRILINOS)
find_package(Trilinos REQUIRED) #new
# Assume if the CXX compiler exists, the rest do too.
if (EXISTS ${Trilinos_CXX_COMPILER})
set(CMAKE_CXX_COMPILER ${Trilinos_CXX_COMPILER})
set(CMAKE_C_COMPILER ${Trilinos_C_COMPILER})
set(CMAKE_Fortran_COMPILER ${Trilinos_Fortran_COMPILER})
endif()
if(NOT DISTRIBUTION)
# Make sure to use same compilers and flags as Trilinos
set(CMAKE_CXX_FLAGS "${Trilinos_CXX_COMPILER_FLAGS} ${CMAKE_CXX_FLAGS}")
set(CMAKE_C_FLAGS "${Trilinos_C_COMPILER_FLAGS} ${CMAKE_C_FLAGS}")
set(CMAKE_Fortran_FLAGS "${Trilinos_Fortran_COMPILER_FLAGS} ${CMAKE_Fortran_FLAGS}")
endif()

message("\nFound Trilinos! Here are the details: ")
message(" Trilinos_DIR = ${Trilinos_DIR}")
message(" Trilinos_VERSION = ${Trilinos_VERSION}")
message(" Trilinos_PACKAGE_LIST = ${Trilinos_PACKAGE_LIST}")
message(" Trilinos_LIBRARIES = ${Trilinos_LIBRARIES}")
message(" Trilinos_INCLUDE_DIRS = ${Trilinos_INCLUDE_DIRS}")
message(" Trilinos_LIBRARY_DIRS = ${Trilinos_LIBRARY_DIRS}")
message(" Trilinos_TPL_LIST = ${Trilinos_TPL_LIST}")
message(" Trilinos_TPL_INCLUDE_DIRS = ${Trilinos_TPL_INCLUDE_DIRS}")
message(" Trilinos_TPL_LIBRARIES = ${Trilinos_TPL_LIBRARIES}")
message(" Trilinos_TPL_LIBRARY_DIRS = ${Trilinos_TPL_LIBRARY_DIRS}")
message(" Trilinos_BUILD_SHARED_LIBS = ${Trilinos_BUILD_SHARED_LIBS}")
message("End of Trilinos details\n")

include_directories(${Trilinos_INCLUDE_DIRS} ${Trilinos_TPL_INCLUDE_DIRS})
list(APPEND LINKING_LIBRARIES Trilinos::all_selected_libs)
add_definitions(-DTRILINOS_INTERFACE=1)
else()
find_package(Kokkos REQUIRED) #new
list(APPEND LINKING_LIBRARIES Kokkos::kokkos)
endif()

list(APPEND LINKING_LIBRARIES Kokkos::kokkos)

add_definitions(-DHAVE_KOKKOS=1)

Expand Down Expand Up @@ -76,11 +110,30 @@ if (KOKKOS)
add_executable(annkokkos ann_kokkos.cpp)
target_link_libraries(annkokkos ${LINKING_LIBRARIES})

add_executable(annkokkos_compare ann_kokkos_compare.cpp)
target_link_libraries(annkokkos_compare ${LINKING_LIBRARIES})

if (Matar_ENABLE_TRILINOS)
add_executable(anndistributed ann_distributed.cpp)
target_link_libraries(anndistributed ${LINKING_LIBRARIES})

add_executable(anndistributed_crs ann_distributed_crs.cpp)
target_link_libraries(anndistributed_crs ${LINKING_LIBRARIES})

add_executable(test_tpetra_farray test_tpetra_farray.cpp)
target_link_libraries(test_tpetra_farray ${LINKING_LIBRARIES})
endif()

if (OPENMP)
add_executable(parallel_hello_world parallel_hello_world.cpp)
target_link_libraries(parallel_hello_world ${LINKING_LIBRARIES})
endif()

if (MPI)
include_directories(laplaceMPI)
add_subdirectory(laplaceMPI)
endif()

endif()

### HIP Linking error, will add back in after fixed
Expand Down Expand Up @@ -114,11 +167,6 @@ add_subdirectory(sparsetests)
include_directories(test_rocm)
add_subdirectory(test_rocm)

if (MPI)
include_directories(laplaceMPI)
add_subdirectory(laplaceMPI)
endif()

#include_directories(phaseField/srcKokkosVerbose)
#add_subdirectory(phaseField/srcKokkosVerbose)

Expand Down
Loading
Loading