Define a new function pointer interception interface (colloquially QMPI) to augment, and perhaps eventually replace PMPI. This interface should allow multiple tools to simultaneously intercept MPI function calls using a well-established interface in a way that minimally impacts performance.
Proposal
Rather than using weak symbols to have the compiler to insert PMPI calls before the MPI library, use explicit function pointers to let tools explicitly place themselves in front of the MPI functions they care about.
Changes to the Text
Adds a new section to the tools chapter to define the new interfaces.
Impact on Implementations
Implementations need to implement the hooks for the described new functionality. Hopefully they do this in a way that minimizes performance impact.
If users do not want to use the function pointer interception features, there is no impact. If they do want to use them, they will need to turn them on via the interfaces defined in the document.
Problem
Define a new function pointer interception interface (colloquially QMPI) to augment, and perhaps eventually replace PMPI. This interface should allow multiple tools to simultaneously intercept MPI function calls using a well-established interface in a way that minimally impacts performance.
Proposal
Rather than using weak symbols to have the compiler to insert PMPI calls before the MPI library, use explicit function pointers to let tools explicitly place themselves in front of the MPI functions they care about.
Changes to the Text
Adds a new section to the tools chapter to define the new interfaces.
Impact on Implementations
Implementations need to implement the hooks for the described new functionality. Hopefully they do this in a way that minimizes performance impact.
An example implementation is available in MPICH and was merged in https://github.com/pmodels/mpich/pull/5035
Impact on Users
If users do not want to use the function pointer interception features, there is no impact. If they do want to use them, they will need to turn them on via the interfaces defined in the document.
References and Pull Requests
Implementation PR: https://github.com/pmodels/mpich/pull/5035 MPI Standard PR: https://github.com/mpi-forum/mpi-standard/pull/742