Repository navigation
[Core][MPI] Add non-blocking (asynchronous) operations to DataCommunicator - #14835
Open
loumalouomega wants to merge 7 commits into
Open
loumalouomega wants to merge 7 commits into
loumalouomega wants to merge 7 commits into
Conversation
loumalouomega
marked this pull request as ready for review
October 2, 2026 11:37
This branch has not been deployed
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.
📝 Description
DataCommunicatoronly supported blocking calls. This PR adds non-blocking point-to-point and collective operations. They return a new MPI-agnosticDataCommunicatorRequest, which is the core's equivalent ofMPI_Request.Key changes
DataCommunicatorRequest(kratos/includes/data_communicator_request.h): a move-only handle withWait(),Test(),IsCompleted()and a staticWaitAll(). A default-constructed request counts as already completed. Destroying a pending request waits for it to finish.DataCommunicatormethods:ISend/IRecv(MPI_Isend/MPI_Irecv)IBarrier(MPI_Ibarrier)IBroadcast(MPI_Ibcast)ISumAll/IMinAll/IMaxAll(MPI_Iallreduce)Send/Recv(char,int,unsigned int,long unsigned int,double,array_1d,Vector,Matrix, plusstd::vectorof each), andstd::stringfor send/recv/broadcast.MPIDataCommunicator: the request owns theMPI_Requestand the message buffers. Received data that isn't contiguous (e.g.std::vector<Vector>) is copied back on completion.DataCommunicator: operations complete immediately;IRecvthrows, likeRecv.int/doublevariants plusISendString,IRecvStringandIBarrier. They return aDataCommunicatorRequestthat keeps the buffers alive; read the result withGetResult().Usage rules: output buffers must be sized in advance, including the inner shapes of
Vector/Matrixentries, because no size information is sent. PairISendwithIRecv.Validation
New tests:
kratos/tests/cpp_tests/includes/test_data_communicator_request.cpp(serial)kratos/mpi/tests/cpp_tests/sources/test_mpi_data_communicator_async.cpp(MPI, ring exchange, all types,Test()polling,WaitAll, completion on destruction, collectives)testAsync*cases inkratos/mpi/tests/test_mpi_data_communicator_python.pyResults:
mpirun -np 1/2/3.KratosMPICoreTestsuite has no failures.🆕 Changelog
DataCommunicatorRequest, an MPI-agnostic handle for non-blocking communicationISend,IRecv,IBarrier,IBroadcast,ISumAll,IMinAllandIMaxAlltoDataCommunicator/MPIDataCommunicator