Changeset 1257 for palm/trunk/SOURCE
- Timestamp:
- Nov 8, 2013 3:18:40 PM (11 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/advec_ws.f90
r1222 r1257 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! 22 ! accelerator loop directives removed 23 23 ! 24 24 ! Former revisions: … … 2458 2458 !-- Computation of fluxes and tendency terms 2459 2459 !$acc kernels present( ddzw, sk, tend, u, v, w, wall_flags_0, wall_flags_00 ) 2460 !$acc loop2461 2460 DO i = i_left, i_right 2462 2461 DO j = j_south, j_north 2463 !$acc loop vector( 32 )2464 2462 DO k = nzb+1, nzt 2465 2463 … … 3159 3157 !-- Computation of fluxes and tendency terms 3160 3158 !$acc kernels present( ddzw, tend, u, v, w, wall_flags_0, wall_flags_00 ) 3161 !$acc loop3162 3159 DO i = i_left, i_right 3163 3160 DO j = j_south, j_north 3164 !$acc loop vector( 32 )3165 3161 DO k = nzb+1, nzt 3166 3162 … … 3876 3872 !-- Computation of fluxes and tendency terms 3877 3873 !$acc kernels present( ddzw, tend, u, v, w, wall_flags_0, wall_flags_00 ) 3878 !$acc loop3879 3874 DO i = i_left, i_right 3880 3875 DO j = j_south, j_north 3881 !$acc loop vector( 32 )3882 3876 DO k = nzb+1, nzt 3883 3877 … … 4572 4566 !-- Computation of fluxes and tendency terms 4573 4567 !$acc kernels present( ddzu, tend, u, v, w, wall_flags_0, wall_flags_00 ) 4574 !$acc loop4575 4568 DO i = i_left, i_right 4576 4569 DO j = j_south, j_north 4577 !$acc loop vector( 32 )4578 4570 DO k = nzb+1, nzt 4579 4571 -
palm/trunk/SOURCE/boundary_conds.f90
r1242 r1257 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! loop independent clauses added 23 23 ! 24 24 ! Former revisions: … … 171 171 IF ( ibc_pt_b == 0 ) THEN 172 172 !$acc kernels present( nzb_s_inner, pt, pt_p ) 173 !$acc loop independent 173 174 DO i = nxlg, nxrg 175 !$acc loop independent 174 176 DO j = nysg, nyng 175 177 pt_p(nzb_s_inner(j,i),j,i) = pt(nzb_s_inner(j,i),j,i) … … 179 181 ELSEIF ( ibc_pt_b == 1 ) THEN 180 182 !$acc kernels present( nzb_s_inner, pt_p ) 183 !$acc loop independent 181 184 DO i = nxlg, nxrg 185 !$acc loop independent 182 186 DO j = nysg, nyng 183 187 pt_p(nzb_s_inner(j,i),j,i) = pt_p(nzb_s_inner(j,i)+1,j,i) … … 208 212 IF ( .NOT. constant_diffusion ) THEN 209 213 !$acc kernels present( e_p, nzb_s_inner ) 214 !$acc loop independent 210 215 DO i = nxlg, nxrg 216 !$acc loop independent 211 217 DO j = nysg, nyng 212 218 e_p(nzb_s_inner(j,i),j,i) = e_p(nzb_s_inner(j,i)+1,j,i) -
palm/trunk/SOURCE/buoyancy.f90
r1242 r1257 20 20 ! Currrent revisions: 21 21 ! ------------------ 22 ! 22 ! vector length (32) removed from openacc clause 23 23 ! 24 24 ! Former revisions: … … 220 220 DO i = i_left, i_right 221 221 DO j = j_south, j_north 222 !$acc loop independent vector (32)222 !$acc loop independent vector 223 223 DO k = nzb_s_inner(j,i)+1, nzt-1 224 224 tend(k,j,i) = tend(k,j,i) + atmos_ocean_sign * g * 0.5 * ( & -
palm/trunk/SOURCE/coriolis.f90
r1132 r1257 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! openacc loop and loop vector clauses removed 23 23 ! 24 24 ! Former revisions: … … 170 170 CASE ( 1 ) 171 171 !$acc kernels present( nzb_u_inner, tend, v, vg, w ) 172 !$acc loop173 172 DO i = i_left, i_right 174 173 DO j = j_south, j_north 175 !$acc loop vector( 32 )176 174 DO k = 1, nzt 177 175 IF ( k > nzb_u_inner(j,i) ) THEN … … 193 191 CASE ( 2 ) 194 192 !$acc kernels present( nzb_v_inner, tend, u, ug ) 195 !$acc loop196 193 DO i = i_left, i_right 197 194 DO j = j_south, j_north 198 !$acc loop vector( 32 )199 195 DO k = 1, nzt 200 196 IF ( k > nzb_v_inner(j,i) ) THEN … … 212 208 CASE ( 3 ) 213 209 !$acc kernels present( nzb_w_inner, tend, u ) 214 !$acc loop215 210 DO i = i_left, i_right 216 211 DO j = j_south, j_north 217 !$acc loop vector( 32 )218 212 DO k = 1, nzt 219 213 IF ( k > nzb_w_inner(j,i) ) THEN -
palm/trunk/SOURCE/diffusion_e.f90
r1182 r1257 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! openacc loop and loop vector clauses removed 23 23 ! 24 24 ! Former revisions: … … 326 326 !$acc kernels present( ddzu, ddzw, dd2zu, diss, e, km, l_grid ) & 327 327 !$acc present( nzb_s_inner, rif, tend, var, zu, zw ) 328 !$acc loop329 328 DO i = i_left, i_right 330 329 DO j = j_south, j_north 331 !$acc loop vector( 32 )332 330 DO k = 1, nzt 333 331 … … 395 393 !$acc kernels present( ddzu, ddzw, dd2zu, diss, e, km, l_grid ) & 396 394 !$acc present( nzb_s_inner, rif, tend, var, zu, zw ) 397 !$acc loop398 395 DO i = i_left, i_right 399 396 DO j = j_south, j_north 400 !$acc loop vector( 32 )401 397 DO k = 1, nzt 402 398 … … 466 462 IF ( use_sgs_for_particles .OR. wang_kernel .OR. turbulence ) THEN 467 463 !$acc kernels present( diss, nzb_s_inner ) 468 !$acc loop469 464 DO i = i_left, i_right 470 !$acc loop vector( 32 )471 465 DO j = j_south, j_north 472 466 diss(nzb_s_inner(j,i),j,i) = diss(nzb_s_inner(j,i)+1,j,i) -
palm/trunk/SOURCE/diffusion_s.f90
r1132 r1257 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! 22 ! openacc loop and loop vector clauses removed 23 23 ! 24 24 ! Former revisions: … … 229 229 !$acc present( s_flux_b, s_flux_t, tend, wall_s_flux ) & 230 230 !$acc present( wall_w_x, wall_w_y ) 231 !$acc loop232 231 DO i = i_left, i_right 233 232 DO j = j_south, j_north 234 233 ! 235 234 !-- Compute horizontal diffusion 236 !$acc loop vector( 32 )237 235 DO k = 1, nzt 238 236 IF ( k > nzb_s_outer(j,i) ) THEN … … 252 250 ! 253 251 !-- Apply prescribed horizontal wall heatflux where necessary 254 !$acc loop vector(32)255 252 DO k = 1, nzt 256 253 IF ( k > nzb_s_inner(j,i) .AND. k <= nzb_s_outer(j,i) .AND. & … … 279 276 !-- prescribed or computed at bottom and/or top, index k starts/ends at 280 277 !-- nzb+2 or nzt-1, respectively. 281 !$acc loop vector( 32 )282 278 DO k = 1, nzt_diff 283 279 IF ( k >= nzb_diff_s_inner(j,i) ) THEN … … 293 289 !-- Vertical diffusion at the first computational gridpoint along 294 290 !-- z-direction 295 !$acc loop vector( 32 )296 291 DO k = 1, nzt 297 292 IF ( use_surface_fluxes .AND. k == nzb_s_inner(j,i)+1 ) THEN -
palm/trunk/SOURCE/diffusion_u.f90
r1132 r1257 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! openacc loop and loop vector clauses removed, declare create moved after 23 ! the FORTRAN declaration statement 23 24 ! 24 25 ! Former revisions: … … 264 265 REAL :: kmym, kmyp, kmzm, kmzp 265 266 267 REAL, DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr) :: usvs 266 268 !$acc declare create ( usvs ) 267 REAL, DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr) :: usvs268 269 269 270 ! … … 278 279 !$acc present ( ddzu, ddzw, fym, fyp, wall_u ) & 279 280 !$acc present ( nzb_u_inner, nzb_u_outer, nzb_diff_u ) 280 !$acc loop281 281 DO i = i_left, i_right 282 282 DO j = j_south, j_north 283 283 ! 284 284 !-- Compute horizontal diffusion 285 !$acc loop vector(32)286 285 DO k = 1, nzt 287 286 IF ( k > nzb_u_outer(j,i) ) THEN … … 308 307 ! 309 308 !-- Wall functions at the north and south walls, respectively 310 !$acc loop vector(32)311 309 DO k = 1, nzt 312 310 IF( k > nzb_u_inner(j,i) .AND. k <= nzb_u_outer(j,i) .AND. & … … 339 337 !-- Compute vertical diffusion. In case of simulating a Prandtl layer, 340 338 !-- index k starts at nzb_u_inner+2. 341 !$acc loop vector(32)342 339 DO k = 1, nzt_diff 343 340 IF ( k >= nzb_diff_u(j,i) ) THEN … … 375 372 IF ( use_surface_fluxes ) THEN 376 373 377 !$acc loop378 374 DO i = i_left, i_right 379 !$acc loop vector(32)380 375 DO j = j_south, j_north 381 376 … … 406 401 k = nzt 407 402 408 !$acc loop409 403 DO i = i_left, i_right 410 !$acc loop vector(32)411 404 DO j = j_south, j_north 412 405 -
palm/trunk/SOURCE/diffusion_v.f90
r1132 r1257 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! openacc loop and loop vector clauses removed, declare create moved after 23 ! the FORTRAN declaration statement 23 24 ! 24 25 ! Former revisions: … … 262 263 REAL :: kmxm, kmxp, kmzm, kmzp 263 264 265 REAL, DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr) :: vsus 264 266 !$acc declare create ( vsus ) 265 REAL, DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr) :: vsus266 267 267 268 ! … … 276 277 !$acc present ( ddzu, ddzw, fxm, fxp, wall_v ) & 277 278 !$acc present ( nzb_v_inner, nzb_v_outer, nzb_diff_v ) 278 !$acc loop279 279 DO i = i_left, i_right 280 280 DO j = j_south, j_north 281 281 ! 282 282 !-- Compute horizontal diffusion 283 !$acc loop vector(32)284 283 DO k = 1, nzt 285 284 IF ( k > nzb_v_outer(j,i) ) THEN … … 306 305 ! 307 306 !-- Wall functions at the left and right walls, respectively 308 !$acc loop vector(32)309 307 DO k = 1, nzt 310 308 IF( k > nzb_v_inner(j,i) .AND. k <= nzb_v_outer(j,i) .AND. & … … 337 335 !-- Compute vertical diffusion. In case of simulating a Prandtl 338 336 !-- layer, index k starts at nzb_v_inner+2. 339 !$acc loop vector(32)340 337 DO k = 1, nzt_diff 341 338 IF ( k >= nzb_diff_v(j,i) ) THEN … … 373 370 IF ( use_surface_fluxes ) THEN 374 371 375 !$acc loop376 372 DO i = i_left, i_right 377 !$acc loop vector(32)378 373 DO j = j_south, j_north 379 374 … … 404 399 k = nzt 405 400 406 !$acc loop407 401 DO i = i_left, i_right 408 !$acc loop vector(32)409 402 DO j = j_south, j_north 410 403 -
palm/trunk/SOURCE/diffusion_w.f90
r1132 r1257 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! openacc loop and loop vector clauses removed, declare create moved after 23 ! the FORTRAN declaration statement 23 24 ! 24 25 ! Former revisions: … … 214 215 REAL :: kmxm, kmxp, kmym, kmyp 215 216 217 REAL, DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr) :: wsus, wsvs 216 218 !$acc declare create ( wsus, wsvs ) 217 REAL, DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr) :: wsus, wsvs218 219 219 220 220 ! … … 231 231 !$acc present ( ddzu, ddzw, fwxm, fwxp, fwym, fwyp, wall_w_x, wall_w_y ) & 232 232 !$acc present ( nzb_w_inner, nzb_w_outer ) 233 !$acc loop234 233 DO i = i_left, i_right 235 234 DO j = j_south, j_north 236 !$acc loop vector( 32 )237 235 DO k = 1, nzt 238 236 IF ( k > nzb_w_outer(j,i) ) THEN … … 268 266 ! 269 267 !-- Wall functions at all vertical walls, where necessary 270 !$acc loop vector( 32 )271 268 DO k = 1,nzt 272 269 -
palm/trunk/SOURCE/exchange_horiz.f90
r1132 r1257 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! openacc loop and loop vector clauses removed 23 23 ! 24 24 ! Former revisions: … … 245 245 DO i = 0, nbgp_local-1 246 246 DO j = nys-nbgp_local, nyn+nbgp_local 247 !$acc loop vector( 32 )248 247 DO k = nzb, nzt+1 249 248 ar(k,j,nxl-nbgp_local+i) = ar(k,j,nxr-nbgp_local+1+i) … … 262 261 IF ( on_device ) THEN 263 262 !$acc kernels present( ar ) 264 !$acc loop265 263 DO i = nxl-nbgp_local, nxr+nbgp_local 266 264 !$acc loop independent 267 265 DO j = 0, nbgp_local-1 268 !$acc loop vector( 32 )266 !$acc loop independent 269 267 DO k = nzb, nzt+1 270 268 ar(k,nys-nbgp_local+j,i) = ar(k,nyn-nbgp_local+1+j,i) -
palm/trunk/SOURCE/fft_xy.f90
r1220 r1257 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! openacc loop and loop vector clauses removed, declare create moved after 23 ! the FORTRAN declaration statement 23 24 ! 24 25 ! Former revisions: … … 328 329 REAL, DIMENSION(6*(nx+1)) :: work2 329 330 #elif defined( __cuda_fft ) 331 COMPLEX(dpk), DIMENSION(0:(nx+1)/2,nys_x:nyn_x,nzb_x:nzt_x) :: ar_tmp 330 332 !$acc declare create( ar_tmp ) 331 COMPLEX(dpk), DIMENSION(0:(nx+1)/2,nys_x:nyn_x,nzb_x:nzt_x) :: ar_tmp332 333 #endif 333 334 REAL, DIMENSION(0:nx,nys_x:nyn_x), OPTIONAL :: ar_2d … … 634 635 635 636 !$acc kernels 636 !$acc loop637 637 DO k = nzb_x, nzt_x 638 638 DO j = nys_x, nyn_x 639 639 640 !$acc loop vector( 32 )641 640 DO i = 0, (nx+1)/2 642 641 ar(i,j,k) = REAL( ar_tmp(i,j,k) ) * dnx 643 642 ENDDO 644 643 645 !$acc loop vector( 32 )646 644 DO i = 1, (nx+1)/2 - 1 647 645 ar(nx+1-i,j,k) = AIMAG( ar_tmp(i,j,k) ) * dnx … … 657 655 !$acc data present( ar ) 658 656 !$acc kernels 659 !$acc loop660 657 DO k = nzb_x, nzt_x 661 658 DO j = nys_x, nyn_x … … 663 660 ar_tmp(0,j,k) = CMPLX( ar(0,j,k), 0.0 ) 664 661 665 !$acc loop vector( 32 )666 662 DO i = 1, (nx+1)/2 - 1 667 663 ar_tmp(i,j,k) = CMPLX( ar(i,j,k), ar(nx+1-i,j,k) ) … … 957 953 REAL, DIMENSION(6*(ny+1)) :: work2 958 954 #elif defined( __cuda_fft ) 955 COMPLEX(dpk), DIMENSION(0:(ny+1)/2,nxl_y:nxr_y,nzb_y:nzt_y) :: ar_tmp 959 956 !$acc declare create( ar_tmp ) 960 COMPLEX(dpk), DIMENSION(0:(ny+1)/2,nxl_y:nxr_y,nzb_y:nzt_y) :: ar_tmp961 957 #endif 962 958 REAL, DIMENSION(0:ny,nxl_y_l:nxr_y_l,nzb_y:nzt_y) :: ar … … 1236 1232 1237 1233 !$acc kernels 1238 !$acc loop1239 1234 DO k = nzb_y, nzt_y 1240 1235 DO i = nxl_y, nxr_y 1241 1236 1242 !$acc loop vector( 32 )1243 1237 DO j = 0, (ny+1)/2 1244 1238 ar(j,i,k) = REAL( ar_tmp(j,i,k) ) * dny 1245 1239 ENDDO 1246 1240 1247 !$acc loop vector( 32 )1248 1241 DO j = 1, (ny+1)/2 - 1 1249 1242 ar(ny+1-j,i,k) = AIMAG( ar_tmp(j,i,k) ) * dny … … 1259 1252 !$acc data present( ar ) 1260 1253 !$acc kernels 1261 !$acc loop1262 1254 DO k = nzb_y, nzt_y 1263 1255 DO i = nxl_y, nxr_y … … 1265 1257 ar_tmp(0,i,k) = CMPLX( ar(0,i,k), 0.0 ) 1266 1258 1267 !$acc loop vector( 32 )1268 1259 DO j = 1, (ny+1)/2 - 1 1269 1260 ar_tmp(j,i,k) = CMPLX( ar(j,i,k), ar(ny+1-j,i,k) ) -
palm/trunk/SOURCE/flow_statistics.f90
r1242 r1257 21 21 ! Current revisions: 22 22 ! ----------------- 23 ! 23 ! openacc "end parallel" replaced by "end parallel loop" 24 24 ! 25 25 ! Former revisions: … … 1468 1468 sums_l(k,4,tn) = s3 1469 1469 ENDDO 1470 !$acc end parallel 1470 !$acc end parallel loop 1471 1471 1472 1472 ! … … 1484 1484 sums_l(k,23,tn) = s1 1485 1485 ENDDO 1486 !$acc end parallel 1486 !$acc end parallel loop 1487 1487 ENDIF 1488 1488 … … 1506 1506 sums_l(k,44,tn) = s2 1507 1507 ENDDO 1508 !$acc end parallel 1508 !$acc end parallel loop 1509 1509 1510 1510 IF ( cloud_physics ) THEN … … 1524 1524 sums_l(k,43,tn) = s2 1525 1525 ENDDO 1526 !$acc end parallel 1526 !$acc end parallel loop 1527 1527 ENDIF 1528 1528 ENDIF … … 1542 1542 sums_l(k,41,tn) = s1 1543 1543 ENDDO 1544 !$acc end parallel 1544 !$acc end parallel loop 1545 1545 ENDIF 1546 1546 !$OMP END PARALLEL … … 1747 1747 sums_l(k,38,tn) = s7 1748 1748 ENDDO 1749 !$acc end parallel 1749 !$acc end parallel loop 1750 1750 1751 1751 IF ( humidity ) THEN … … 1762 1762 sums_l(k,70,tn) = s1 1763 1763 ENDDO 1764 !$acc end parallel 1764 !$acc end parallel loop 1765 1765 ENDIF 1766 1766 … … 1778 1778 ENDDO 1779 1779 ENDDO 1780 !$acc end parallel 1780 !$acc end parallel loop 1781 1781 !$acc parallel present( sums_l ) 1782 1782 sums_l(nzb+4,pr_palm,tn) = s1 … … 1843 1843 sums_l(k,34,tn) = s4 1844 1844 ENDDO 1845 !$acc end parallel 1845 !$acc end parallel loop 1846 1846 ! 1847 1847 !-- Total perturbation TKE … … 1908 1908 sums_l(k,16,tn) = s3 1909 1909 ENDDO 1910 !$acc end parallel 1910 !$acc end parallel loop 1911 1911 1912 1912 ! … … 1925 1925 sums_l(k,65,tn) = s1 1926 1926 ENDDO 1927 !$acc end parallel 1927 !$acc end parallel loop 1928 1928 ENDIF 1929 1929 … … 1948 1948 sums_l(k,48,tn) = s2 1949 1949 ENDDO 1950 !$acc end parallel 1950 !$acc end parallel loop 1951 1951 1952 1952 IF ( cloud_physics ) THEN … … 1965 1965 sums_l(k,51,tn) = s1 1966 1966 ENDDO 1967 !$acc end parallel 1967 !$acc end parallel loop 1968 1968 1969 1969 ENDIF … … 1986 1986 sums_l(k,48,tn) = s1 1987 1987 ENDDO 1988 !$acc end parallel 1988 !$acc end parallel loop 1989 1989 1990 1990 ENDIF … … 2232 2232 sums_l(k,37,tn) = s3 2233 2233 ENDDO 2234 !$acc end parallel 2234 !$acc end parallel loop 2235 2235 2236 2236 ! … … 2253 2253 sums_l(k,66,tn) = s1 2254 2254 ENDDO 2255 !$acc end parallel 2255 !$acc end parallel loop 2256 2256 2257 2257 ENDIF … … 2269 2269 sums_l(k,71,tn) = s2 2270 2270 ENDDO 2271 !$acc end parallel 2271 !$acc end parallel loop 2272 2272 2273 2273 ENDIF … … 2292 2292 sums_l(k,46,tn) = s1 2293 2293 ENDDO 2294 !$acc end parallel 2294 !$acc end parallel loop 2295 2295 2296 2296 IF ( .NOT. cloud_droplets ) THEN … … 2308 2308 sums_l(k,52,tn) = s1 2309 2309 ENDDO 2310 !$acc end parallel 2310 !$acc end parallel loop 2311 2311 2312 2312 IF ( icloud_scheme == 0 ) THEN … … 2324 2324 sums_l(k,75,tn) = s2 2325 2325 ENDDO 2326 !$acc end parallel 2326 !$acc end parallel loop 2327 2327 2328 2328 IF ( precipitation ) THEN … … 2342 2342 sums_l(k,76,tn) = s3 2343 2343 ENDDO 2344 !$acc end parallel 2344 !$acc end parallel loop 2345 2345 2346 2346 ENDIF … … 2358 2358 sums_l(k,54,tn) = s1 2359 2359 ENDDO 2360 !$acc end parallel 2360 !$acc end parallel loop 2361 2361 2362 2362 ENDIF … … 2374 2374 sums_l(k,54,tn) = s1 2375 2375 ENDDO 2376 !$acc end parallel 2376 !$acc end parallel loop 2377 2377 2378 2378 ENDIF … … 2394 2394 sums_l(k,46,tn) = s1 2395 2395 ENDDO 2396 !$acc end parallel 2396 !$acc end parallel loop 2397 2397 2398 2398 ELSEIF ( ws_scheme_sca .AND. sr == 0 ) THEN … … 2403 2403 0.61 * hom(k,1,4,sr) * sums_l(k,49,tn) 2404 2404 ENDDO 2405 !$acc end parallel 2405 !$acc end parallel loop 2406 2406 2407 2407 ENDIF … … 2426 2426 sums_l(k,49,tn) = s1 2427 2427 ENDDO 2428 !$acc end parallel 2428 !$acc end parallel loop 2429 2429 2430 2430 ENDIF … … 2459 2459 sums_l(k,15,tn) = s1 2460 2460 ENDDO 2461 !$acc end parallel 2461 !$acc end parallel loop 2462 2462 2463 2463 ENDIF … … 2480 2480 sums_l(k,17,tn) = s1 2481 2481 ENDDO 2482 !$acc end parallel 2482 !$acc end parallel loop 2483 2483 2484 2484 IF ( humidity ) THEN … … 2496 2496 sums_l(k,49,tn) = s1 2497 2497 ENDDO 2498 !$acc end parallel 2498 !$acc end parallel loop 2499 2499 2500 2500 ENDIF -
palm/trunk/SOURCE/modules.f90
r1242 r1257 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! 22 ! set default values for grid indices of maximum velocity components u|v|w_max_ijk 23 23 ! 24 24 ! Former revisions: … … 1679 1679 CHARACTER (LEN=40) :: region(0:9) 1680 1680 INTEGER :: pr_palm = 90, statistic_regions = 0 1681 INTEGER :: u_max_ijk(3) , v_max_ijk(3), w_max_ijk(3)1681 INTEGER :: u_max_ijk(3) = -1, v_max_ijk(3) = -1, w_max_ijk(3) = -1 1682 1682 LOGICAL :: flow_statistics_called = .FALSE. 1683 1683 REAL :: u_max, v_max, w_max -
palm/trunk/SOURCE/prandtl_fluxes.f90
r1037 r1257 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! openACC "kernels do" replaced by "kernels loop", "loop independent" added 23 23 ! 24 24 ! Former revisions: … … 101 101 !-- for u* use the value from the previous time step 102 102 !$OMP PARALLEL DO 103 !$acc kernels do103 !$acc kernels loop 104 104 DO i = nxlg, nxrg 105 105 DO j = nysg, nyng … … 118 118 !-- (the Richardson number is still the one from the previous time step) 119 119 !$OMP PARALLEL DO PRIVATE( a, b, k, z_p ) 120 !$acc kernels do120 !$acc kernels loop 121 121 DO i = nxlg, nxrg 122 122 DO j = nysg, nyng … … 151 151 IF ( .NOT. humidity ) THEN 152 152 !$OMP PARALLEL DO PRIVATE( k, z_p ) 153 !$acc kernels do153 !$acc kernels loop 154 154 DO i = nxlg, nxrg 155 155 DO j = nysg, nyng … … 170 170 ELSE 171 171 !$OMP PARALLEL DO PRIVATE( k, z_p ) 172 !$acc kernels do172 !$acc kernels loop 173 173 DO i = nxlg, nxrg 174 174 DO j = nysg, nyng … … 193 193 !-- Compute u* at the scalars' grid points 194 194 !$OMP PARALLEL DO PRIVATE( a, b, k, uv_total, z_p ) 195 !$acc kernels do195 !$acc kernels loop 196 196 DO i = nxl, nxr 197 197 DO j = nys, nyn … … 243 243 !-- First compute the corresponding component of u* and square it. 244 244 !$OMP PARALLEL DO PRIVATE( a, b, k, rifm, z_p ) 245 !$acc kernels do245 !$acc kernels loop 246 246 DO i = nxl, nxr 247 247 DO j = nys, nyn … … 281 281 !-- First compute the corresponding component of u* and square it. 282 282 !$OMP PARALLEL DO PRIVATE( a, b, k, rifm, z_p ) 283 !$acc kernels do283 !$acc kernels loop 284 284 DO i = nxl, nxr 285 285 DO j = nys, nyn … … 322 322 !-- For a given water flux in the Prandtl layer: 323 323 !$OMP PARALLEL DO 324 !$acc kernels do324 !$acc kernels loop 325 325 DO i = nxlg, nxrg 326 326 DO j = nysg, nyng … … 332 332 coupled_run = ( coupling_mode == 'atmosphere_to_ocean' .AND. run_coupled ) 333 333 !$OMP PARALLEL DO PRIVATE( a, b, k, z_p ) 334 !$acc kernels do334 !$acc kernels loop independent 335 335 DO i = nxlg, nxrg 336 !$acc loop independent 336 337 DO j = nysg, nyng 337 338 … … 387 388 IF ( .NOT. constant_heatflux ) THEN 388 389 !$OMP PARALLEL DO 389 !$acc kernels do 390 DO i = nxlg, nxrg 390 !$acc kernels loop independent 391 DO i = nxlg, nxrg 392 !$acc loop independent 391 393 DO j = nysg, nyng 392 394 shf(j,i) = -ts(j,i) * us(j,i) … … 399 401 IF ( .NOT. constant_waterflux .AND. ( humidity .OR. passive_scalar ) ) THEN 400 402 !$OMP PARALLEL DO 401 !$acc kernels do 402 DO i = nxlg, nxrg 403 !$acc kernels loop independent 404 DO i = nxlg, nxrg 405 !$acc loop independent 403 406 DO j = nysg, nyng 404 407 qsws(j,i) = -qs(j,i) * us(j,i) … … 411 414 IF ( ibc_e_b == 2 ) THEN 412 415 !$OMP PARALLEL DO 413 !$acc kernels do 414 DO i = nxlg, nxrg 416 !$acc kernels loop independent 417 DO i = nxlg, nxrg 418 !$acc loop independent 415 419 DO j = nysg, nyng 416 420 e(nzb_s_inner(j,i)+1,j,i) = ( us(j,i) / 0.1 )**2 -
palm/trunk/SOURCE/pres.f90
r1222 r1257 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! 22 ! openacc loop and loop vector clauses removed, independent clauses added, 23 ! end parallel replaced by end parallel loop 23 24 ! 24 25 ! Former revisions: … … 321 322 !$OMP PARALLEL DO SCHEDULE( STATIC ) 322 323 !$acc kernels present( d ) 323 !$acc loop324 324 DO i = nxl, nxr 325 325 DO j = nys, nyn 326 !$acc loop vector(32)327 326 DO k = nzb+1, nzt 328 327 d(k,j,i) = 0.0 … … 391 390 ENDDO 392 391 ENDDO 393 !$acc end parallel 392 !$acc end parallel loop 394 393 localsum = localsum + threadsum * dt_3d * & 395 394 weight_pres(intermediate_timestep_count) … … 421 420 !$OMP PARALLEL DO 422 421 !$acc kernels present( d, tend ) 423 !$acc loop424 422 DO i = nxl, nxr 425 423 DO j = nys, nyn 426 !$acc loop vector( 32 )427 424 DO k = nzb+1, nzt 428 425 tend(k,j,i) = d(k,j,i) … … 558 555 !$OMP DO 559 556 !$acc kernels present( p, tend, weight_substep ) 560 !$acc loop 557 !$acc loop independent 561 558 DO i = nxl-1, nxr+1 559 !$acc loop independent 562 560 DO j = nys-1, nyn+1 563 !$acc loop vector( 32 )561 !$acc loop independent 564 562 DO k = nzb, nzt+1 565 563 p(k,j,i) = tend(k,j,i) * & … … 575 573 !$OMP DO 576 574 !$acc kernels present( p, tend, weight_substep ) 577 !$acc loop 575 !$acc loop independent 578 576 DO i = nxl-1, nxr+1 577 !$acc loop independent 579 578 DO j = nys-1, nyn+1 580 !$acc loop vector( 32 )579 !$acc loop independent 581 580 DO k = nzb, nzt+1 582 581 p(k,j,i) = p(k,j,i) + tend(k,j,i) * & … … 605 604 !$OMP DO 606 605 !$acc kernels present( ddzu, nzb_u_inner, nzb_v_inner, nzb_w_inner, tend, u, v, w, weight_pres ) 607 !$acc loop 606 !$acc loop independent 608 607 DO i = nxl, nxr 609 DO j = nys, nyn 610 !$acc loop vector( 32 ) 608 !$acc loop independent 609 DO j = nys, nyn 610 !$acc loop independent 611 611 DO k = 1, nzt 612 612 IF ( k > nzb_w_inner(j,i) ) THEN … … 616 616 ENDIF 617 617 ENDDO 618 !$acc loop vector( 32 )618 !$acc loop independent 619 619 DO k = 1, nzt 620 620 IF ( k > nzb_u_inner(j,i) ) THEN … … 624 624 ENDIF 625 625 ENDDO 626 !$acc loop vector( 32 )626 !$acc loop independent 627 627 DO k = 1, nzt 628 628 IF ( k > nzb_v_inner(j,i) ) THEN … … 773 773 ENDDO 774 774 ENDDO 775 !$acc end parallel 775 !$acc end parallel loop 776 776 #endif 777 777 -
palm/trunk/SOURCE/production_e.f90
r1182 r1257 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! openacc loop and loop vector clauses removed, declare create moved after 23 ! the FORTRAN declaration statement 23 24 ! 24 25 ! Former revisions: … … 726 727 k1, k2, km_neutral, theta, temp 727 728 729 REAL, DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr) :: usvs, vsus, wsus, wsvs 728 730 !$acc declare create ( usvs, vsus, wsus, wsvs ) 729 REAL, DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr) :: usvs, vsus, wsus, wsvs730 ! REAL, DIMENSION(nzb:nzt+1) :: usvs, vsus, wsus, wsvs731 731 732 732 ! … … 749 749 !$acc present( shf, tend, tswst, u, v, vpt, w, wall_e_x, wall_e_y ) & 750 750 !$acc copyin( u_0, v_0 ) 751 !$acc loop752 751 DO i = i_left, i_right 753 752 DO j = j_south, j_north 754 !$acc loop vector( 32 )755 753 DO k = 1, nzt 756 754 … … 795 793 !-- (2) - Will allways be executed. 796 794 !-- 'bottom and wall: use u_0,v_0 and wall functions' 797 !$acc loop798 795 DO i = i_left, i_right 799 796 DO j = j_south, j_north 800 !$acc loop vector( 32 )801 797 DO k = 1, nzt 802 798 … … 1007 1003 !-- (1) - will allways be executed. 1008 1004 !-- 'bottom only: use u_0,v_0' 1009 !$acc loop1010 1005 DO i = i_left, i_right 1011 1006 DO j = j_south, j_north 1012 !$acc loop vector( 32 )1013 1007 DO k = 1, nzt 1014 1008 … … 1054 1048 ELSEIF ( use_surface_fluxes ) THEN 1055 1049 1056 !$acc loop1057 1050 DO i = i_left, i_right 1058 1051 DO j = j_south, j_north 1059 !$acc loop vector(32) 1060 DO k = 1, nzt 1052 DO k = 1, nzt 1061 1053 1062 1054 IF ( k == nzb_diff_s_outer(j,i)-1 ) THEN … … 1108 1100 !-- So far in the ocean no special treatment of density flux 1109 1101 !-- in the bottom and top surface layer 1110 !$acc loop1111 1102 DO i = i_left, i_right 1112 1103 DO j = j_south, j_north 1113 !$acc loop vector( 32 )1114 1104 DO k = 1, nzt 1115 1105 IF ( k > nzb_s_inner(j,i) ) THEN … … 1125 1115 ELSE 1126 1116 1127 !$acc loop1128 1117 DO i = i_left, i_right 1129 1118 DO j = j_south, j_north 1130 !$acc loop vector( 32 )1131 1119 DO k = 1, nzt_diff 1132 1120 IF ( k >= nzb_diff_s_inner(j,i) ) THEN … … 1159 1147 !-- So far in the ocean no special treatment of density flux 1160 1148 !-- in the bottom and top surface layer 1161 !$acc loop1162 1149 DO i = i_left, i_right 1163 1150 DO j = j_south, j_north 1164 !$acc loop vector( 32 )1165 1151 DO k = 1, nzt 1166 1152 IF ( k > nzb_s_inner(j,i) ) THEN … … 1176 1162 ELSE 1177 1163 1178 !$acc loop1179 1164 DO i = i_left, i_right 1180 1165 DO j = j_south, j_north 1181 !$acc loop vector( 32 )1182 1166 DO k = 1, nzt_diff 1183 1167 IF( k >= nzb_diff_s_inner(j,i) ) THEN … … 1214 1198 ! DO i = nxl, nxr 1215 1199 ! DO j = nys, nyn 1216 ! !acc loop vector ( 32 )1200 ! !acc loop vector 1217 1201 ! DO k = 1, nzt_diff 1218 1202 ! … … 1271 1255 ! DO i = nxl, nxr 1272 1256 ! DO j = nys, nyn 1273 ! !acc loop vector ( 32 )1257 ! !acc loop vector 1274 1258 ! DO k = 1, nzt_diff 1275 1259 ! … … 1313 1297 ! DO i = nxl, nxr 1314 1298 ! DO j = nys, nyn 1315 ! !acc loop vector ( 32 )1299 ! !acc loop vector 1316 1300 ! DO k = 1, nzt 1317 1301 ! IF ( k == nzt ) THEN -
palm/trunk/SOURCE/prognostic_equations.f90
r1247 r1257 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! 22 ! openacc loop vector clauses removed, independent clauses added 23 23 ! 24 24 ! Former revisions: … … 1536 1536 !-- Prognostic equation for u-velocity component 1537 1537 !$acc kernels present( nzb_u_inner, rdf, tend, tu_m, u, ug, u_p ) 1538 !$acc loop 1538 !$acc loop independent 1539 1539 DO i = i_left, i_right 1540 !$acc loop independent 1540 1541 DO j = j_south, j_north 1541 !$acc loop vector( 32 )1542 !$acc loop independent 1542 1543 DO k = 1, nzt 1543 1544 IF ( k > nzb_u_inner(j,i) ) THEN … … 1602 1603 !-- Prognostic equation for v-velocity component 1603 1604 !$acc kernels present( nzb_v_inner, rdf, tend, tv_m, v, vg, v_p ) 1604 !$acc loop 1605 !$acc loop independent 1605 1606 DO i = i_left, i_right 1607 !$acc loop independent 1606 1608 DO j = j_south, j_north 1607 !$acc loop vector( 32 )1609 !$acc loop independent 1608 1610 DO k = 1, nzt 1609 1611 IF ( k > nzb_v_inner(j,i) ) THEN … … 1664 1666 !-- Prognostic equation for w-velocity component 1665 1667 !$acc kernels present( nzb_w_inner, rdf, tend, tw_m, w, w_p ) 1666 !$acc loop 1668 !$acc loop independent 1667 1669 DO i = i_left, i_right 1670 !$acc loop independent 1668 1671 DO j = j_south, j_north 1669 !$acc loop vector( 32 )1672 !$acc loop independent 1670 1673 DO k = 1, nzt-1 1671 1674 IF ( k > nzb_w_inner(j,i) ) THEN … … 1762 1765 !$acc kernels present( nzb_s_inner, rdf_sc, ptdf_x, ptdf_y, pt_init ) & 1763 1766 !$acc present( tend, tpt_m, pt, pt_p ) 1764 !$acc loop 1767 !$acc loop independent 1765 1768 DO i = i_left, i_right 1769 !$acc loop independent 1766 1770 DO j = j_south, j_north 1767 !$acc loop vector( 32 )1771 !$acc loop independent 1768 1772 DO k = 1, nzt 1769 1773 IF ( k > nzb_s_inner(j,i) ) THEN … … 2012 2016 !-- value is reduced by 90%. 2013 2017 !$acc kernels present( e, e_p, nzb_s_inner, tend, te_m ) 2014 !$acc loop 2018 !$acc loop independent 2015 2019 DO i = i_left, i_right 2020 !$acc loop independent 2016 2021 DO j = j_south, j_north 2017 !$acc loop vector( 32 )2022 !$acc loop independent 2018 2023 DO k = 1, nzt 2019 2024 IF ( k > nzb_s_inner(j,i) ) THEN -
palm/trunk/SOURCE/run_control.f90
r1037 r1257 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! output format for theta* changed to avoid output of ***** 23 23 ! 24 24 ! Former revisions: … … 126 126 &'------------------'// & 127 127 &'RUN ITER. HH:MM:SS.SS DT(E) UMAX VMAX WMAX U', & 128 &'* W* THETA* Z_I ENERG. DISTENERG DIVOLD DIV', &129 &' NEW UMAX(KJI) VMAX(KJI) WMAX(KJI) ADVECX ADVECY', &130 &' MGCYC'/&128 &'* W* THETA* Z_I ENERG. DISTENERG DIVOLD ', & 129 &' DIVNEW UMAX(KJI) VMAX(KJI) WMAX(KJI) ADVECX ADVEC', & 130 &'Y MGCYC'/ & 131 131 &'----------------------------------------------------------------', & 132 132 &'----------------------------------------------------------------', & 133 133 &'----------------------------------------------------------------', & 134 &'----- ')134 &'---------') 135 135 101 FORMAT (I3,1X,I6,1X,A8,F3.2,1X,F8.4,A1,1X,F8.4,A1,F8.4,A1,F8.4,2X,F5.3,2X, & 136 136 F4.2, & 137 2X, F6.3,2X,F6.0,1X,4(E10.3,1X),3(3(I4),1X),F8.3,1X,F8.3,5X,I3)137 2X,E10.3,2X,F6.0,1X,4(E10.3,1X),3(3(I4),1X),F8.3,1X,F8.3,5X,I3) 138 138 139 139 END SUBROUTINE run_control -
palm/trunk/SOURCE/time_integration.f90
r1242 r1257 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! 22 ! acc-update-host directive for timestep removed 23 23 ! 24 24 ! Former revisions: … … 223 223 !-- Determine size of next time step 224 224 IF ( simulated_time /= 0.0 ) THEN 225 !$acc update host( kh, km, u, v, w )226 225 CALL timestep 227 226 ENDIF -
palm/trunk/SOURCE/timestep.f90
r1093 r1257 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! 22 ! openacc porting 23 ! bugfix for calculation of advective timestep in case of vertically stretched 24 ! grids 23 25 ! 24 26 ! Former revisions: … … 93 95 IMPLICIT NONE 94 96 95 INTEGER :: i, j, k, u_max_cfl_ijk(3), v_max_cfl_ijk(3) 96 97 REAL :: div, dt_diff, dt_diff_l, dt_plant_canopy, dt_plant_canopy_l, & 98 dt_plant_canopy_u, dt_plant_canopy_v, dt_plant_canopy_w, & 99 dt_u, dt_v, dt_w, u_max_cfl, value, v_max_cfl 97 INTEGER :: i, j, k 98 99 REAL :: div, dt_diff, dt_diff_l, dt_plant_canopy, dt_plant_canopy_l, & 100 dt_plant_canopy_u, dt_plant_canopy_v, dt_plant_canopy_w, & 101 dt_u, dt_u_l, dt_v, dt_v_l, dt_w, dt_w_l, u_gtrans_l, u_max_l, & 102 u_min_l, value, v_gtrans_l, v_max_l, v_min_l, w_max_l, w_min_l 100 103 101 104 REAL, DIMENSION(2) :: uv_gtrans, uv_gtrans_l 105 REAL, DIMENSION(3) :: reduce, reduce_l 102 106 REAL, DIMENSION(nzb+1:nzt) :: dxyz2_min 103 107 … … 127 131 ! 128 132 !-- Averaging over the entire model domain. 129 uv_gtrans_l = 0.0 133 u_gtrans_l = 0.0 134 v_gtrans_l = 0.0 135 !$acc parallel present( u, v ) 130 136 DO i = nxl, nxr 131 137 DO j = nys, nyn 132 138 DO k = nzb+1, nzt 133 u v_gtrans_l(1) = uv_gtrans_l(1)+ u(k,j,i)134 uv_gtrans_l(2) = uv_gtrans_l(2)+ v(k,j,i)139 u_gtrans_l = u_gtrans_l + u(k,j,i) 140 v_gtrans_l = v_gtrans_l + v(k,j,i) 135 141 ENDDO 136 142 ENDDO 137 143 ENDDO 138 uv_gtrans_l = uv_gtrans_l / REAL( (nxr-nxl+1)*(nyn-nys+1)*(nzt-nzb) ) 144 !$acc end parallel 145 uv_gtrans_l(1) = u_gtrans_l / REAL( (nxr-nxl+1)*(nyn-nys+1)*(nzt-nzb) ) 146 uv_gtrans_l(2) = v_gtrans_l / REAL( (nxr-nxl+1)*(nyn-nys+1)*(nzt-nzb) ) 139 147 #if defined( __parallel ) 140 148 IF ( collective_wait ) CALL MPI_BARRIER( comm2d, ierr ) … … 151 159 152 160 ! 153 !-- Determine the maxima of the velocity components. 161 !-- Determine the maxima of the velocity components, including their 162 !-- grid index positions. 163 #if defined( __openacc ) 164 IF ( dt_fixed ) THEN ! otherwise do it further below for better cache usage 165 u_max_l = -999999.9 166 u_min_l = 999999.9 167 v_max_l = -999999.9 168 v_min_l = 999999.9 169 w_max_l = -999999.9 170 w_min_l = 999999.9 171 !$acc parallel present( u, v, w ) 172 DO i = nxl, nxr 173 DO j = nys, nyn 174 DO k = nzb+1, nzt 175 u_max_l = MAX( u_max_l, u(k,j,i) ) 176 u_min_l = MIN( u_min_l, u(k,j,i) ) 177 v_max_l = MAX( v_max_l, v(k,j,i) ) 178 v_min_l = MIN( v_min_l, v(k,j,i) ) 179 w_max_l = MAX( w_max_l, w(k,j,i) ) 180 w_min_l = MIN( w_min_l, w(k,j,i) ) 181 ENDDO 182 ENDDO 183 ENDDO 184 !$acc end parallel 185 #if defined( __parallel ) 186 reduce_l(1) = u_max_l 187 reduce_l(2) = v_max_l 188 reduce_l(3) = w_max_l 189 IF ( collective_wait ) CALL MPI_BARRIER( comm2d, ierr ) 190 CALL MPI_ALLREDUCE( reduce_l, reduce, 3, MPI_REAL, MPI_MAX, comm2d, ierr ) 191 u_max = reduce(1) 192 v_max = reduce(2) 193 w_max = reduce(3) 194 reduce_l(1) = u_min_l 195 reduce_l(2) = v_min_l 196 reduce_l(3) = w_min_l 197 IF ( collective_wait ) CALL MPI_BARRIER( comm2d, ierr ) 198 CALL MPI_ALLREDUCE( reduce_l, reduce, 3, MPI_REAL, MPI_MIN, comm2d, ierr ) 199 IF ( ABS( reduce(1) ) > u_max ) u_max = reduce(1) 200 IF ( ABS( reduce(2) ) > v_max ) v_max = reduce(2) 201 IF ( ABS( reduce(3) ) > w_max ) w_max = reduce(3) 202 #else 203 IF ( ABS( u_min_l ) > u_max_l ) THEN 204 u_max = u_min_l 205 ELSE 206 u_max = u_max_l 207 ENDIF 208 IF ( ABS( v_min_l ) > v_max_l ) THEN 209 v_max = v_min_l 210 ELSE 211 v_max = v_max_l 212 ENDIF 213 IF ( ABS( w_min_l ) > w_max_l ) THEN 214 w_max = w_min_l 215 ELSE 216 w_max = w_max_l 217 ENDIF 218 #endif 219 ENDIF 220 #else 154 221 CALL global_min_max( nzb, nzt+1, nysg, nyng, nxlg, nxrg, u, 'abs', 0.0, & 155 222 u_max, u_max_ijk ) … … 158 225 CALL global_min_max( nzb, nzt+1, nysg, nyng, nxlg, nxrg, w, 'abs', 0.0, & 159 226 w_max, w_max_ijk ) 160 161 ! 162 !-- In case of Galilei transformation, the horizontal velocity maxima have 163 !-- to be calculated from the transformed horizontal velocities 164 IF ( galilei_transformation ) THEN 165 CALL global_min_max( nzb, nzt+1, nysg, nyng, nxlg, nxrg, u, 'absoff', & 166 u_gtrans, u_max_cfl, u_max_cfl_ijk ) 167 CALL global_min_max( nzb, nzt+1, nysg, nyng, nxlg, nxrg, v, 'absoff', & 168 v_gtrans, v_max_cfl, v_max_cfl_ijk ) 169 ELSE 170 u_max_cfl = u_max 171 v_max_cfl = v_max 172 u_max_cfl_ijk = u_max_ijk 173 v_max_cfl_ijk = v_max_ijk 174 ENDIF 175 227 #endif 176 228 177 229 IF ( .NOT. dt_fixed ) THEN 230 #if defined( __openacc ) 178 231 ! 179 232 !-- Variable time step: 180 ! 181 !-- For each component, compute the maximum time step according to the 182 !-- CFL-criterion. 183 dt_u = dx / ( ABS( u_max_cfl ) + 1.0E-10 ) 184 dt_v = dy / ( ABS( v_max_cfl ) + 1.0E-10 ) 185 dt_w = dzu(MAX( 1, w_max_ijk(1) )) / ( ABS( w_max ) + 1.0E-10 ) 233 !-- Calculate the maximum time step according to the CFL-criterion, 234 !-- individually for each velocity component 235 dt_u_l = 999999.9 236 dt_v_l = 999999.9 237 dt_w_l = 999999.9 238 u_max_l = -999999.9 239 u_min_l = 999999.9 240 v_max_l = -999999.9 241 v_min_l = 999999.9 242 w_max_l = -999999.9 243 w_min_l = 999999.9 244 !$acc parallel loop collapse(3) present( u, v, w ) 245 DO i = nxl, nxr 246 DO j = nys, nyn 247 DO k = nzb+1, nzt 248 dt_u_l = MIN( dt_u_l, ( dx / ( ABS( u(k,j,i) - u_gtrans ) + 1.0E-10 ) ) ) 249 dt_v_l = MIN( dt_v_l, ( dy / ( ABS( v(k,j,i) - v_gtrans ) + 1.0E-10 ) ) ) 250 dt_w_l = MIN( dt_w_l, ( dzu(k) / ( ABS( w(k,j,i) ) + 1.0E-10 ) ) ) 251 u_max_l = MAX( u_max_l, u(k,j,i) ) 252 u_min_l = MIN( u_min_l, u(k,j,i) ) 253 v_max_l = MAX( v_max_l, v(k,j,i) ) 254 v_min_l = MIN( v_min_l, v(k,j,i) ) 255 w_max_l = MAX( w_max_l, w(k,j,i) ) 256 w_min_l = MIN( w_min_l, w(k,j,i) ) 257 ENDDO 258 ENDDO 259 ENDDO 260 !$acc end parallel 261 262 #if defined( __parallel ) 263 reduce_l(1) = dt_u_l 264 reduce_l(2) = dt_v_l 265 reduce_l(3) = dt_w_l 266 IF ( collective_wait ) CALL MPI_BARRIER( comm2d, ierr ) 267 CALL MPI_ALLREDUCE( reduce_l, reduce, 3, MPI_REAL, MPI_MIN, comm2d, ierr ) 268 dt_u = reduce(1) 269 dt_v = reduce(2) 270 dt_w = reduce(3) 271 272 reduce_l(1) = u_max_l 273 reduce_l(2) = v_max_l 274 reduce_l(3) = w_max_l 275 IF ( collective_wait ) CALL MPI_BARRIER( comm2d, ierr ) 276 CALL MPI_ALLREDUCE( reduce_l, reduce, 3, MPI_REAL, MPI_MAX, comm2d, ierr ) 277 u_max = reduce(1) 278 v_max = reduce(2) 279 w_max = reduce(3) 280 reduce_l(1) = u_min_l 281 reduce_l(2) = v_min_l 282 reduce_l(3) = w_min_l 283 IF ( collective_wait ) CALL MPI_BARRIER( comm2d, ierr ) 284 CALL MPI_ALLREDUCE( reduce_l, reduce, 3, MPI_REAL, MPI_MIN, comm2d, ierr ) 285 IF ( ABS( reduce(1) ) > u_max ) u_max = reduce(1) 286 IF ( ABS( reduce(2) ) > v_max ) v_max = reduce(2) 287 IF ( ABS( reduce(3) ) > w_max ) w_max = reduce(3) 288 #else 289 dt_u = dt_u_l 290 dt_v = dt_v_l 291 dt_w = dt_w_l 292 293 IF ( ABS( u_min_l ) > u_max_l ) THEN 294 u_max = u_min_l 295 ELSE 296 u_max = u_max_l 297 ENDIF 298 IF ( ABS( v_min_l ) > v_max_l ) THEN 299 v_max = v_min_l 300 ELSE 301 v_max = v_max_l 302 ENDIF 303 IF ( ABS( w_min_l ) > w_max_l ) THEN 304 w_max = w_min_l 305 ELSE 306 w_max = w_max_l 307 ENDIF 308 #endif 309 310 #else 311 ! 312 !-- Variable time step: 313 !-- Calculate the maximum time step according to the CFL-criterion, 314 !-- individually for each velocity component 315 dt_u_l = 999999.9 316 dt_v_l = 999999.9 317 dt_w_l = 999999.9 318 DO i = nxl, nxr 319 DO j = nys, nyn 320 DO k = nzb+1, nzt 321 dt_u_l = MIN( dt_u_l, ( dx / ( ABS( u(k,j,i) - u_gtrans ) + 1.0E-10 ) ) ) 322 dt_v_l = MIN( dt_v_l, ( dy / ( ABS( v(k,j,i) - v_gtrans ) + 1.0E-10 ) ) ) 323 dt_w_l = MIN( dt_w_l, ( dzu(k) / ( ABS( w(k,j,i) ) + 1.0E-10 ) ) ) 324 ENDDO 325 ENDDO 326 ENDDO 327 328 #if defined( __parallel ) 329 reduce_l(1) = dt_u_l 330 reduce_l(2) = dt_v_l 331 reduce_l(3) = dt_w_l 332 IF ( collective_wait ) CALL MPI_BARRIER( comm2d, ierr ) 333 CALL MPI_ALLREDUCE( reduce_l, reduce, 3, MPI_REAL, MPI_MIN, comm2d, ierr ) 334 dt_u = reduce(1) 335 dt_v = reduce(2) 336 dt_w = reduce(3) 337 #else 338 dt_u = dt_u_l 339 dt_v = dt_v_l 340 dt_w = dt_w_l 341 #endif 342 343 #endif 186 344 187 345 ! … … 199 357 !$OMP PARALLEL private(i,j,k,value) reduction(MIN: dt_diff_l) 200 358 !$OMP DO 359 !$acc parallel loop collapse(3) present( kh, km ) 201 360 DO i = nxl, nxr 202 361 DO j = nys, nyn 203 362 DO k = nzb+1, nzt 204 value = dxyz2_min(k) / ( MAX( kh(k,j,i), km(k,j,i) ) + 1E-20 ) 205 206 dt_diff_l = MIN( value, dt_diff_l ) 363 dt_diff_l = MIN( dt_diff_l, dxyz2_min(k) / & 364 ( MAX( kh(k,j,i), km(k,j,i) ) + 1E-20 ) ) 207 365 ENDDO 208 366 ENDDO 209 367 ENDDO 368 !$acc end parallel 210 369 !$OMP END PARALLEL 211 370 #if defined( __parallel ) … … 334 493 '&dt_diff = ', dt_diff, ' s', & 335 494 '&dt_plant_canopy = ', dt_plant_canopy, ' s', & 336 '&u_max _cfl = ', u_max_cfl, ' m/s k=', u_max_cfl_ijk(1),&495 '&u_max = ', u_max, ' m/s k=', u_max_ijk(1), & 337 496 ' j=', u_max_ijk(2), ' i=', u_max_ijk(3), & 338 '&v_max _cfl = ', v_max_cfl, ' m/s k=', v_max_cfl_ijk(1),&497 '&v_max = ', v_max, ' m/s k=', v_max_ijk(1), & 339 498 ' j=', v_max_ijk(2), ' i=', v_max_ijk(3), & 340 '&w_max = ', w_max, ' m/s k=', w_max_ijk(1),&499 '&w_max = ', w_max, ' m/s k=', w_max_ijk(1), & 341 500 ' j=', w_max_ijk(2), ' i=', w_max_ijk(3) 342 501 CALL message( 'timestep', 'PA0312', 0, 1, 0, 6, 0 ) -
palm/trunk/SOURCE/transpose.f90
r1217 r1257 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! openacc loop and loop vector clauses removed 23 23 ! 24 24 ! Former revisions: … … 97 97 !$OMP DO 98 98 !$acc kernels present( f_in, f_inv ) 99 !$acc loop100 99 DO i = 0, nx 101 100 DO k = nzb_x, nzt_x 102 !$acc loop vector( 32 )103 101 DO j = nys_x, nyn_x 104 102 f_inv(j,k,i) = f_in(i,j,k) … … 158 156 ys = 0 + l * ( nyn_x - nys_x + 1 ) 159 157 !$acc kernels present( f_out, work ) 160 !$acc loop161 158 DO i = nxl_y, nxr_y 162 159 DO k = nzb_y, nzt_y 163 !$acc loop vector( 32 )164 160 DO j = ys, ys + nyn_x - nys_x 165 161 f_out(j,i,k) = work(j-ys+1,k,i,l) … … 180 176 !$OMP DO 181 177 !$acc kernels present( f_inv, f_out ) 182 !$acc loop183 178 DO k = nzb_y, nzt_y 184 179 DO i = nxl_y, nxr_y 185 !$acc loop vector( 32 )186 180 DO j = 0, ny 187 181 f_out(j,i,k) = f_inv(j,k,i) … … 225 219 !$OMP DO 226 220 !$acc kernels present( f_inv, f_out ) 227 !$acc loop228 221 DO k = 1, nz 229 222 DO i = nxl, nxr 230 !$acc loop vector( 32 )231 223 DO j = nys, nyn 232 224 f_out(k,j,i) = f_inv(j,i,k) … … 279 271 xs = 0 + l * nnx 280 272 !$acc kernels present( f_in, work ) 281 !$acc loop282 273 DO k = nzb_x, nzt_x 283 274 DO i = xs, xs + nnx - 1 284 !$acc loop vector( 32 )285 275 DO j = nys_x, nyn_x 286 276 work(j,i-xs+1,k,l) = f_in(i,j,k) … … 311 301 !$OMP DO 312 302 !$acc kernels present( f_in, f_inv ) 313 !$acc loop314 303 DO i = nxl, nxr 315 304 DO j = nys, nyn 316 !$acc loop vector( 32 )317 305 DO k = 1, nz 318 306 f_inv(j,i,k) = f_in(i,j,k) … … 354 342 !$OMP DO 355 343 !$acc kernels present( f_inv, f_out ) 356 !$acc loop357 344 DO i = 0, nx 358 345 DO k = nzb_x, nzt_x 359 !$acc loop vector( 32 )360 346 DO j = nys_x, nyn_x 361 347 f_out(i,j,k) = f_inv(j,k,i) … … 405 391 ys = 0 + l * ( nyn_x - nys_x + 1 ) 406 392 !$acc kernels present( f_in, work ) 407 !$acc loop408 393 DO i = nxl_y, nxr_y 409 394 DO k = nzb_y, nzt_y 410 !$acc loop vector( 32 )411 395 DO j = ys, ys + nyn_x - nys_x 412 396 work(j-ys+1,k,i,l) = f_in(j,i,k) … … 437 421 !$OMP DO 438 422 !$acc kernels present( f_in, f_inv ) 439 !$acc loop440 423 DO i = nxl_y, nxr_y 441 424 DO k = nzb_y, nzt_y 442 !$acc loop vector( 32 )443 425 DO j = 0, ny 444 426 f_inv(j,k,i) = f_in(j,i,k) … … 548 530 !$OMP DO 549 531 !$acc kernels present( f_in, f_inv ) 550 !$acc loop551 532 DO j = 0, ny 552 533 DO k = nzb_y, nzt_y 553 !$acc loop vector( 32 )554 534 DO i = nxl_y, nxr_y 555 535 f_inv(i,k,j) = f_in(j,i,k) … … 596 576 !$OMP DO 597 577 !$acc kernels present( f_inv, f_out ) 598 !$acc loop599 578 DO j = 0, ny 600 579 DO k = nzb_y, nzt_y 601 !$acc loop vector( 32 )602 580 DO i = nxl_y, nxr_y 603 581 f_out(i,j,k) = f_inv(i,k,j) … … 629 607 zs = 1 + l * ( nzt_y - nzb_y + 1 ) 630 608 !$acc kernels present( f_out ) 631 !$acc loop632 609 DO j = nys_z, nyn_z 633 610 DO k = zs, zs + nzt_y - nzb_y 634 !$acc loop vector( 32 )635 611 DO i = nxl_z, nxr_z 636 612 f_out(i,j,k) = work(i,k-zs+1,j,l) … … 675 651 !$OMP DO 676 652 !$acc kernels present( f_in, f_inv ) 677 !$acc loop678 653 DO k = 1,nz 679 654 DO i = nxl, nxr 680 !$acc loop vector( 32 )681 655 DO j = nys, nyn 682 656 f_inv(j,i,k) = f_in(k,j,i) … … 723 697 !$OMP DO 724 698 !$acc kernels present( f_inv, f_out ) 725 !$acc loop726 699 DO k = 1, nz 727 700 DO i = nxl, nxr 728 !$acc loop vector( 32 )729 701 DO j = nys, nyn 730 702 f_out(i,j,k) = f_inv(j,i,k) … … 756 728 xs = 0 + l * nnx 757 729 !$acc kernels present( f_out ) 758 !$acc loop759 730 DO k = nzb_x, nzt_x 760 731 DO i = xs, xs + nnx - 1 761 !$acc loop vector( 32 )762 732 DO j = nys_x, nyn_x 763 733 f_out(i,j,k) = work(j,i-xs+1,k,l) … … 802 772 !$OMP DO 803 773 !$acc kernels present( f_inv, f_out ) 804 !$acc loop805 774 DO k = nzb_y, nzt_y 806 775 DO j = 0, ny 807 !$acc loop vector( 32 )808 776 DO i = nxl_y, nxr_y 809 777 f_out(j,i,k) = f_inv(i,k,j) … … 856 824 zs = 1 + l * ( nzt_y - nzb_y + 1 ) 857 825 !$acc kernels present( f_in, work ) 858 !$acc loop859 826 DO j = nys_z, nyn_z 860 827 DO k = zs, zs + nzt_y - nzb_y 861 !$acc loop vector( 32 )862 828 DO i = nxl_z, nxr_z 863 829 work(i,k-zs+1,j,l) = f_in(i,j,k) … … 887 853 !$OMP DO 888 854 !$acc kernels present( f_in, f_inv ) 889 !$acc loop890 855 DO k = nzb_y, nzt_y 891 856 DO j = 0, ny 892 !$acc loop vector( 32 )893 857 DO i = nxl_y, nxr_y 894 858 f_inv(i,k,j) = f_in(i,j,k) -
palm/trunk/SOURCE/tridia_solver.f90
r1222 r1257 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! 22 ! openacc loop and loop vector clauses removed, declare create moved after 23 ! the FORTRAN declaration statement 23 24 ! 24 25 ! Former revisions: … … 114 115 INTEGER :: i, j, k, nnxh, nnyh 115 116 117 REAL :: ll(nxl_z:nxr_z,nys_z:nyn_z) 116 118 !$acc declare create( ll ) 117 REAL :: ll(nxl_z:nxr_z,nys_z:nyn_z)118 119 119 120 … … 130 131 131 132 !$acc kernels present( tric ) 132 !$acc loop vector( 32 )133 133 DO j = nys_z, nyn_z 134 134 DO i = nxl_z, nxr_z … … 161 161 ENDDO 162 162 163 !$acc loop164 163 DO k = 0, nz-1 165 164 DO j = nys_z, nyn_z 166 !$acc loop vector( 32 )167 165 DO i = nxl_z, nxr_z 168 166 tric(i,j,k) = ddzuw(k,3) - ll(i,j) … … 174 172 IF ( ibc_p_b == 1 ) THEN 175 173 !$acc kernels present( tric ) 176 !$acc loop177 174 DO j = nys_z, nyn_z 178 175 DO i = nxl_z, nxr_z … … 184 181 IF ( ibc_p_t == 1 ) THEN 185 182 !$acc kernels present( tric ) 186 !$acc loop187 183 DO j = nys_z, nyn_z 188 184 DO i = nxl_z, nxr_z … … 211 207 REAL :: ar(nxl_z:nxr_z,nys_z:nyn_z,1:nz) 212 208 209 REAL, DIMENSION(nxl_z:nxr_z,nys_z:nyn_z,0:nz-1) :: ar1 213 210 !$acc declare create( ar1 ) 214 REAL, DIMENSION(nxl_z:nxr_z,nys_z:nyn_z,0:nz-1) :: ar1215 211 216 212 ! … … 218 214 DO k = 0, nz - 1 219 215 !$acc kernels present( ar, tri ) 220 !$acc loop221 216 DO j = nys_z, nyn_z 222 217 DO i = nxl_z, nxr_z … … 240 235 DO k = nz-1, 0, -1 241 236 !$acc kernels present( ar, tri ) 242 !$acc loop243 237 DO j = nys_z, nyn_z 244 238 DO i = nxl_z, nxr_z … … 265 259 ar(nxl_z,nys_z,k) = 0.0 266 260 ENDDO 261 !$acc end kernels loop 267 262 ENDIF 268 263 ENDIF -
palm/trunk/SOURCE/wall_fluxes.f90
r1154 r1257 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! openacc loop and loop vector clauses removed 23 23 ! 24 24 ! Former revisions: … … 270 270 !-- All subsequent variables are computed for the respective 271 271 !-- location where the respective flux is defined. 272 !$acc loop independent vector( 32 )272 !$acc loop independent 273 273 DO k = nzb_uvw_inner(j,i)+1, nzb_uvw_outer(j,i) 274 274 … … 676 676 !$acc kernels present( nzb_diff_s_inner, nzb_diff_s_outer, pt, rif_wall ) & 677 677 !$acc present( u, v, w, wall, wall_flux, z0 ) 678 !$acc loop679 678 DO i = i_left, i_right 680 679 DO j = j_south, j_north 681 !$acc loop vector(32)682 680 DO k = min_inner, max_outer 683 681 !
Note: See TracChangeset
for help on using the changeset viewer.