mpi: exchange an index instead of MPI_Win #800
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A requirement is that all the ranks of a given MPI window share the same id (so it can be passed to an other rank). There is no such thing mandated by the MPI standard, this is absolutely not the case with Open MPI (and its derivatives) and though it seems to work with MPICH (and its derivatives) this is not something guaranted by the implementation.
A reliable mechanism must be implemented for this to work with any MPI library.
This patch is a proof of concept that introduces two subroutines:
MPI_Win CAF_idx2win(int idx)
int CAF_win2idx(MPI_Win win)
that do the conversion between a MPI_Win opaque handler and and index that meet the Coarrays requirements.These subroutines are implemented with
MPI_Win_f2c()
andMPI_Win_c2f()
.THIS IS NOT A CORRECT IMPLEMENTATIONi
since the MPI Standard offer no guarantee
that the Fortran ID meet the requirements for Coarrays.
OpenCoarrays have been lucky so far with MPICH, and it may be equally lucky with Open MPI too, but that CANNOT be taken for granted.
Refs #793
Summary of changes
Summarize what you changed
Rationale for changes
Why did you make these changes?
Additional info and certifications
This pull request (PR) is a:
I certify that
OpenCoarrays developer a chance to review my proposed code
be introduced)
Code coverage data