Conversation
Co-authored-by: Dylan Simon <dylan@dylex.net> Co-authored-by: Alexander Hampel <ahampel@flatironinstitute.org>
Dev app4 triqs merge
This commit introduces comprehensive support for MPI one-sided communication (RMA) and shared memory windows: - Add mpi::window<T> class wrapping MPI_Win for remote memory access * Support for MPI_Win_create (existing buffer) and MPI_Win_allocate * RMA operations: get() and put() with type safety * Synchronization primitives: fence(), lock/unlock(), flush(), sync() * Active target synchronization: start/complete/post/wait() * RAII-compliant with automatic resource cleanup - Add mpi::shared_window<T> for zero-copy intra-node communication * Uses MPI_Win_allocate_shared for POSIX shared memory * Query operations to access memory from other ranks on same node * Rank-aware base(), size(), and disp_unit() methods - Add mpi::group class wrapping MPI_Group * Group operations: union, intersection, difference, include/exclude * Rank translation between groups and communicators * Support for active target synchronization epochs - Add shared_communicator class for node-local communication * Extends communicator with split_shared() support - Comprehensive test coverage including shared array and distributed shared array tests
…ecking Major refactoring and documentation improvements across all MPI wrapper classes: - Standardize member variable naming with trailing underscores (com_ → comm_, grp_ → group_, etc.) - Enhance documentation with detailed @brief and @details tags throughout - Wrap all MPI calls with check_mpi_call() for consistent error handling - Simplify method implementations and remove unnecessary complexity - Remove noexcept specifiers where not appropriate - Remove data() getters in favor of base() for consistency - Improve getter methods to return stored attributes directly - Refactor get() and put() methods with clearer type requirements Testing improvements: - Rename mpi_comm_split.cpp to mpi_communicator.cpp - Add comprehensive mpi_group.cpp test file - Update and expand mpi_window.cpp tests
Address remaining inconsistencies and improve code clarity: - Standardize communicator member variable naming from com_ to comm_ across all classes for consistency with mpi::window - Fix window::size() semantics to return element count instead of bytes, matching constructor parameter units - Simplify test code in mpi_window.cpp: * Use structured bindings and modern C++ patterns * Remove redundant variables and computations * Clearer comments and better use of mpi::chunk - Fix window::owned_ member initialization ordering to correctly handle both MPI and non-MPI cases - Remove redundant forward declaration of shared_window - Simplify get_communicator() implementations to return comm_ directly - Update build_multi_node.yml workflow with improvements from app4triqs - Minor documentation clarifications in group and window classes
…k instead of execute_process
Implement mpi_broadcast, mpi_reduce, and mpi_reduce_into for std::optional. All ranks must have consistent has_value state for reduce operations. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mpi_broadcast,mpi_reduce, andmpi_reduce_intoimplementations forstd::optional<T>has_valuestate for reduce operations (throwsstd::runtime_errorotherwise)optional.hppfrom mainmpi.hppheaderTest plan
test/c++/mpi_optional.cppwith tests for broadcast and reduce operationsCo-Authored-By: Claude noreply@anthropic.com