On Oct 11, 2010, at 1:29 PM, Bowen Zhou wrote:

> Try MPI_Isend?

'zactly correct.

You currently have an MPI_Wait on the sender side for no reason -- the request 
is only filled in on the receiver.  So you're waiting on an uninitialized 
variable on the sender.

MPI_Send is a "blocking" send.  MPI_Isend is a non-blocking send.
MPI_Recv is a blocking receiver.  MPI_Irecv is a non-blocking receiver.

MPI_Send is more-or-less equivalent to MPI_Isend immediately followed by an 
MPI_Wait on the corresponding request.  Ditto with MPI_Recv / MPI_Irecv.


> 
>> I have a glut application I am trying to add MPI to.  In the display 
>> callback, for rank >= 1, I want to send data to the rank =0 process.  I am 
>> not concerned at this point about sending data from the rank 0 process back 
>> to the rank >= 1 process, so my data is one direction.  I would like to do 
>> this with non-blocking send/receive but I am not having much success.
>> Within my display callback I do the following:
>> if( myrank == 0 ) {
>>   MPI_Irecv( receiveData, DATA_SIZE, MPI_DOUBLE, 1, 19, MPI_COMM_WORLD, 
>> &request );
>>   MPI_Wait( &request, &status );
>> }
>> else if( myrank == 1 ) {
>>   /* Post a receive, send a message, then wait */
>>   MPI_Send( sendData, DATA_SIZE, MPI_DOUBLE, 0, 19, MPI_COMM_WORLD );
>>   MPI_Wait( &request, &status );
>> }
>> But it appears that the app is still blocking after the MPI_Send.... (I have 
>> various debug prints in the actual code, this is stripped down for ease of 
>> reading).  A sample app that i have that does this works... Is doing this 
>> from the glut display call back causing the problem? Any suggestions would 
>> be greatly appreciated.
>> Thanks,
>> Ed
>> ------------------------------------------------------------------------
>> _______________________________________________
>> users mailing list
>> us...@open-mpi.org
>> http://www.open-mpi.org/mailman/listinfo.cgi/users
> 
> _______________________________________________
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users


-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/


Reply via email to