- if (bVerify)
- {
- num_errors = 0;
- for (i=0; i<sizes[n]; i++)
- {
- if (buf[i] != 1000000 * (n * NUM_REPS + reps) + i)
- {
- num_errors++;
- if (num_errors < 10)
- {
- printf("Error: Rank=%d, n=%d, reps=%d, i=%d, buf[i]=%d expected=%d\n", rank, n, reps, i, buf[i],
- 1000000 * (n * NUM_REPS + reps) +i);
- fflush(stdout);
- }
- }
- }
- if (num_errors >= 10)
- {
- printf("Error: Rank=%d, num_errors = %d\n", rank, num_errors);
- fflush(stdout);
- }
- }
- }
+ MPI_Bcast(buf, sizes[n], MPI_INT, ROOT, MPI_COMM_WORLD);
+
+ if (bVerify) {
+ num_errors = 0;
+ for (i = 0; i < sizes[n]; i++) {
+ if (buf[i] != 1000000 * (n * NUM_REPS + reps) + i) {
+ num_errors++;
+ if (num_errors < 10) {
+ printf("Error: Rank=%d, n=%d, reps=%d, i=%d, buf[i]=%d expected=%d\n",
+ rank, n, reps, i, buf[i], 1000000 * (n * NUM_REPS + reps) + i);
+ fflush(stdout);
+ }
+ }
+ }
+ if (num_errors >= 10) {
+ printf("Error: Rank=%d, num_errors = %d\n", rank, num_errors);
+ fflush(stdout);
+ }
+ }
+ }