Ignore:
Timestamp:
Apr 12, 2013 6:19:32 AM (11 years ago)
Author:
raasch
Message:

asynchronous transfer of ghost point data for acc-optimized version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/prognostic_equations.f90

    r1116 r1128  
    2020! Current revisions:
    2121! ------------------
    22 !
     22! those parts requiring global communication moved to time_integration,
     23! loop index bounds in accelerator version replaced by i_left, i_right, j_south,
     24! j_north
    2325!
    2426! Former revisions:
     
    223225    CALL cpu_log( log_point(32), 'all progn.equations', 'start' )
    224226
    225 
    226 !
    227 !-- Calculate those variables needed in the tendency terms which need
    228 !-- global communication
    229     IF ( .NOT. neutral )  CALL calc_mean_profile( pt, 4 )
    230     IF ( ocean         )  CALL calc_mean_profile( rho, 64 )
    231     IF ( humidity      )  CALL calc_mean_profile( vpt, 44 )
    232     IF ( .NOT. constant_diffusion )  CALL production_e_init
    233     IF ( ( ws_scheme_mom .OR. ws_scheme_sca )  .AND.  &
    234          intermediate_timestep_count == 1 )  CALL ws_statistics
    235227!
    236228!-- Loop over all prognostic equations
     
    724716             ENDIF
    725717
    726          ENDIF
     718          ENDIF
     719
    727720!
    728721!--       If required, compute prognostic equation for turbulent kinetic
     
    811804    REAL    ::  sbt
    812805
    813 !
    814 !-- Calculate those variables needed in the tendency terms which need
    815 !-- global communication
    816     IF ( .NOT. neutral )  CALL calc_mean_profile( pt, 4 )
    817     IF ( ocean         )  CALL calc_mean_profile( rho, 64 )
    818     IF ( humidity      )  CALL calc_mean_profile( vpt, 44 )
    819     IF ( ( ws_scheme_mom .OR. ws_scheme_sca )  .AND.  &
    820          intermediate_timestep_count == 1 )  CALL ws_statistics
    821806
    822807!
     
    13371322
    13381323       CALL cpu_log( log_point(16), 'tke-equation', 'start' )
    1339 
    1340 !
    1341 !--    TKE-tendency terms with communication
    1342        CALL production_e_init
    13431324
    13441325       sbt = tsc(2)
     
    14641445
    14651446!
    1466 !-- Calculate those variables needed in the tendency terms which need
    1467 !-- global communication
    1468     IF ( .NOT. neutral )  CALL calc_mean_profile( pt, 4 )
    1469     IF ( ocean         )  CALL calc_mean_profile( rho, 64 )
    1470     IF ( humidity      )  CALL calc_mean_profile( vpt, 44 )
    1471     IF ( ( ws_scheme_mom .OR. ws_scheme_sca )  .AND.  &
    1472          intermediate_timestep_count == 1 )  CALL ws_statistics
    1473 
    1474 !
    14751447!-- u-velocity component
    14761448!++ Statistics still not ported to accelerators
     
    15011473!-- External pressure gradient
    15021474    IF ( dp_external )  THEN
    1503        DO  i = nxlu, nxr
    1504           DO  j = nys, nyn
     1475       DO  i = i_left, i_right
     1476          DO  j = j_south, j_north
    15051477             DO  k = dp_level_ind_b+1, nzt
    15061478                tend(k,j,i) = tend(k,j,i) - dpdxy(1) * dp_smooth_factor(k)
     
    15161488    !$acc kernels present( nzb_u_inner, rdf, tend, tu_m, u, ug, u_p )
    15171489    !$acc loop
    1518     DO  i = nxlu, nxr
    1519        DO  j = nys, nyn
     1490    DO  i = i_left, i_right
     1491       DO  j = j_south, j_north
    15201492          !$acc loop vector( 32 )
    15211493          DO  k = 1, nzt
     
    15631535!-- External pressure gradient
    15641536    IF ( dp_external )  THEN
    1565        DO  i = nxl, nxr
    1566           DO  j = nysv, nyn
     1537       DO  i = i_left, i_right
     1538          DO  j = j_south, j_north
    15671539             DO  k = dp_level_ind_b+1, nzt
    15681540                tend(k,j,i) = tend(k,j,i) - dpdxy(2) * dp_smooth_factor(k)
     
    15781550    !$acc kernels present( nzb_v_inner, rdf, tend, tv_m, v, vg, v_p )
    15791551    !$acc loop
    1580     DO  i = nxl, nxr
    1581        DO  j = nysv, nyn
     1552    DO  i = i_left, i_right
     1553       DO  j = j_south, j_north
    15821554          !$acc loop vector( 32 )
    15831555          DO  k = 1, nzt
     
    16401612    !$acc kernels present( nzb_w_inner, rdf, tend, tw_m, w, w_p )
    16411613    !$acc loop
    1642     DO  i = nxl, nxr
    1643        DO  j = nys, nyn
     1614    DO  i = i_left, i_right
     1615       DO  j = j_south, j_north
    16441616          !$acc loop vector( 32 )
    16451617          DO  k = 1, nzt-1
     
    17341706       !$acc         present( tend, tpt_m, pt, pt_p )
    17351707       !$acc loop
    1736        DO  i = nxl, nxr
    1737           DO  j = nys, nyn
     1708       DO  i = i_left, i_right
     1709          DO  j = j_south, j_north
    17381710             !$acc loop vector( 32 )
    17391711             DO  k = 1, nzt
     
    18021774!
    18031775!--    Prognostic equation for salinity
    1804        DO  i = nxl, nxr
    1805           DO  j = nys, nyn
     1776       DO  i = i_left, i_right
     1777          DO  j = j_south, j_north
    18061778             DO  k = nzb_s_inner(j,i)+1, nzt
    18071779                sa_p(k,j,i) = sa(k,j,i) + dt_3d * ( sbt * tend(k,j,i) +        &
     
    18901862!
    18911863!--    Prognostic equation for total water content / scalar
    1892        DO  i = nxl, nxr
    1893           DO  j = nys, nyn
     1864       DO  i = i_left, i_right
     1865          DO  j = j_south, j_north
    18941866             DO  k = nzb_s_inner(j,i)+1, nzt
    18951867                q_p(k,j,i) = q(k,j,i) + dt_3d * ( sbt * tend(k,j,i) +          &
     
    19191891
    19201892       CALL cpu_log( log_point(16), 'tke-equation', 'start' )
    1921 
    1922 !
    1923 !--    TKE-tendency terms with communication
    1924        CALL production_e_init
    19251893
    19261894       sbt = tsc(2)
     
    19841952       !$acc kernels present( e, e_p, nzb_s_inner, tend, te_m )
    19851953       !$acc loop
    1986        DO  i = nxl, nxr
    1987           DO  j = nys, nyn
     1954       DO  i = i_left, i_right
     1955          DO  j = j_south, j_north
    19881956             !$acc loop vector( 32 )
    19891957             DO  k = 1, nzt
Note: See TracChangeset for help on using the changeset viewer.