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

Merged
merged 56 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
56 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
8d8a347
WIP: CArray type
Adrian-Diaz Nov 20, 2024
53d2aa3
BUG+ENH: add tpetra dcarray test and fix order bug
Adrian-Diaz Nov 21, 2024
320d891
WIP: mesh read distributed example
Adrian-Diaz Dec 8, 2024
6d0c70e
WIP: tpetra mesh partition example
Adrian-Diaz Dec 9, 2024
7c355d6
ENH: mesh decomposition example
Adrian-Diaz Dec 9, 2024
0c9157a
COMP: extra header removed
Adrian-Diaz Dec 9, 2024
b1aa4fb
Merge branch 'lanl:main' into Adrian's-Branch
Adrian-Diaz Dec 9, 2024
b15aecd
BUG: improve examples
Adrian-Diaz Dec 10, 2024
2f7f13e
STYLE: outdated comment
Adrian-Diaz Dec 10, 2024
81c6c90
BUG: missing ms in print
Adrian-Diaz Dec 10, 2024
251dd13
BUG: comm plan = operator
Adrian-Diaz Dec 11, 2024
90aa88e
ENH: force mesh example to use ghosts in loop
Adrian-Diaz Dec 11, 2024
e03afce
BUG: remove if
Adrian-Diaz Dec 11, 2024
d3a7761
ENH: cleanup old stuff
Adrian-Diaz Dec 11, 2024
eba94b6
BUG: several bug fixes for CUDA
Adrian-Diaz Dec 12, 2024
373c943
BUG&WIP: fixes for CUDA
Adrian-Diaz Dec 12, 2024
64c8073
BUG: device use bugs
Adrian-Diaz Dec 13, 2024
42fd113
BUG: device update
Adrian-Diaz Dec 14, 2024
665be1e
BUG: subview constructor setup
Adrian-Diaz Dec 15, 2024
1a7025d
COMP: xpetra option
Adrian-Diaz Dec 15, 2024
9800a1a
WIP: Device bug fixes
Adrian-Diaz Dec 16, 2024
5e2abaf
BUG: repartitioned view data now properly set and updated
Adrian-Diaz Dec 16, 2024
c5b6d13
BUG: fix mesh example for CUDA
Adrian-Diaz Dec 16, 2024
21c4ffe
BUG: let it sync as it needs to
Adrian-Diaz Dec 16, 2024
bc508b4
BUG: import sometimes needed host update instead of device
Adrian-Diaz Dec 17, 2024
c641e37
ENH: hierarchical block comment for example
Adrian-Diaz Dec 17, 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
45 changes: 42 additions & 3 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,6 +110,11 @@ if (KOKKOS)
add_executable(annkokkos ann_kokkos.cpp)
target_link_libraries(annkokkos ${LINKING_LIBRARIES})

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

if (OPENMP)
add_executable(parallel_hello_world parallel_hello_world.cpp)
target_link_libraries(parallel_hello_world ${LINKING_LIBRARIES})
Expand Down
Loading
Loading