Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update OMP #680

Merged
merged 15 commits into from
Feb 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions cicecore/cicedynB/analysis/ice_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ subroutine runtime_diags (dt)
fisoon(n) = fisoon(n)*dt
fisoos(n) = fisoos(n)*dt

!$OMP PARALLEL DO PRIVATE(iblk,i,j)
!$OMP PARALLEL DO PRIVATE(iblk,i,j,k)
do iblk = 1, nblocks
do j = 1, ny_block
do i = 1, nx_block
Expand Down Expand Up @@ -1214,7 +1214,7 @@ subroutine init_mass_diags

if (tr_iso) then
do n=1,n_iso
!$OMP PARALLEL DO PRIVATE(iblk,i,j)
!$OMP PARALLEL DO PRIVATE(iblk,i,j,k)
do iblk = 1, nblocks
do j = 1, ny_block
do i = 1, nx_block
Expand Down Expand Up @@ -1317,7 +1317,6 @@ subroutine total_energy (work)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
file=__FILE__, line=__LINE__)

! MHRI: CHECK THIS OMP
!$OMP PARALLEL DO PRIVATE(iblk,i,j,n,k,ij,icells,indxi,indxj)
do iblk = 1, nblocks

Expand Down Expand Up @@ -1405,7 +1404,6 @@ subroutine total_salt (work)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
file=__FILE__, line=__LINE__)

! MHRI: CHECK THIS OMP
!$OMP PARALLEL DO PRIVATE(iblk,i,j,n,k,ij,icells,indxi,indxj)
do iblk = 1, nblocks

Expand Down Expand Up @@ -1513,7 +1511,8 @@ subroutine init_diags
if (abs(latpnt(n)) < c360 .and. abs(lonpnt(n)) < c360) then

! MDT, 09/2017: Comment out OpenMP directives since loop is not thread-safe
!!$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,latdis,londis,totdis)
! This is computing closest point, Could add a CRITICAL but it's just initialization
!!$XXXOMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,latdis,londis,totdis)
do iblk = 1, nblocks
this_block = get_block(blocks_ice(iblk),iblk)
ilo = this_block%ilo
Expand All @@ -1538,7 +1537,7 @@ subroutine init_diags
enddo ! i
enddo ! j
enddo ! iblk
!!$OMP END PARALLEL DO
!!$XXXOMP END PARALLEL DO

endif

Expand Down
1 change: 0 additions & 1 deletion cicecore/cicedynB/analysis/ice_history.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1889,7 +1889,6 @@ subroutine accum_hist (dt)
! increment field
!---------------------------------------------------------------

! MHRI: CHECK THIS OMP ... Maybe ok after "dfresh,dfsalt" added
!$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,this_block, &
!$OMP k,n,qn,ns,sn,rho_ocn,rho_ice,Tice,Sbr,phi,rhob,dfresh,dfsalt, &
!$OMP worka,workb,worka3,Tinz4d,Sinz4d,Tsnz4d)
Expand Down
Loading