amjad ali wrote:
Yes, I think that's right. Obviously the sub1 and sub2 exists outside separately. Following is just for understanding.Right. The buffer information is needed both outside of all the loops (in MAIN, where the persistent channels are created) and in the innermost loop (in subroutine 2, where the buffers are loaded and used). In above there is one confusion. The sending buffer will be present in the argument list of the MPI_SEND_INIT() but it will get the values to be sent in the sub2? Is it possible/correct?Yes. The buffer needs to be used by the user program to set the send message up and to use the data that has been received. The buffer also needs to be specified to the MPI implementation so that MPI knows which buffers to send/receive. With a persistent communication, you specify the buffer in the "init" call and thereafter refer to it opaquely with the "request" handle. Incidentally, this can cause problems for optimizing compilers, which may not recognize there is a relationship between a buffer and the opaque request handle. Consider the "extreme possibility" described in http://www.mcs.anl.gov/research/projects/mpi/mpi-standard/mpi-report-2.0/node236.htm#Node241 The question is that, will above actually be communication efficient and over-lapping communication-computation.There are two issues, I think. One is whether persistent communications will help you reduce overheads. It depends, but if for each message you do a bunch of work (packing buffers, computing on data, or even just having lost of data per message), then the amount of overhead you're saving may be relatively small. Another is whether you can overlap communications and computation. This does not require persistent channels, but only nonblocking communications (MPI_Isend/MPI_Irecv). Again, there are no MPI guarantees here, so you may have to break your computation up and insert MPI_Test calls. You may want to get the basic functionality working first and then run performance experiments to decide whether these really are areas that warrant such optimizations. |
- [OMPI users] MPI Persistent Communication Question amjad ali
- Re: [OMPI users] MPI Persistent Communication Question Jeff Squyres
- Re: [OMPI users] MPI Persistent Communication Questi... amjad ali
- Re: [OMPI users] MPI Persistent Communication Qu... Eugene Loh
- Re: [OMPI users] MPI Persistent Communicatio... amjad ali
- Re: [OMPI users] MPI Persistent Communi... Eugene Loh
- Re: [OMPI users] MPI Persistent Com... amjad ali
- Re: [OMPI users] MPI Persistent... Eugene Loh
- Re: [OMPI users] MPI Persistent... amjad ali
- Re: [OMPI users] MPI Persistent... Eugene Loh
- Re: [OMPI users] MPI Persistent... amjad ali