Hello all,
I wonder why when I run MPI_C_SAMPLE.c, it does not stop
and wait for me to enter "num"
/////////////////////////////////
if (rank == 0) {
printf("Enter the number of times around the ring: ");
scanf("%d", &num);
--num;
printf("Process %d sending %d to %d\n", rank, num,
next);
MPI_Send(&num, 1, MPI_INT, next, tag, MPI_COMM_WORLD);
}
/////////////////////////////////
Compile:
$lamboot -v ~/lamhosts #OK
$mpicc MPI_C_SAMPLE.c -o hello #OK
But when I tried to run "mpirun -np 4 hello", it dumped
output of the next while() loop without letting me enter
num!!!
Why?
http://www.lam-mpi.org/tutorials/lam/MPI_C_SAMPLE.c
__________________________________________________
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/
|