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

Juan 23/03/2013: add update host to mirrored array

parent 2d1c30d1
No related branches found
No related tags found
No related merge requests found
......@@ -13,18 +13,18 @@ LOGICAL, SAVE :: GSOUTH , GNORTH
LOGICAL, SAVE :: GFIRST_CALL_MNH_ALLOC_ZWORK = .TRUE.
!
REAL, SAVE, ALLOCATABLE , DIMENSION(:,:,:) :: &
ZW3D1,ZW3D2,ZW3D3,ZW3D4,ZW3D5,ZW3D6,ZW3D7, &
& ZW3D1,ZW3D2,ZW3D3,ZW3D4,ZW3D5,ZW3D6,ZW3D7, &
& ZW3D8,ZW3D9,ZW3D10,ZW3D11,ZW3D12,ZW3D13,ZW3D14,ZW3D15
!$acc declare mirror(ZW3D1,ZW3D2,ZW3D3,ZW3D4,ZW3D5,ZW3D6,ZW3D7) &
!$acc & mirror(ZW3D8,ZW3D9,ZW3D10,ZW3D11,ZW3D12,ZW3D13,ZW3D14,ZW3D15)
REAL, SAVE, ALLOCATABLE , DIMENSION(:,:) :: ZPSRC_HALO2_WEST
REAL, SAVE, ALLOCATABLE , DIMENSION(:,:) :: ZPSRC_HALO2_SOUTH
#define ACC_MIRROR
#ifdef ACC_MIRROR
!$acc declare mirror(ZW3D1,ZW3D2,ZW3D3,ZW3D4,ZW3D5,ZW3D6,ZW3D7)
!$acc declare mirror(ZW3D8,ZW3D9,ZW3D10,ZW3D11,ZW3D12,ZW3D13,ZW3D14,ZW3D15)
REAL, SAVE, ALLOCATABLE , DIMENSION(:,:) :: ZPSRC_HALO2_WEST
REAL, SAVE, ALLOCATABLE , DIMENSION(:,:) :: ZPSRC_HALO2_SOUTH
!$acc declare mirror(ZPSRC_HALO2_WEST,ZPSRC_HALO2_SOUTH)
#endif
REAL, SAVE, ALLOCATABLE , DIMENSION(:,:,:) :: ZUNIT3D
!$acc declare mirror(ZUNIT3D)
!
CONTAINS
......@@ -78,7 +78,9 @@ SUBROUTINE MNH_ALLOC_ZWORK(IMODEL)
ALLOCATE (ZPSRC_HALO2_WEST(IJU,IKU))
ALLOCATE (ZPSRC_HALO2_SOUTH(IIU,IKU))
!$acc kernels
ALLOCATE (ZUNIT3D(IIU,IJU,IKU))
!$acc kernels
ZW3D1 = XUNDEF
ZW3D2 = XUNDEF
ZW3D3 = XUNDEF
......@@ -97,8 +99,14 @@ SUBROUTINE MNH_ALLOC_ZWORK(IMODEL)
ZPSRC_HALO2_WEST = XUNDEF
ZPSRC_HALO2_SOUTH = XUNDEF
!$acc end kernels
ZUNIT3D = 1.0
!$acc end kernels
!$acc update host (ZW3D1,ZW3D2,ZW3D3,ZW3D4,ZW3D5,ZW3D6,ZW3D7)
!$acc update host (ZW3D8,ZW3D9,ZW3D10,ZW3D11,ZW3D12,ZW3D13,ZW3D14,ZW3D15)
!$acc update host (ZPSRC_HALO2_WEST,ZPSRC_HALO2_SOUTH)
!$acc update host( ZUNIT3D)
END IF
......
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