Changeset 3849 for palm/trunk
- Timestamp:
- Apr 1, 2019 4:35:16 PM (6 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/disturb_field.f90
r3655 r3849 134 134 !-- to store the disturbance 135 135 ALLOCATE( dist2(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 136 !$ACC DATA CREATE(dist2(nzb:nzt+1,nysg:nyng,nxlg:nxrg)) 137 138 ! 139 !-- dist1 is initialized on the host (see below) and then updated on the device. 136 140 dist1 = 0.0_wp 141 !$ACC KERNELS PRESENT(dist2) 137 142 dist2 = 0.0_wp 143 !$ACC END KERNELS 138 144 139 145 ! … … 188 194 189 195 ! 196 !-- Update dist1 on the device, this is expected by exchange_horiz! 197 !$ACC UPDATE DEVICE(dist1(nzb:nzt+1,nysg:nyng,nxlg:nxrg)) 198 199 ! 190 200 !-- Exchange of ghost points for the random perturbation 191 201 … … 197 207 !-- Loop has been splitted to make runs reproducible on HLRN systems using 198 208 !-- compiler option -O3 209 !$ACC PARALLEL LOOP COLLAPSE(2) PRIVATE(i, j, k) PRESENT(dist1, dist2) 199 210 DO i = nxl, nxr 200 211 DO j = nys, nyn … … 217 228 CALL exchange_horiz( dist2, nbgp ) 218 229 230 !$ACC PARALLEL LOOP COLLAPSE(2) PRIVATE(i, j, k) PRESENT(dist1, dist2) 219 231 DO i = nxl, nxr 220 232 DO j = nys, nyn … … 248 260 ! 249 261 !-- Random perturbation is added to the array to be disturbed. 262 !$ACC PARALLEL LOOP COLLAPSE(3) PRIVATE(i, j, k) PRESENT(field, dist1) 250 263 DO i = nxlg, nxrg 251 264 DO j = nysg, nyng … … 256 269 ENDDO 257 270 271 !$ACC END DATA 272 258 273 ! 259 274 !-- Deallocate the temporary array -
palm/trunk/SOURCE/init_3d_model.f90
r3761 r3849 668 668 ONLY : init_surface_arrays, init_surfaces, surf_def_h, surf_lsm_h, & 669 669 surf_usm_h, get_topography_top_index_ji 670 671 #if defined( _OPENACC ) 672 USE surface_mod, & 673 ONLY : bc_h 674 #endif 670 675 671 676 USE surface_data_output_mod, & … … 2169 2174 TRIM( initializing_actions ) /= 'cyclic_fill' ) THEN 2170 2175 2176 ! 2177 !-- Needed for both disturb_field and pres 2178 !$ACC DATA & 2179 !$ACC CREATE(tend(nzb:nzt+1,nysg:nyng,nxlg:nxrg)) & 2180 !$ACC COPY(u(nzb:nzt+1,nysg:nyng,nxlg:nxrg)) & 2181 !$ACC COPY(v(nzb:nzt+1,nysg:nyng,nxlg:nxrg)) 2182 2171 2183 CALL location_message( 'creating initial disturbances', .FALSE. ) 2172 2184 CALL disturb_field( 'u', tend, u ) 2173 2185 CALL disturb_field( 'v', tend, v ) 2174 2186 CALL location_message( 'finished', .TRUE. ) 2187 2188 !$ACC DATA & 2189 !$ACC CREATE(d(nzb+1:nzt,nys:nyn,nxl:nxr)) & 2190 !$ACC COPY(w(nzb:nzt+1,nysg:nyng,nxlg:nxrg)) & 2191 !$ACC COPY(p(nzb:nzt+1,nysg:nyng,nxlg:nxrg)) & 2192 !$ACC COPYIN(rho_air(nzb:nzt+1), rho_air_zw(nzb:nzt+1)) & 2193 !$ACC COPYIN(ddzu(1:nzt+1), ddzw(1:nzt+1)) & 2194 !$ACC COPYIN(wall_flags_0(nzb:nzt+1,nysg:nyng,nxlg:nxrg)) & 2195 !$ACC COPYIN(bc_h(0:1)) & 2196 !$ACC COPYIN(bc_h(0)%i(1:bc_h(0)%ns)) & 2197 !$ACC COPYIN(bc_h(0)%j(1:bc_h(0)%ns)) & 2198 !$ACC COPYIN(bc_h(0)%k(1:bc_h(0)%ns)) & 2199 !$ACC COPYIN(bc_h(1)%i(1:bc_h(1)%ns)) & 2200 !$ACC COPYIN(bc_h(1)%j(1:bc_h(1)%ns)) & 2201 !$ACC COPYIN(bc_h(1)%k(1:bc_h(1)%ns)) 2175 2202 2176 2203 CALL location_message( 'calling pressure solver', .FALSE. ) … … 2179 2206 n_sor = nsor 2180 2207 CALL location_message( 'finished', .TRUE. ) 2208 2209 !$ACC END DATA 2210 !$ACC END DATA 2181 2211 2182 2212 ENDIF -
palm/trunk/SOURCE/pres.f90
r3655 r3849 235 235 236 236 CALL cpu_log( log_point(8), 'pres', 'start' ) 237 238 !$ACC DATA COPYOUT(d, tend) &239 !$ACC COPY(u, v, w, p) &240 !$ACC COPYIN(rho_air, rho_air_zw, ddzu, ddzw, wall_flags_0)241 242 !$ACC DATA &243 !$ACC COPYIN(bc_h(0:1)) &244 !$ACC COPYIN(bc_h(0)%i(1:bc_h(0)%ns)) &245 !$ACC COPYIN(bc_h(0)%j(1:bc_h(0)%ns)) &246 !$ACC COPYIN(bc_h(0)%k(1:bc_h(0)%ns)) &247 !$ACC COPYIN(bc_h(1)%i(1:bc_h(1)%ns)) &248 !$ACC COPYIN(bc_h(1)%j(1:bc_h(1)%ns)) &249 !$ACC COPYIN(bc_h(1)%k(1:bc_h(1)%ns))250 251 237 252 238 ! … … 983 969 CALL cpu_log( log_point(8), 'pres', 'stop' ) 984 970 985 !$ACC END DATA986 !$ACC END DATA987 988 971 END SUBROUTINE pres
Note: See TracChangeset
for help on using the changeset viewer.