Skip to content

Commit

Permalink
Add obviously verifications if all Ranks reached final phase in the p…
Browse files Browse the repository at this point in the history
…i example

Signed-off-by: Yuki Iwai <[email protected]>
  • Loading branch information
tenzen-y committed Oct 12, 2024
1 parent 797cc2e commit 0470b99
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/v2beta1/pi/pi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ int main(int argc, char *argv[]) {
double pi = 4 * (double)total_count / (double)(worker_tests) / (double)(workers);
printf("pi is approximately %.16lf\n", pi);
}
MPI_Barrier(MPI_COMM_WORLD);
MPI_Finalize();
return 0;
}

0 comments on commit 0470b99

Please sign in to comment.