-
-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
low level Waitall
#639
low level Waitall
#639
Conversation
I'll admit that I'm a bit reluctant to add these, but not completely opposed. I think if we do add this, it would be better to not reuse the main functions, but instead isolate them in a submodule: in that way, it is clear if you're using the "unsafe" functions, or the MPI.jl ones. (Ideally we would just auto-generate all the wrappers, similar to how HDF5.jl does it) |
Agreed to make this part of a submodule.
I am much in favor of this, and I can work on this, but I will require some direction and something to start with. |
That's one model. Another option might be to use Clang.jl (you can see an effort to use that with HDF5.jl here JuliaIO/HDF5.jl#897). The problem is that the headers will differ between implementations. It might be possible to also get a full list of the functions directly from the standard. Unfortunately it is publishes as a PDF, but you can request access to the latex source here https://github.com/mpi-forum/mpi-issues/wiki/Access-to-the-MPI-Forum-private-repository (I just made a request, as I'm curious to see what format it is in). |
Thanks for the pointers.
I can already see the difficulty of this, but I'm sure we can come up to something clever. I never used |
But the MPI API is standardized and the ABI does not come into play if you keep using MPI types, e.g., |
Thanks! Feel free to open a draft PR if you would like early feedback |
Yeah, it should be possible, the challenge is the Clang.jl can leak ABI details into the API specification (the Open MPI headers in particular are a mess of macros) |
A radical option would be to fix MPI.jl on the MPItrampoline ABI. We could then make a simple low level static wrapper. We would of course rely on MPItrampoline for all ABI translations. |
I was able to get access to the MPI standard repo: it looks like they have some Python code that generates the C headers (https://github.com/mpi-forum/mpi-standard/tree/mpi-4.x/binding-tool); it may be possible to adapt that to generate appropriate Julia code. |
Well on my side I could generate the mpi signatures using I have a minor issue regarding |
Another issue with the <MPICH_jll artifact>/include/mpi.h typedef int MPI_Datatype;
[...]
/*
The layouts for the types MPI_DOUBLE_INT etc are simply
struct {
double var;
int loc;
}
This is documented in the man pages on the various datatypes.
*/
#define MPI_FLOAT_INT ((MPI_Datatype)0x8c000000)
#define MPI_DOUBLE_INT ((MPI_Datatype)0x8c000001)
#define MPI_LONG_INT ((MPI_Datatype)0x8c000002)
#define MPI_SHORT_INT ((MPI_Datatype)0x8c000003)
#define MPI_2INT ((MPI_Datatype)0x4c000816)
#define MPI_LONG_DOUBLE_INT ((MPI_Datatype)0x8c000004) What the heck: |
Closing in favor of #644. |
This is the same reasoning as for #638.
Add a
Waitall
closer to the low levelMPI_Waitall
signature.