Description
Problem
I realise the specification of an MPI ABI is a very complicated endeavour, but as a very small step in this direction, I would like to propose that there be an ABI for identifying a particular MPI implementation.
This is important when using MPI with other languages: I am one of the maintainers of the Julia language MPI bindings, and one of the biggest difficulties is identifying which implementation of MPI is being used. At the moment, we compile a small C program to identify the MPI implementation and the necessary constants, but this has many drawbacks in terms of usability (namely that it requires a C compiler, and makes it difficult to switch between versions).
MPI_Get_library_version
can currently be used to identify an implementation, but it is not well specified as a C ABI as it is not possible to determine the following without parsing a header file:
- the size of the buffer to allocate (i.e. the value of
MPI_MAX_LIBRARY_VERSION_STRING
from the header file) - if a non-default calling convention is used (e.g. Microsoft MPI uses
stdcall
)
Proposal
Point 1 could easily be addressed by adding in the specification the maximum value of MPI_MAX_LIBRARY_VERSION_STRING
: the largest value I have seen is 8192 used by mpich.
Point 2 is more difficult to standardize, since it is much more platform specific. However it only affects one implementation on one platform, and on that platform it appears to be the dominant implementation, so this is less of an issue. If anyone does have a suggestion for solving this, I would be grateful.
Changes to the Text
MPI_MAX_LIBRARY_VERSION_STRING
must be a value less than or equal to 8192.
Impact on Implementation
As far as I know, this should not affect any implementations. If it does, the value can be chosen to be larger.
Impact on Users
This will make it easier to develop MPI bindings in languages other than C or Fortran, which in turn should improve user experience.
References
There is some discussion of this problem in JuliaParallel/MPI.jl#169.
Metadata
Metadata
Assignees
Type
Projects
Status