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

Juan 17/08/2021:datatypes.f90, add missin acc kernels

parent 70cdb792
No related branches found
No related tags found
No related merge requests found
...@@ -193,7 +193,9 @@ private ...@@ -193,7 +193,9 @@ private
allocate(phi%st(1-halo_size:nlocal+halo_size, & allocate(phi%st(1-halo_size:nlocal+halo_size, &
1-halo_size:nlocal+halo_size, & 1-halo_size:nlocal+halo_size, &
0:grid_param%nz+1)) 0:grid_param%nz+1))
!$acc kernels
phi%st(:,:,:) = 0.0_rl phi%st(:,:,:) = 0.0_rl
!$acc end kernels
end if end if
end subroutine create_scalar3d end subroutine create_scalar3d
...@@ -224,6 +226,8 @@ private ...@@ -224,6 +226,8 @@ private
integer :: nlocalx, nlocaly, nz integer :: nlocalx, nlocaly, nz
real(kind=rl) :: vol_h, vol_r, h, tmp real(kind=rl) :: vol_h, vol_r, h, tmp
real , dimension(:,:,:), pointer , contiguous :: zphi_st
if (.not. ( ( power .eq. 1) .or. (power .eq. -1) ) ) then if (.not. ( ( power .eq. 1) .or. (power .eq. -1) ) ) then
call fatalerror("power has to be -1 or 1 when volume-scaling fields") call fatalerror("power has to be -1 or 1 when volume-scaling fields")
end if end if
...@@ -244,7 +248,12 @@ private ...@@ -244,7 +248,12 @@ private
end if end if
if (LUseO) phi%s (1:nz,1:nlocaly,1:nlocalx) = tmp*phi%s (1:nz,1:nlocaly,1:nlocalx) if (LUseO) phi%s (1:nz,1:nlocaly,1:nlocalx) = tmp*phi%s (1:nz,1:nlocaly,1:nlocalx)
if (LUseT) phi%st(1:nlocalx,1:nlocaly,1:nz) = tmp*phi%st(1:nlocalx,1:nlocaly,1:nz) if (LUseT) then
zphi_st => phi%st
!$acc kernels
zphi_st(1:nlocalx,1:nlocaly,1:nz) = tmp*zphi_st(1:nlocalx,1:nlocaly,1:nz)
!$acc end kernels
end if
end if end if
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment