Skip to content

Commit

Permalink
Fix additional OMP problems
Browse files Browse the repository at this point in the history
  • Loading branch information
dabail10 committed Jul 1, 2020
1 parent ad03424 commit 73e7774
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 6 additions & 2 deletions cicecore/shared/ice_init_column.F90
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ subroutine init_bgc()

if (solve_zsal) then ! default values

!$OMP PARALLEL DO PRIVATE(iblk,i,j,n,ilo,ihi,jlo,jhi,this_block)
!$OMP PARALLEL DO PRIVATE(iblk,i,j,k,n,ilo,ihi,jlo,jhi,this_block,trcrn_bgc)
do iblk = 1, nblocks

this_block = get_block(blocks_ice(iblk),iblk)
Expand Down Expand Up @@ -816,6 +816,7 @@ subroutine init_bgc()
enddo ! i
enddo ! j
enddo ! iblk
!$OMP END PARALLEL DO
call icepack_warnings_flush(nu_diag)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
file=__FILE__, line=__LINE__)
Expand Down Expand Up @@ -855,6 +856,7 @@ subroutine init_bgc()
enddo ! j

enddo ! iblk
!$OMP END PARALLEL DO

call icepack_warnings_flush(nu_diag)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
Expand All @@ -865,7 +867,7 @@ subroutine init_bgc()

endif ! .not. restart

!$OMP PARALLEL DO PRIVATE(iblk,i,j,k,n,ilo,ihi,jlo,jhi,this_block)
!$OMP PARALLEL DO PRIVATE(iblk,i,j,k,n,ilo,ihi,jlo,jhi,this_block,sicen,trcrn_bgc)
do iblk = 1, nblocks

this_block = get_block(blocks_ice(iblk),iblk)
Expand Down Expand Up @@ -900,6 +902,7 @@ subroutine init_bgc()
enddo ! j

enddo ! iblk
!$OMP END PARALLEL DO

call icepack_warnings_flush(nu_diag)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
Expand All @@ -925,6 +928,7 @@ subroutine init_bgc()
enddo ! i
enddo ! j
enddo ! iblk
!$OMP END PARALLEL DO

call icepack_warnings_flush(nu_diag)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
Expand Down
6 changes: 5 additions & 1 deletion cicecore/shared/ice_restart_column.F90
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,7 @@ subroutine read_restart_hbrine()
enddo ! i
enddo ! j
enddo ! iblk
!$OMP END PARALLEL DO

end subroutine read_restart_hbrine

Expand Down Expand Up @@ -868,6 +869,7 @@ subroutine write_restart_hbrine()
enddo ! i
enddo ! j
enddo ! iblk
!$OMP END PARALLEL DO

call write_restart_field(nu_dump_hbrine,0,trcrn(:,:,nt_fbri,:,:),'ruf8', &
'fbrn',ncat,diag)
Expand Down Expand Up @@ -997,6 +999,7 @@ subroutine write_restart_bgc()
enddo
enddo
enddo
!$OMP END PARALLEL DO

call write_restart_field(nu_dump_bgc,0,Rayleigh_real,'ruf8','Rayleigh',1,diag)

Expand Down Expand Up @@ -1411,7 +1414,8 @@ subroutine read_restart_bgc()
endif
enddo
enddo
enddo
enddo ! iblk
!$OMP END PARALLEL DO
endif ! restart_zsal

!-----------------------------------------------------------------
Expand Down

0 comments on commit 73e7774

Please sign in to comment.