Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
604c805
use repartAllToAll
greole Jul 30, 2025
f9d9a99
add get_ranks_per_gpu
greole Jul 30, 2025
e0041d2
add basic implementation of gatherv instead off alltoallv for repart …
greole Jul 30, 2025
b4cadf5
use forceHostBuffer for vector updates
greole Jul 30, 2025
d0fe5a1
wip performance tuning
greole Aug 4, 2025
d0c11e9
format files
greole Aug 6, 2025
aa977a1
use optimizer as default
greole Aug 6, 2025
11509bc
WIP, avoid symmetric MPI_Igatherv
greole Aug 7, 2025
63cec6f
wip move preconditioner to separate implementation files
greole Aug 26, 2025
af2b40c
move LU implementation
greole Sep 15, 2025
6456a6c
format
greole Sep 15, 2025
fafcc9e
add ISAI
greole Sep 15, 2025
597d5d4
clean-up
greole Sep 15, 2025
6924ad6
move to CoarseSolver.cpp
greole Sep 16, 2025
21385a2
extract num rows in ml schwarz
greole Sep 17, 2025
941bccd
use schwarz dispatch function
greole Sep 17, 2025
ea03809
Apply suggestions from code review
greole Sep 17, 2025
bd2c1e2
clean-up some unneeded gko::share
greole Sep 17, 2025
0c3fae9
add basic implementation of gatherv instead off alltoallv for repart …
greole Jul 30, 2025
350fcff
use forceHostBuffer for vector updates
greole Jul 30, 2025
8fb475d
performance tuning
greole Aug 4, 2025
08c593a
use optimizer as default
greole Aug 6, 2025
9886bc5
Avoid symmetric MPI_Igatherv
greole Aug 7, 2025
723e510
fixup
greole May 9, 2026
5b164b1
fixup!
greole May 9, 2026
73516e4
fixup!
greole May 9, 2026
9a05779
wip fix distmultigrid
greole May 10, 2026
15d6094
fixup
greole May 10, 2026
9a5a7d6
wip fix distmultigrid
greole May 10, 2026
047c4c0
wip fix distmultigrid
greole May 11, 2026
9cb3c6a
wrap OGL_GINKGO_CHECKOUT_VERSION
May 15, 2026
0897389
Revert non-preconditioner changes to dev
greole May 15, 2026
524d156
WIP adaptive preconditioner example
greole May 15, 2026
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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@
build
builds
.vscode

# local build and tooling artifacts
build.log
Dockerfile
.claude/
36 changes: 24 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,14 @@ target_sources(
src/MatrixWrapper/SparsityPattern.cpp
src/MatrixWrapper/Distributed.cpp
src/MatrixWrapper/Combination.cpp
src/Preconditioner/CoarseSolver.cpp
src/Repartitioner.cpp
src/Solver/CG.cpp
src/Solver/PipeCG.cpp
src/Solver/BiCGStab.cpp
src/Solver/GMRES.cpp
src/Solver/Multigrid.cpp
# src/Solver/IR.cpp
# src/Solver/IR.cpp
)

