Advertisement
Guest User

Untitled

a guest
Mar 30th, 2020
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         if (( mpiRank == 0 ).and.( current_sum > max_sum )) then
  2.           flag = 1
  3.           max_sum = current_sum
  4.           call mpi_bcast(max_sum, 1, MPI_INTEGER4, mpiRank, MPI_COMM_WORLD, mpiErr)
  5.           x1 = Up
  6.           x2 = Down
  7.           y1 = L
  8.           y2 = R
  9.         endif
  10.  
  11.         if (( mpiRank == 1 ).and.( current_sum > max_sum )) then
  12.           flag = 2
  13.           max_sum = current_sum
  14.           call mpi_bcast(max_sum, 1, MPI_INTEGER4, mpiRank, MPI_COMM_WORLD, mpiErr)
  15.           x1 = Up
  16.           x2 = Down
  17.           y1 = L
  18.           y2 = R
  19.         endif
  20.        
  21.         if ( flag == 1 ) then
  22.           call mpi_bcast(max_sum, 1, MPI_INTEGER4, 0, MPI_COMM_WORLD, mpiErr)
  23.         elseif ( flag == 2 ) then
  24.           call mpi_bcast(max_sum, 1, MPI_INTEGER4, 1, MPI_COMM_WORLD, mpiErr)
  25.         endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement