Ignore:
Timestamp:
08/20/20 16:22:41 (4 years ago)
Author:
ymipsl
Message:

Introduce modification from A. Durocher github to make held&suarez testcase working on GPU

YM & AD

Location:
codes/icosagcm/trunk/src/diagnostics
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • codes/icosagcm/trunk/src/diagnostics/geopotential_mod.f90

    r899 r1046  
    2828       theta_rhodz = f_theta_rhodz(ind) 
    2929       theta = f_theta(ind) 
    30        CALL compute_theta_rhodz2theta(ps, theta_rhodz,theta,0) 
     30       CALL compute_theta_rhodz2theta(ps, theta_rhodz,theta,0, ondevice=.FALSE.) 
    3131       phis = f_phis(ind) 
    3232       phi = f_phi(ind) 
  • codes/icosagcm/trunk/src/diagnostics/theta_rhodz.f90

    r548 r1046  
    3939      theta_rhodz=f_theta_rhodz(ind) 
    4040      theta=f_theta(ind) 
    41       CALL compute_theta_rhodz2theta(ps, theta_rhodz,theta,0) 
     41      CALL compute_theta_rhodz2theta(ps, theta_rhodz,theta,0, ondevice=.false.) 
    4242    ENDDO 
    4343!$OMP BARRIER 
     
    132132      theta=f_theta(ind) 
    133133      theta_rhodz=f_theta_rhodz(ind) 
    134       CALL compute_theta2theta_rhodz(ps, theta, theta_rhodz,0) 
     134      CALL compute_theta2theta_rhodz(ps, theta, theta_rhodz,0,ondevice=.false.) 
    135135    ENDDO 
    136136!$OMP BARRIER 
     
    138138  END SUBROUTINE theta2theta_rhodz 
    139139   
    140   SUBROUTINE compute_theta2theta_rhodz(ps,theta, theta_rhodz,offset) 
     140  SUBROUTINE compute_theta2theta_rhodz(ps,theta, theta_rhodz,offset, ondevice) 
    141141  USE icosa 
    142142  USE disvert_mod 
     
    147147    REAL(rstd),INTENT(OUT) :: theta_rhodz(iim*jjm,llm) 
    148148    INTEGER,INTENT(IN) :: offset 
     149    LOGICAL, INTENT(IN) :: ondevice 
    149150    REAL(rstd) :: rhodz 
    150151    INTEGER :: i,j,ij,l 
    151152     
    152153!$OMP BARRIER 
     154    !$acc parallel loop collapse(3) default(present) async if(ondevice) 
    153155    DO    l    = ll_begin, ll_end 
    154156      DO j=jj_begin-offset,jj_end+offset 
     
    165167  END SUBROUTINE compute_theta2theta_rhodz 
    166168 
    167   SUBROUTINE compute_theta_rhodz2theta(ps,theta_rhodz,theta,offset) 
     169  SUBROUTINE compute_theta_rhodz2theta(ps,theta_rhodz,theta,offset,ondevice) 
    168170  USE icosa 
    169171  USE disvert_mod 
     
    174176    REAL(rstd),INTENT(OUT) :: theta(iim*jjm,llm) 
    175177    INTEGER,INTENT(IN) :: offset 
     178    LOGICAL, INTENT(IN) :: ondevice 
    176179    REAL(rstd) :: rhodz 
    177180    INTEGER :: i,j,ij,l 
    178181 
    179182!$OMP BARRIER 
     183    !$acc parallel loop collapse(3) default(present) async if(ondevice) 
    180184    DO    l    = ll_begin, ll_end 
    181185      DO j=jj_begin-offset,jj_end+offset 
Note: See TracChangeset for help on using the changeset viewer.