enable_sanitizers(
Expand All @@ -218,7 +219,13 @@ endif()
if(${GINKGO_BUILD_CUDA})
find_package(CUDAToolkit REQUIRED)
target_compile_definitions(OGL PRIVATE GINKGO_BUILD_CUDA=1)
target_link_libraries(OGL PUBLIC CUDA::nvToolsExt)
if(TARGET CUDA::nvToolsExt)
target_link_libraries(OGL PUBLIC CUDA::nvToolsExt)
elseif(TARGET CUDA::nvtx3)
target_link_libraries(OGL PUBLIC CUDA::nvtx3)
else()
message(WARNING "Neither CUDA::nvToolsExt nor CUDA::nvtx3 found; NVTX annotations disabled")
endif()
endif()

if(OGL_DATA_VALIDATION)
Expand All @@ -243,15 +250,20 @@ add_custom_target(
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMENT "a target to format cmake files")

install(
TARGETS OGL
ginkgo
ginkgo_device
ginkgo_hip
ginkgo_cuda
ginkgo_omp
ginkgo_dpcpp
ginkgo_reference
DESTINATION $ENV{FOAM_USER_LIBBIN})
set(_ogl_install_targets OGL)
foreach(
_target
ginkgo
ginkgo_device
ginkgo_hip
ginkgo_cuda
ginkgo_omp
ginkgo_dpcpp
ginkgo_reference)
if(TARGET ${_target})
list(APPEND _ogl_install_targets ${_target})
endif()
endforeach()
install(TARGETS ${_ogl_install_targets} DESTINATION $ENV{FOAM_USER_LIBBIN})

include(cmake/banner.cmake)
2 changes: 1 addition & 1 deletion cmake/AutoEnableDevice.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ if(NOT DEFINED OGL_BUILD_HIP)
CACHE INTERNAL "")
endif()
else()
message(STATUS "Skip HIP detection OGL_HIP_CUDA=${OGL_BUILD_HIP}")
message(STATUS "Skip HIP detection OGL_BUILD_HIP=${OGL_BUILD_HIP}")
endif()
9 changes: 6 additions & 3 deletions cmake/CxxThirdParty.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@

include(cmake/CPM.cmake)


if(NOT DEFINED OGL_GINKGO_DIR)
set(OGL_GINKGO_CHECKOUT_VERSION
"ogl_0600_gko190"
CACHE STRING "Use specific version of ginkgo")
if(NOT DEFINED OGL_GINKGO_CHECKOUT_VERSION)
set(OGL_GINKGO_CHECKOUT_VERSION
"ogl_0600_gko190"
CACHE STRING "Use specific version of ginkgo")
endif()
message(STATUS "Using CPM to get Ginkgo ${GINKGO_CHECKOUT_VERSION}")
set(OGL_GINKGO_VIA_CPM ON)
else()
Expand Down
22 changes: 20 additions & 2 deletions include/OGL/DevicePersistent/ExecutorHandler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ struct DeviceIdHandler {
return device_global_id % num_devices_per_node;
}

/* @brief returns the owner rank on the global comm world communicator
*/
label global_owner() const
{
label rank = Pstream::myProcNo();
return rank - (rank % ranks_per_gpu);
}

/* @brief check if rank is an owning rank
*/
bool is_owner() const
Expand Down Expand Up @@ -270,15 +278,16 @@ class ExecutorHandler
// gko comm
label group = device_id_handler_.compute_group();
MPI_Comm gko_comm;
label host_rank = 0;
label host_rank = Pstream::myProcNo();
MPI_Comm_split(MPI_COMM_WORLD, group, host_rank, &gko_comm);
device_comm_ =
std::make_shared<gko::experimental::mpi::communicator>(
gko_comm, gko_force_host_buffer_);

// repart comm
MPI_Comm repart_comm;
label device_id = device_id_handler_.compute_device_id(4);
label global_rank = Pstream::myProcNo();
label device_id = global_rank / device_id_handler_.ranks_per_gpu;
MPI_Comm_split(MPI_COMM_WORLD, device_id, host_rank, &repart_comm);
repart_comm_ =
std::make_shared<gko::experimental::mpi::communicator>(
Expand All @@ -300,6 +309,15 @@ class ExecutorHandler
* */
bool get_non_orig_device_comm() const { return non_orig_device_comm_; }

label get_ranks_per_gpu() const { return device_id_handler_.ranks_per_gpu; }

void set_ranks_per_gpu(label ranks_per_gpu)
{
device_id_handler_.ranks_per_gpu = ranks_per_gpu;
}

label get_owner_rank() const { return device_id_handler_.global_owner(); }

const std::shared_ptr<gko::Executor> get_device_exec() const
{
return this->get_persistent_object();
Expand Down
Loading
Loading