[mpich-discuss] How to implement this case

Xiao Li shinelee.thewise at gmail.com
Mon Jan 3 12:45:00 CST 2011


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20110103/e59573d8/attachment.htm>


More information about the mpich-discuss mailing list