Skip to content

Commit 9f3de48

Browse files
OMP directive fixes for build and runtime failures in CESM C cases (mom-ocean#337)
1 parent 1221ef3 commit 9f3de48

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/parameterizations/lateral/MOM_hor_visc.F90

+1-1
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ subroutine horizontal_viscosity(u, v, h, uh, vh, diffu, diffv, MEKE, VarMix, G,
667667
! call pass_vector(slope_x, slope_y, G%Domain, halo=2)
668668
endif
669669

670-
!$OMP parallel do default(none) &
670+
!$OMP parallel do default(none) if (.not. CS%smooth_AH) &
671671
!$OMP shared( &
672672
!$OMP CS, G, GV, US, OBC, VarMix, MEKE, u, v, h, uh, vh, &
673673
!$OMP is, ie, js, je, Isq, Ieq, Jsq, Jeq, nz, &

src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90

+2-2
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ subroutine calc_Eady_growth_rate_2D(CS, G, GV, US, h, e, dzu, dzv, dzSxN, dzSyN,
858858
CS%SN_v(i,j) = 0.0
859859
enddo ; enddo
860860

861-
!$OMP parallel do default(shared) private(dnew,dz,weight,l_seg,vint_SN,sum_dz)
861+
!$OMP parallel do default(shared) private(dnew,dz,weight,l_seg,vint_SN,sum_dz,dT,dB)
862862
do j=G%jsc-1,G%jec+1
863863
do I=G%isc-1,G%iec
864864
vint_SN(I) = 0.
@@ -901,7 +901,7 @@ subroutine calc_Eady_growth_rate_2D(CS, G, GV, US, h, e, dzu, dzv, dzSxN, dzSyN,
901901
enddo
902902
enddo
903903

904-
!$OMP parallel do default(shared) private(dnew,dz,weight,l_seg)
904+
!$OMP parallel do default(shared) private(dnew,dz,weight,l_seg,vint_SN,sum_dz,dT,dB)
905905
do J=G%jsc-1,G%jec
906906
do i=G%isc-1,G%iec+1
907907
vint_SN(i) = 0.

src/parameterizations/lateral/MOM_mixed_layer_restrat.F90

+1-1
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ subroutine mixedlayer_restrat_OM4(h, uhtr, vhtr, tv, forces, dt, h_MLD, VarMix,
378378
!$OMP parallel default(shared) private(rho_ml,h_vel,u_star,absf,mom_mixrate,timescale, &
379379
!$OMP SpV_ml,SpV_int_fast,SpV_int_slow,Rml_int_fast,Rml_int_slow, &
380380
!$OMP line_is_empty,keep_going,res_scaling_fac, &
381-
!$OMP a,IhTot,b,Ihtot_slow,zpb,hAtVel,zpa,dh) &
381+
!$OMP a,IhTot,b,Ihtot_slow,zpb,hAtVel,zpa,dh,lfront,I_LFront) &
382382
!$OMP firstprivate(uDml,vDml,uDml_slow,vDml_slow)
383383

384384
if (GV%Boussinesq .or. GV%semi_Boussinesq) then

0 commit comments

Comments
 (0)