Skip to content

Commit

Permalink
Fix preprocessor stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
CasparJungbacker committed Jun 13, 2023
1 parent c270f40 commit a065271
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/modmpi.f90
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,9 @@ subroutine exitmpi
end subroutine exitmpi

subroutine excjs_real32(a,sx,ex,sy,ey,sz,ez,ih,jh)
#if defined(_OPENACC)
#if defined(_OPENACC)
use openacc
#endif
#endif
implicit none
integer sx, ex, sy, ey, sz, ez, ih, jh
real(real32) a(sx-ih:ex+ih, sy-jh:ey+jh, sz:ez)
Expand All @@ -351,10 +351,10 @@ subroutine excjs_real32(a,sx,ex,sy,ey,sz,ez,ih,jh)
, sende,recve &
, sendw,recvw
! Check if the data is on the gpu
#if defined(_OPENACC)
#if defined(_OPENACC)
integer :: is_present
is_present = acc_is_present(a)
#endif
#endif

! Calulate buffer lengths
!$acc kernels default(present) if(is_present)
Expand Down Expand Up @@ -460,9 +460,9 @@ subroutine excjs_real32(a,sx,ex,sy,ey,sz,ez,ih,jh)
end subroutine excjs_real32

subroutine excjs_real64(a,sx,ex,sy,ey,sz,ez,ih,jh)
#if defined(_OPENACC)
#if defined(_OPENACC)
use openacc
#endif
#endif
implicit none
integer sx, ex, sy, ey, sz, ez, ih, jh
real(real64) a(sx-ih:ex+ih, sy-jh:ey+jh, sz:ez)
Expand All @@ -476,10 +476,10 @@ subroutine excjs_real64(a,sx,ex,sy,ey,sz,ez,ih,jh)
, sende,recve &
, sendw,recvw
! Check if the data is on the gpu
#if defined(_OPENACC)
#if defined(_OPENACC)
integer :: is_present
is_present = acc_is_present(a)
#endif
#endif

! Calulate buffer lengths
!$acc kernels default(present) if(is_present)
Expand Down

0 comments on commit a065271

Please sign in to comment.