Look at the documentation for MPI_Irecv and MPI_Testany ... these should help you do what you want.<div><br></div><div> Eric<br><div class="gmail_quote"><br></div><div class="gmail_quote">On Mon, Jan 3, 2011 at 12:45 PM, Xiao Li <span dir="ltr">&lt;<a href="mailto:shinelee.thewise@gmail.com">shinelee.thewise@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi MPICH2 people,<div><br></div><div>Now, I have a application that composed of single master and many workers. The application requirement is very simple: workers finish some jobs and send data to master and master store these data into files separately. I can simply use MPI_Send on worker side to send data to master. But master does not know the data sending sequence. Some worker go fast while some are slow. More specifically, suppose there are 5 workers, then the data send sequence may be 1,3,4,5,2 or 2,5,4,1,3. If I just write a for loop for(i=1 to 5) on master side with MPI_Recv to get data, the master and some faster worker have to wait for a long time. I know MPI_Gather can implement this. But I am not sure is MPI_Gather works parallelly or just a sequential MPI_Recv? Another issue is my data is extremely large, more than 1GB data needed to be sent to master. If I divide the data into pieces, I do not think MPI_Gather can work. I also tried to think about raw socket programming, but I do not think it is a good practice. Would you give me some suggestion please?</div>

<div><br></div><div>cheers</div><div>Xiao</div>
<br>_______________________________________________<br>
mpich-discuss mailing list<br>
<a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>
<a href="https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss</a><br><br></blockquote></div>
</div>