Changeset 3849 for palm/trunk/SOURCE/disturb_field.f90
- Timestamp:
- Apr 1, 2019 4:35:16 PM (5 years ago)
- File:
-
- 1 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
Note: See TracChangeset
for help on using the changeset viewer.