[mpich-discuss] Fwd: mpich2 small question

Bibrak Qamar bibrakc at gmail.com
Wed Feb 15 07:20:06 CST 2012


Mohmad,


One way is to gather and print it on rank0.

The other way is to have loop from
i --> sizeOfCommWorld
and call print if rank==i
else
    do nothing

and yes put a barrier so that printing is in order.

I don't know if there is any efficient way.


Bibrak



On Wed, Feb 15, 2012 at 5:14 PM, mohamed ali <eng1182 at gmail.com> wrote:

>
>
> Hi there
>
> I´m a beginner in this interresting matter and i tried to devide a for
> loop among processes. I put the limits of the loop depending on the process
> like: ( for i=(Rank*Ntotal/Nprocesses+1), (Rank*Ntotal/Nprocesses+1)+
> Ntotal/Nprocesses-1) and there is modifications in the data of an array
> that is defiened by array(i). the question is : to print the resulting
> array, should I make gather statement and put it in a new array in the rank
> 0 or what?
>
> Thanks in advance.
>
>
> _______________________________________________
> mpich-discuss mailing list     mpich-discuss at mcs.anl.gov
> To manage subscription options or unsubscribe:
> 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/20120215/1e74106f/attachment.htm>


More information about the mpich-discuss mailing list