Changeset 724


Ignore:
Timestamp:
08/09/18 13:55:51 (6 years ago)
Author:
dubos
Message:

devel : updated generated kernels ; added missing SIMD directives

Location:
codes/icosagcm/devel/src/kernels_hex
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • codes/icosagcm/devel/src/kernels_hex/caldyn_wflux.k90

    r624 r724  
    22   !---------------------------- caldyn_wflux ---------------------------------- 
    33   DO l = llm-1,1,-1 
     4      !DIR$ SIMD 
    45      DO ij=ij_omp_begin,ij_omp_end 
    56         ! cumulate mass flux convergence from top to bottom 
     
    78      END DO 
    89   END DO 
     10   !DIR$ SIMD 
    911   DO ij=ij_omp_begin,ij_omp_end 
    1012      dmass_col(ij) = convm(ij,1) 
    1113   END DO 
    1214   DO l = 2,llm 
     15      !DIR$ SIMD 
    1316      DO ij=ij_omp_begin,ij_omp_end 
    1417         ! Compute vertical mass flux (l=1,llm+1 set to zero at init) 
  • codes/icosagcm/devel/src/kernels_hex/compute_NH_geopot.k90

    r657 r724  
    99   ! compute Phi_star 
    1010   DO l = 1,llm+1 
     11      !DIR$ SIMD 
    1112      DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    1213         Phi_star_il(ij,l) = Phi_il(ij,l) + tau*g2*(W_il(ij,l)/m_il(ij,l)-tau) 
     
    1920      CASE(thermo_theta) 
    2021         DO l = 1,llm 
     22            !DIR$ SIMD 
    2123            DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    2224               rho_ij = (g*m_ik(ij,l))/(Phi_il(ij,l+1)-Phi_il(ij,l)) 
     
    2931      CASE(thermo_entropy) 
    3032         DO l = 1,llm 
     33            !DIR$ SIMD 
    3134            DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    3235               rho_ij = (g*m_ik(ij,l))/(Phi_il(ij,l+1)-Phi_il(ij,l)) 
     
    4447      ! Solve -A(l-1)x(l-1) + B(l)x(l) - A(l)x(l+1) = R(l) using Thomas algorithm 
    4548      ! Compute residual R_il and B_il 
     49      !DIR$ SIMD 
    4650      DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    4751         ! bottom interface l=1 
     
    5256      END DO 
    5357      DO l = 2,llm 
     58         !DIR$ SIMD 
    5459         DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    5560            ! inner interfaces 
     
    6368         END DO 
    6469      END DO 
     70      !DIR$ SIMD 
    6571      DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    6672         ! top interface l=llm+1 
     
    7480      ! C(0)=0, C(l) = -A(l) / (B(l)+A(l-1)C(l-1)), 
    7581      ! D(0)=0, D(l) = (R(l)+A(l-1)D(l-1)) / (B(l)+A(l-1)C(l-1)) 
     82      !DIR$ SIMD 
    7683      DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    7784         X_ij = 1./B_il(ij,1) 
     
    8087      END DO 
    8188      DO l = 2,llm 
     89         !DIR$ SIMD 
    8290         DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    8391            X_ij = 1./( B_il(ij,l) + A_ik(ij,l-1)*C_ik(ij,l-1) ) 
     
    8694         END DO 
    8795      END DO 
     96      !DIR$ SIMD 
    8897      DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    8998         X_ij = 1./( B_il(ij,llm+1) + A_ik(ij,llm+1 -1)*C_ik(ij,llm+1 -1) ) 
     
    97106      END DO 
    98107      DO l = llm,1,-1 
     108         !DIR$ SIMD 
    99109         DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    100110            ! Back substitution at lower interfaces 
  • codes/icosagcm/devel/src/kernels_hex/compute_geopot.k90

    r563 r724  
    44   CASE(thermo_boussinesq) 
    55      ! use hydrostatic balance with theta*rhodz to find pk (=Lagrange multiplier=pressure) 
     6      !DIR$ SIMD 
    67      DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    78         pk(ij,llm) = ptop + .5*g* theta(ij,llm,1)*rhodz(ij,llm) 
    89      END DO 
    910      DO l = llm-1,1,-1 
     11         !DIR$ SIMD 
    1012         DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    1113            pk(ij,l) = pk(ij,l+1) + (.5*g)*( theta(ij,l,1)*rhodz(ij,l) + theta(ij,l+1,1)*rhodz(ij,l+1) ) 
     
    1315      END DO 
    1416      IF(caldyn_eta == eta_lag) THEN 
     17         !DIR$ SIMD 
    1518         DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    1619            ps(ij) = pk(ij,1) + .5*g* theta(ij,1,1)*rhodz(ij,1) 
     
    2023      ! specific volume 1 = dphi/g/rhodz 
    2124      DO l = 1,llm 
     25         !DIR$ SIMD 
    2226         DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    2327            geopot(ij,l+1) = geopot(ij,l) + g*rhodz(ij,l) 
     
    2529      END DO 
    2630   CASE(thermo_theta) 
     31      !DIR$ SIMD 
    2732      DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    2833         pk(ij,llm) = ptop + .5*g* rhodz(ij,llm) 
    2934      END DO 
    3035      DO l = llm-1,1,-1 
     36         !DIR$ SIMD 
    3137         DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    3238            pk(ij,l) = pk(ij,l+1) + (.5*g)*( rhodz(ij,l) + rhodz(ij,l+1) ) 
     
    3440      END DO 
    3541      IF(caldyn_eta == eta_lag) THEN 
     42         !DIR$ SIMD 
    3643         DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    3744            ps(ij) = pk(ij,1) + .5*g* rhodz(ij,1) 
     
    3946      END IF 
    4047      DO l = 1,llm 
     48         !DIR$ SIMD 
    4149         DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    4250            p_ik = pk(ij,l) 
     
    4856      END DO 
    4957   CASE(thermo_entropy) 
     58      !DIR$ SIMD 
    5059      DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    5160         pk(ij,llm) = ptop + .5*g* rhodz(ij,llm) 
    5261      END DO 
    5362      DO l = llm-1,1,-1 
     63         !DIR$ SIMD 
    5464         DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    5565            pk(ij,l) = pk(ij,l+1) + (.5*g)*( rhodz(ij,l) + rhodz(ij,l+1) ) 
     
    5767      END DO 
    5868      IF(caldyn_eta == eta_lag) THEN 
     69         !DIR$ SIMD 
    5970         DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    6071            ps(ij) = pk(ij,1) + .5*g* rhodz(ij,1) 
     
    6273      END IF 
    6374      DO l = 1,llm 
     75         !DIR$ SIMD 
    6476         DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    6577            p_ik = pk(ij,l) 
     
    7183      END DO 
    7284   CASE(thermo_moist) 
     85      !DIR$ SIMD 
    7386      DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    7487         pk(ij,llm) = ptop + .5*g* rhodz(ij,llm)*(1.+theta(ij,llm,2)) 
    7588      END DO 
    7689      DO l = llm-1,1,-1 
     90         !DIR$ SIMD 
    7791         DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    7892            pk(ij,l) = pk(ij,l+1) + (.5*g)*( rhodz(ij,l)*(1.+theta(ij,l,2)) + rhodz(ij,l+1)*(1.+theta(ij,l+1,2)) ) 
     
    8094      END DO 
    8195      IF(caldyn_eta == eta_lag) THEN 
     96         !DIR$ SIMD 
    8297         DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    8398            ps(ij) = pk(ij,1) + .5*g* rhodz(ij,1)*(1.+theta(ij,1,2)) 
     
    85100      END IF 
    86101      DO l = 1,llm 
     102         !DIR$ SIMD 
    87103         DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    88104            p_ik = pk(ij,l) 
  • codes/icosagcm/devel/src/kernels_hex/energy_fluxes.k90

    r601 r724  
    33   ! First diagnose geopotential and temperature, column-wise 
    44   !$OMP BARRIER 
     5   !DIR$ SIMD 
    56   DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    67      pk(ij,llm) = ptop + .5*g*rhodz(ij,llm) 
    78   END DO 
    89   DO l = llm-1,1,-1 
     10      !DIR$ SIMD 
    911      DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    1012         pk(ij,l) = pk(ij,l+1) + (.5*g)*( rhodz(ij,l)+rhodz(ij,l+1) ) 
     
    1618   CASE(thermo_theta) 
    1719      DO l = 1,llm 
     20         !DIR$ SIMD 
    1821         DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    1922            p_ik = pk(ij,l) 
     
    2831   CASE(thermo_entropy) 
    2932      DO l = 1,llm 
     33         !DIR$ SIMD 
    3034         DO ij=ij_omp_begin_ext,ij_omp_end_ext 
    3135            p_ik = pk(ij,l) 
Note: See TracChangeset for help on using the changeset viewer.