Skip to content

Commit

Permalink
Fix ESCOMP#404, receive buffer needs to be different from send buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
ekluzek committed Jun 26, 2023
1 parent a0c5e24 commit 6633269
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion route/build/src/mpi_process.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2883,6 +2883,8 @@ SUBROUTINE pass_global_data(comm, ierr, message) ! output: error control
integer(i4b), intent(out) :: ierr
character(len=strLen), intent(out) :: message ! error message

integer(i4b) :: receivemax ! Receive buffer for MAX over all tasks

ierr=0; message='pass_global_data/'

! send scalars
Expand All @@ -2892,7 +2894,8 @@ SUBROUTINE pass_global_data(comm, ierr, message) ! output: error control
call MPI_BCAST(calendar, strLen, MPI_CHARACTER, root, comm, ierr)
call MPI_BCAST(time_units,strLen, MPI_CHARACTER, root, comm, ierr)

CALL MPI_ALLREDUCE(maxtdh, maxtdh, 1, MPI_INTEGER, MPI_MAX, comm, ierr)
CALL MPI_ALLREDUCE(maxtdh, receivemax, 1, MPI_INTEGER, MPI_MAX, comm, ierr)
maxtdh = receivemax

END SUBROUTINE pass_global_data

Expand Down

0 comments on commit 6633269

Please sign in to comment.