Skip to content

Commit

Permalink
Fixing openmp compile
Browse files Browse the repository at this point in the history
- Simple tests produce with threads
  • Loading branch information
nikizadehgfdl committed Sep 30, 2019
1 parent 9a014cb commit ceae892
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ subroutine calc_resoln_function(h, tv, G, GV, US, CS)
! Do this calculation on the extent used in MOM_hor_visc.F90, and
! MOM_tracer.F90 so that no halo update is needed.

!$OMP parallel default(none) shared(is,ie,js,je,Ieq,Jeq,CS) &
!$OMP parallel default(none) shared(is,ie,js,je,Ieq,Jeq,CS,US) &
!$OMP private(dx_term,cg1_q,power_2,cg1_u,cg1_v)
if (CS%Res_fn_power_visc >= 100) then
!$OMP do
Expand Down
18 changes: 9 additions & 9 deletions src/parameterizations/vertical/MOM_geothermal.F90
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,6 @@ subroutine geothermal(h, tv, dt, ea, eb, G, GV, CS, halo)
! resid(i,j) = tv%internal_heat(i,j)
! enddo ; enddo

!$OMP parallel do default(none) shared(is,ie,js,je,G,GV,CS,dt,Irho_cp,nkmb,tv, &
!$OMP p_Ref,h,Angstrom,nz,H_neglect,eb) &
!$OMP private(num_start,heat_rem,do_i,h_geo_rem,num_left,&
!$OMP isj,iej,Rcv_BL,h_heated,heat_avail,k_tgt, &
!$OMP Rcv_tgt,Rcv,dRcv_dT,T2,S2,dRcv_dT_, &
!$OMP dRcv_dS_,heat_in_place,heat_trans, &
!$OMP wt_in_place,dTemp,dRcv,h_transfer,heating, &
!$OMP I_h)

! Conditionals for tracking diagnostic depdendencies
compute_h_old = CS%id_internal_heat_h_tendency > 0 &
.or. CS%id_internal_heat_heat_tendency > 0 &
Expand All @@ -164,6 +155,15 @@ subroutine geothermal(h, tv, dt, ea, eb, G, GV, CS, halo)
if (compute_h_old) h_old(:,:,:) = 0.0
if (compute_T_old) T_old(:,:,:) = 0.0

!$OMP parallel do default(none) shared(is,ie,js,je,G,GV,CS,dt,Irho_cp,nkmb,tv, &
!$OMP p_Ref,h,Angstrom,nz,H_neglect,eb) &
!$OMP private(num_start,heat_rem,do_i,h_geo_rem,num_left,&
!$OMP isj,iej,Rcv_BL,h_heated,heat_avail,k_tgt, &
!$OMP Rcv_tgt,Rcv,dRcv_dT,T2,S2,dRcv_dT_, &
!$OMP dRcv_dS_,heat_in_place,heat_trans, &
!$OMP wt_in_place,dTemp,dRcv,h_transfer,heating, &
!$OMP I_h)

do j=js,je
! 1. Only work on columns that are being heated.
! 2. Find the deepest layer with any mass.
Expand Down

0 comments on commit ceae892

Please sign in to comment.