Skip to content

Commit

Permalink
Corrected OMP directives, issue #144
Browse files Browse the repository at this point in the history
- OMP directive started inside an "if" block and ended outside, in
  MOM_remapping.F90
  - Closes #144.
- OMP block started a second time unnecessarily in MOM_lateral_mixing_coeffs.F90
  - Avoids @nikizadehgfdl re-opening #144 (see his comment "There may be more
    errors once this one is fixed.")
- I only tested with OPENMP=1 for intel, ocean-only. There may be more!
- No answer changes.
  • Loading branch information
adcroft committed Apr 24, 2015
1 parent b4ef8c0 commit 47d8422
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/ALE/MOM_remapping.F90
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ subroutine remapping_main( CS, G, h, dxInterface, tv, u, v )
nz = G%ke

! Remap tracer
if (associated(tv%S)) then ! Assume T and S are either both associated or both not
!$OMP parallel default(none) shared(G,h,dxInterface,CS,nz,tv,u,v) &
!$OMP private(h1,dx,u_column)
if (associated(tv%S)) then ! Assume T and S are either both associated or both not
!$OMP do
do j = G%jsc,G%jec
do i = G%isc,G%iec
Expand Down
2 changes: 0 additions & 2 deletions src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,6 @@ subroutine calc_resoln_function(h, tv, G, CS)
CS%Res_fn_v(i,J) = 0.5*(CS%Res_fn_h(i,j) + CS%Res_fn_h(i,j+1))
enddo ; enddo
else ! .not.CS%interpolate_Res_fn
!$OMP parallel default(none) shared(is,ie,js,je,Ieq,Jeq,CS) &
!$OMP private(dx_term,cg1_q,power_2,cg1_u,cg1_v)
if (CS%Res_fn_power_khth >= 100) then
!$OMP do
do j=js,je ; do I=is-1,Ieq
Expand Down

0 comments on commit 47d8422

Please sign in to comment.