diff --git a/MNH/mode_mnh_zwork.f90 b/MNH/mode_mnh_zwork.f90 index 3c16414a6313e9bced3d62f07e02256e85ec0af8..a681705a7d384b1854cccd3bcd9ec36dfa61926f 100644 --- a/MNH/mode_mnh_zwork.f90 +++ b/MNH/mode_mnh_zwork.f90 @@ -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