Stefan Kuhne
2009-07-15 10:42:56 UTC
Hi,
i have build a little mpi program which print a text to console and read
an number. But i don't get the text.
Code:
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &numprocs);
MPI_Comm_rank(MPI_COMM_WORLD, &myid);
if(myid == 0) {
printf("Enter the number of intervals: (0 quits) ");
scanf("%f", &n);
}
MPI_Bcast(&n, 1, MPI_DOUBLE, 0, MPI_COMM_WORLD);
Call:
***@Ubuntu-8-04:~/pi$ mpirun --mca btl ^openib --hostfile ../hostfile pi
20000
Enter the number of intervals: (0 quits) pi is approxomantely
3.1415926505377429, Error is 3.0520501682e-09
***@Ubuntu-8-04:~/pi$
Without mpirun:
***@Ubuntu-8-04:~/pi$ ./pi
libibverbs: Fatal: couldn't read uverbs ABI version.
--------------------------------------------------------------------------
[0,0,0]: OpenIB on host Ubuntu-8-04 was unable to find any HCAs.
Another transport will be used instead, although this may result in
lower performance.
--------------------------------------------------------------------------
Enter the number of intervals: (0 quits) 2000
pi is approxomantely 3.1415926487068111, Error is 4.8829820187e-09
***@Ubuntu-8-04:~/pi$
Regards,
Stefan Kuhne
i have build a little mpi program which print a text to console and read
an number. But i don't get the text.
Code:
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &numprocs);
MPI_Comm_rank(MPI_COMM_WORLD, &myid);
if(myid == 0) {
printf("Enter the number of intervals: (0 quits) ");
scanf("%f", &n);
}
MPI_Bcast(&n, 1, MPI_DOUBLE, 0, MPI_COMM_WORLD);
Call:
***@Ubuntu-8-04:~/pi$ mpirun --mca btl ^openib --hostfile ../hostfile pi
20000
Enter the number of intervals: (0 quits) pi is approxomantely
3.1415926505377429, Error is 3.0520501682e-09
***@Ubuntu-8-04:~/pi$
Without mpirun:
***@Ubuntu-8-04:~/pi$ ./pi
libibverbs: Fatal: couldn't read uverbs ABI version.
--------------------------------------------------------------------------
[0,0,0]: OpenIB on host Ubuntu-8-04 was unable to find any HCAs.
Another transport will be used instead, although this may result in
lower performance.
--------------------------------------------------------------------------
Enter the number of intervals: (0 quits) 2000
pi is approxomantely 3.1415926487068111, Error is 4.8829820187e-09
***@Ubuntu-8-04:~/pi$
Regards,
Stefan Kuhne