If one cannot read from the send buffer while an MPI send is in
progress, then it seems to me that all Java and C# MPI bindings are
in violation of the MPI standard. The garbage collector can come
through and scan memory at any time.
The spec says that the application "should not access" the send
buffer between calls to MPI_Isend/MPI_Irecv and MPI_Wait/... .
Although this seems to include reads, the surrounding text strongly
implies that the restriction only realistically applies to writes. As
such, in a future spec release it would be useful to clarify this
point to say that writes are disallowed while reads are allowed but
return unspecified values. In the case of blocking communication, I
don't think that the spec actually says that the application cannot
read from message buffers in the middle of an MPI call (i.e. using
another thread) but I assume that the rules would be similar to those
for non-blocking communication.
I think that the above rules for reads and writes should permit
garbage collection in general. Can anyone think of a limitation?
Greg Bronevetsky
Post-Doctoral Researcher
1028 Building 451
Lawrence Livermore National Lab
(925) 424-5756
bronevetsky1@xxxxxxxx