Im using Rock cluster 16 node each has 2 processors, using mpich 1.2.7p1 in
my Unix platform,
When I run only on two processors, my code is in C as:
if (myid==0)
{
Do A
printf(Doing A finish)
Do B
printf(Doing B finish)
}
if (myid==1)
{
Do C
printf(Doing C finish)
Do D
printf(Doing D finish)
}
MPI_Barriar();
printf(myid %d end, myid);
The all Do A,B,C and D is almost take same time,
when i run: mpirun -nolocal -np 2 machinefile -machines ./out
the output:
Doing C finish
Doing D finish
myid 1 end
Doing A finish
Doing B finish
myid 0 end
Why the myid 0 doenst start untill myid 1 finish and vice versa? these two
processors should work at the same time ,not in serial.
Why the MPI_Barriar has been skipped? one processor should wait until other
call it.
Any one can tell me what im missing.
Thanks in advance.
--
A friend in need Is a friend indeed
|