[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[ptp-user] Now, here's a bug!
|
Hi PTP community,
I found a bug in the eclipse-supplied MPI C example that calculates Pi.
The broadcast on line 93:
MPI_Bcast(message, strlen(message)+1, MPI_CHAR, dest, MPI_COMM_WORLD);
..fails because rank 0's message buffer is "Hi, how are you?" and ranks 1..num_procs-1 message buffer is "Greetings from process 1", "Greetings from process 2", and so on. This leads to calling the MPI_Bcast with different buffer lengths which causes a fault on my cluster.
I recommend it be changed to match the fortran example where everyone uses the max length of the buffer for the broadcast, like so:
MPI_Bcast(message, 100, MPI_CHAR, dest, MPI_COMM_WORLD);
I tested this change on my cluster and it works.
I would like a refund for the 30 minutes of my life this bug has taken from me. Put it on my tab :-)
Thanks,
Dave
---
David E. Hudak, Ph.D. dhudak@xxxxxxx
Senior Research Scientist
Ohio Supercomputer Center
http://www.osc.edu/~dhudak