Skip to content
Snippets Groups Projects
Commit b1b4a185 authored by ESCOBAR MUNOZ Juan's avatar ESCOBAR MUNOZ Juan
Browse files

Juan 16/03/2023:ZSOLVER/communication.f90, Cray OPENACC Opt, pass ztab* by...

Juan 16/03/2023:ZSOLVER/communication.f90, Cray OPENACC Opt, pass ztab* by args + dim in boundary_mnh/_dim
parent a6bf2076
No related branches found
No related tags found
No related merge requests found
...@@ -697,6 +697,8 @@ contains ...@@ -697,6 +697,8 @@ contains
integer :: icompx_max,icompy_max integer :: icompx_max,icompy_max
real , dimension(:,:,:) , pointer , contiguous :: za_st real , dimension(:,:,:) , pointer , contiguous :: za_st
integer :: nib,nie,njb,nje,nzb,nze
! Update Real Boundary for Newman case u(0) = u(1) , etc ... ! Update Real Boundary for Newman case u(0) = u(1) , etc ...
...@@ -728,31 +730,45 @@ contains ...@@ -728,31 +730,45 @@ contains
icompx_max = a%icompx_max icompx_max = a%icompx_max
icompy_max = a%icompy_max icompy_max = a%icompy_max
!$acc kernels nib = Lbound(za_st,1) ; nie = Ubound(za_st,1)
if ( ix_min == 1 ) then njb = Lbound(za_st,2) ; nje = Ubound(za_st,2)
!acc kernels nzb = Lbound(za_st,3) ; nze = Ubound(za_st,3)
za_st(0,:,:) = za_st(1,:,:)
!acc end kernels call boundary_mnh_dim(za_st)
endif
if ( ix_max == n ) then
!acc kernels
za_st(icompx_max+1,:,:) = za_st(icompx_max,:,:)
!acc end kernels
endif
if ( iy_min == 1 ) then
!acc kernels
za_st(:,0,:) = za_st(:,1,:)
!acc end kernels
endif
if ( iy_max == n ) then
!acc kernels
za_st(:,icompy_max+1,:) = za_st(:,icompy_max,:)
!acc end kernels
endif
!$acc end kernels
endif endif
contains
subroutine boundary_mnh_dim(pza_st)
implicit none
real :: pza_st(nib:nie,njb:nje,nzb:nze)
!$acc kernels
if ( ix_min == 1 ) then
!acc kernels
pza_st(0,:,:) = pza_st(1,:,:)
!acc end kernels
endif
if ( ix_max == n ) then
!acc kernels
pza_st(icompx_max+1,:,:) = pza_st(icompx_max,:,:)
!acc end kernels
endif
if ( iy_min == 1 ) then
!acc kernels
pza_st(:,0,:) = pza_st(:,1,:)
!acc end kernels
endif
if ( iy_max == n ) then
!acc kernels
pza_st(:,icompy_max+1,:) = pza_st(:,icompy_max,:)
!acc end kernels
endif
!$acc end kernels
end subroutine boundary_mnh_dim
end subroutine boundary_mnh end subroutine boundary_mnh
!================================================================== !==================================================================
! Initiate asynchronous halo exchange ! Initiate asynchronous halo exchange
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment