[MPICH] mpich2 & rand()

Kamaraju Kusumanchi kamaraju at gmail.com
Sat Jun 23 09:51:47 CDT 2007


>  //...init mpi
>  srand(time(0));

What I do is change the seed based on the rank of the process. Say
something like

srand(time(0)+my_rank**2);

where my_rank is is the rank of the processor. Does that work for your case?

hth
raju




More information about the mpich-discuss mailing list