Skip to content

Commit

Permalink
model/fv_regional_bc.F90: bugfix, use correct message size
Browse files Browse the repository at this point in the history
  • Loading branch information
climbfuji committed Jun 25, 2020
1 parent b2b0d33 commit 2d0479d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions model/fv_regional_bc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -6483,7 +6483,6 @@ subroutine exch_uv(domain, bd, npz, u, v)
real, intent(inout) :: u (bd%isd:bd%ied ,bd%jsd:bd%jed+1,1:npz)
real, intent(inout) :: v (bd%isd:bd%ied+1,bd%jsd:bd%jed ,1:npz)

integer,parameter :: ibufexch=2500000
real, dimension(:), allocatable :: buf1,buf2,buf3,buf4
integer :: ihandle1,ihandle2,ihandle3,ihandle4
integer,dimension(MPI_STATUS_SIZE) :: istat
Expand Down Expand Up @@ -6524,13 +6523,13 @@ subroutine exch_uv(domain, bd, npz, u, v)

! Receive from north
if( north_pe /= NULL_PE )then
call MPI_Irecv(buf1,ibufexch,_DYN_MPI_REAL,north_pe,north_pe &
call MPI_Irecv(buf1,size(buf1),_DYN_MPI_REAL,north_pe,north_pe &
,MPI_COMM_WORLD,ihandle1,irecv)
endif

! Receive from south
if( south_pe /= NULL_PE )then
call MPI_Irecv(buf2,ibufexch,_DYN_MPI_REAL,south_pe,south_pe &
call MPI_Irecv(buf2,size(buf2),_DYN_MPI_REAL,south_pe,south_pe &
,MPI_COMM_WORLD,ihandle2,irecv)
endif

Expand Down Expand Up @@ -6562,7 +6561,7 @@ subroutine exch_uv(domain, bd, npz, u, v)
enddo

enddo
call MPI_Issend(buf3,ic,_DYN_MPI_REAL,north_pe,mype &
call MPI_Issend(buf3,size(buf3),_DYN_MPI_REAL,north_pe,mype &
,MPI_COMM_WORLD,ihandle3,isend)
endif

Expand Down Expand Up @@ -6594,7 +6593,7 @@ subroutine exch_uv(domain, bd, npz, u, v)
enddo

enddo
call MPI_Issend(buf4,ic,_DYN_MPI_REAL,south_pe,mype &
call MPI_Issend(buf4,size(buf4),_DYN_MPI_REAL,south_pe,mype &
,MPI_COMM_WORLD,ihandle4,isend)
endif

Expand Down

0 comments on commit 2d0479d

Please sign in to comment.