Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (( mpiRank == 0 ).and.( current_sum > max_sum )) then
- flag = 1
- max_sum = current_sum
- call mpi_bcast(max_sum, 1, MPI_INTEGER4, mpiRank, MPI_COMM_WORLD, mpiErr)
- x1 = Up
- x2 = Down
- y1 = L
- y2 = R
- endif
- if (( mpiRank == 1 ).and.( current_sum > max_sum )) then
- flag = 2
- max_sum = current_sum
- call mpi_bcast(max_sum, 1, MPI_INTEGER4, mpiRank, MPI_COMM_WORLD, mpiErr)
- x1 = Up
- x2 = Down
- y1 = L
- y2 = R
- endif
- if ( flag == 1 ) then
- call mpi_bcast(max_sum, 1, MPI_INTEGER4, 0, MPI_COMM_WORLD, mpiErr)
- elseif ( flag == 2 ) then
- call mpi_bcast(max_sum, 1, MPI_INTEGER4, 1, MPI_COMM_WORLD, mpiErr)
- endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement