-
Notifications
You must be signed in to change notification settings - Fork 8
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
Full support for C interface to MPI. #29
base: master
Are you sure you want to change the base?
Conversation
Wow, it is great to hear someone is working on making cl-mpi feature complete! I will support you as good as I can. Some remarks: What happened to my
I see two ways to handle the OpenMPI/MPICH dilemma.
The good thing about 2. would be that one can easily provide access to implementation dependent features. |
Thank you for your thoughtful and quick reply.
I agree that MPI is consistent with respect to names and I see
That is right. I don't currently have a good source of information to feed the versioning information automatically, so I'll have to do that by hand later on. On a side note, I wish the MPI forum published the LaTeX sources of the standard document (or the latest draft).
Yeah, that makes things tricky. In a different version of this patch I was using
In general I'd prefer to stay away from option 1. The overhead of calling a function might not be much but it is unnecessary. Option 2 is more palatable but IMO makes the code less flexible (i.e., it wouldn't work out of the box for a hypothetical brand new implementation of MPI). I find option 3 appealing but I fear it's out of the scope of CFFI, which leads me to suggest (just for the sake of discussion --I'm not necessarily endorsing this--) to use an external build system such as CMake (or GNU autoconf) to handle the detection of the idiosyncrasies of the MPI implementation and generate a suitable grovel.lisp file. One could even do away with the need to include version information for each constant and function because the auto-configuration step could try everything and only compile interfaces to facilities that are available. |
I really hope we can do without CMake or Autoconf. I don't think these build systems add a lot of value compared to ASDF and CFFI. Here is another idea: We use a fully table driven approach with the variables Then cl-mpi performs the following steps:
The good thing about this approach is that each step can be implemented as a single macro. How does that sound? |
Sounds good. I'll get back to you with an update by the end of the week. |
b3daa3c
to
e97f5a3
Compare
…to feature/complete-bindings
Open MPI v4.0.0 and above no longer have interfaces for these symbols, which were deprecated 20 years ago.
enumeration vs macro problem can be addressed by defwrapper in CFFI. |
Thanks for your suggestion, @guicho271828. As a matter of fact, |
By the way - jmbr, what is the current status of your code? Please tell me when I shall review and merge anything. |
I've been using this patch successfully since I posted it here. I still have to get around to re-entering version information on the symbols, though. Saw your |
This is a work in progress PR to add full API support to cl-mpi. AFAICT the only currently missing features from the MPI 3.1 standard are the functions and datatypes intended to interface with Fortran (e.g.,
MPI_Fint
,MPI_*_c2f
, andMPI_*_f2c
).The submitted patch passes the test suite with SBCL 1.5.3.114 and Open MPI 4.0.1.
These are remaining tasks:
OMPI_COMM_TYPE_*
) and MPICH (e.g.,MPIX_COMM_TYPE_NEIGHBORHOOD
).MPI_DIST_GRAPH
,MPI_CART
,MPI_GRAPH
,MPI_UNWEIGHTED
,MPI_WEIGHTS_EMPTY
,MPI_WIN_FLAVOR_CREATE
,MPI_WIN_FLAVOR_ALLOCATE
,MPI_WIN_FLAVOR_DYNAMIC
,MPI_WIN_FLAVOR_SHARED
,MPI_WIN_UNIFIED
, andMPI_WIN_SEPARATE
). This thwarts the groveller and we need a better way to handle this at build time.Looking forward to hearing your thoughts on this.