[mpich-discuss] How to implement this case

Eric A. Borisch eborisch at ieee.org
Mon Jan 3 13:13:39 CST 2011


Look at the documentation for MPI_Irecv and MPI_Testany ... these should
help you do what you want.

 Eric

On Mon, Jan 3, 2011 at 12:45 PM, Xiao Li <shinelee.thewise at gmail.com> wrote:

> Hi MPICH2 people,
>
> 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?
>
> cheers
> Xiao
>
> _______________________________________________
> mpich-discuss mailing list
> mpich-discuss at mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20110103/3147bb42/attachment.htm>


More information about the mpich-discuss mailing list