Skip to content

Commit 2d1da49

Browse files
G. Dylan Dickersonabishekg7
authored andcommitted
Remove update directives, use acc host_data use_device(...) near MPI calls instead
Last commit still had answer differences. NOTE: This commit does too
1 parent e94516e commit 2d1da49

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/framework/mpas_halo.F

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,9 +633,11 @@ subroutine mpas_halo_exch_group_full_halo_exch(domain, groupName, iErr)
633633
bufstart = group % groupRecvOffsets(i)
634634
bufend = group % groupRecvOffsets(i) + group % groupRecvCounts(i) - 1
635635
!TO DO: how do we determine appropriate type here?
636+
!$acc host_data use_device(group % recvBuf)
636637
call MPI_Irecv(group % recvBuf(bufstart:bufend), group % groupRecvCounts(i), MPI_REALKIND, &
637638
group % groupRecvNeighbors(i), group % groupRecvNeighbors(i), comm, &
638639
group % recvRequests(i), mpi_ierr)
640+
!$acc end host_data
639641
else
640642
group % recvRequests(i) = MPI_REQUEST_NULL
641643
end if
@@ -765,7 +767,6 @@ subroutine mpas_halo_exch_group_full_halo_exch(domain, groupName, iErr)
765767
end select
766768
end if
767769
end do
768-
!$acc update host(group % sendBuf(:))
769770

770771
!
771772
! Initiate non-blocking sends to all neighbors
@@ -775,9 +776,11 @@ subroutine mpas_halo_exch_group_full_halo_exch(domain, groupName, iErr)
775776
bufstart = group % groupSendOffsets(i)
776777
bufend = group % groupSendOffsets(i) + group % groupSendCounts(i) - 1
777778
!TO DO: how do we determine appropriate type here?
779+
!$acc host_data use_device(group % sendBuf)
778780
call MPI_Isend(group % sendBuf(bufstart:bufend), group % groupSendCounts(i), MPI_REALKIND, &
779781
group % groupSendNeighbors(i), rank, comm, &
780782
group % sendRequests(i), mpi_ierr)
783+
!$acc end host_data
781784
else
782785
group % sendRequests(i) = MPI_REQUEST_NULL
783786
end if

0 commit comments

Comments
 (0)