Skip to content

Commit 98e0648

Browse files
committed
Use Fortran standartized way to compare pointers
1 parent bd86944 commit 98e0648

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

mpp/include/mpp_transmit_mpi.fh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
!!caller is responsible for completion checks (mpp_sync_self) before and after
3838
subroutine MPP_TRANSMIT_( put_data, put_len, to_pe, get_data, get_len, from_pe, block, tag, recv_request, &
3939
& send_request )
40-
use, intrinsic :: iso_c_binding, only: c_loc
40+
use, intrinsic :: iso_c_binding, only: c_loc, c_associated
4141

4242
integer, intent(in) :: put_len, to_pe, get_len, from_pe
4343
MPP_TYPE_, target, intent(in) :: put_data(*)
@@ -90,7 +90,7 @@
9090
if(from_pe.LT.0 .OR. from_pe.GE.npes) call mpp_error(FATAL, 'MPP_TRANSMIT: broadcasting from invalid PE.')
9191
if(put_len.GT.get_len) call mpp_error(FATAL, 'MPP_TRANSMIT: size mismatch between put_data and get_data.')
9292
if(pe.EQ.from_pe)then
93-
if( get_pointer_address(c_loc(get_data)) /= get_pointer_address(c_loc(put_data)) )then
93+
if( .not.c_associated(c_loc(get_data),c_loc(put_data)) )then
9494
!dir$ IVDEP
9595
do i = 1,get_len
9696
get_data(i) = put_data(i)

0 commit comments

Comments
 (0)