LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Nguyen Hung Vu (vuhung16mpi_at_[hidden])
Date: 2003-11-22 07:32:54


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/