Advertisement
Bernard0x01

Untitled

Apr 18th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.21 KB | None | 0 0
  1.  
  2. //// bad
  3. int number;
  4. if (world_rank == 0) {
  5.     number = -1;
  6.     MPI_Bcast(&number, 1, MPI_INT, 0, MPI_COMM_WORLD);
  7. } else {
  8.     MPI_Recv(&number, 1, MPI_INT, 0, 0, MPI_COMM_WORLD,MPI_STATUS_IGNORE);
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement