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

 

Reply via email to