mpiwg-coll / coll-issues

Repository for internal Collectives Working Group issues and discussions
2 stars 0 forks source link

Idea: Persistent Point-to-Point Collectives #4

Open trey-ornl opened 1 year ago

trey-ornl commented 1 year ago

I propose the following idea for a future MPI standard: persistent point-to-point collectives. The goal is to provide a flexible interface for pre-defining nearest-neighbor-like communication that allows an MPI implementation to pay most setup costs at request-creation time and to perform the communication pattern more efficiently.

Here is a straw-man API.

MPI_SEND_ADD(buf, count, datatype, dest, tag, request) Adds a non-blocking send operation to a persistent request. Multiple operations can be added to the same request. This call would be local.

MPI_RECV_ADD(buf, count, datatype, source, tag, request) Adds a non-blocking recv operation to a persistent request. Multiple operations can be added to the same request. This call would be local.

MPI_REQUEST_INIT(comm, request) Makes a persistent point-to-point collective request available for use with MPI_START and MPI_WAIT. The resulting request would function like a persistent collective request. This call should come after all the ADD calls. It would be collective across the communicator.

A single persistent point-to-point collective request with MPI_START and MPI_WAIT would behave like the analogous array of persistent point-to-point requests with MPI_STARTALL and MPI_WAITALL, but with the following restrictions.

Then the following optimizations could all happen at INIT time.

This API could have the following advantages over existing non-blocking and persistent point-to-point communication.

This API could have the following advantages over persistent neighborhood collectives, while maintaining similar opportunity for performance.

Please forgive me if the MPI Forum has already investigated similar ideas.

trey-ornl commented 1 month ago

Patrick Bridges pointed out to me that this idea is similar to point-to-point communication in NCCL, but with persistence.