From 2a643be9d64021fdf7b7866a08c11b2c6ed8016e Mon Sep 17 00:00:00 2001 From: turner Date: Thu, 14 Sep 2017 20:59:40 +0000 Subject: [PATCH] Remove OpenMP directives in 2 locations. These directives appear to be around loops that are not thread safe --- cicecore/cicedynB/analysis/ice_diagnostics.F90 | 5 +++-- cicecore/shared/ice_init_column.F90 | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cicecore/cicedynB/analysis/ice_diagnostics.F90 b/cicecore/cicedynB/analysis/ice_diagnostics.F90 index f42e44b06..68eaf6265 100644 --- a/cicecore/cicedynB/analysis/ice_diagnostics.F90 +++ b/cicecore/cicedynB/analysis/ice_diagnostics.F90 @@ -1287,7 +1287,8 @@ subroutine init_diags if (abs(latpnt(n)) < c360 .and. abs(lonpnt(n)) < c360) then - !$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,latdis,londis,totdis) + ! 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) do iblk = 1, nblocks this_block = get_block(blocks_ice(iblk),iblk) ilo = this_block%ilo @@ -1312,7 +1313,7 @@ subroutine init_diags enddo ! i enddo ! j enddo ! iblk - !$OMP END PARALLEL DO + !!$OMP END PARALLEL DO endif diff --git a/cicecore/shared/ice_init_column.F90 b/cicecore/shared/ice_init_column.F90 index 16f92a698..e4bc49d57 100644 --- a/cicecore/shared/ice_init_column.F90 +++ b/cicecore/shared/ice_init_column.F90 @@ -141,8 +141,8 @@ subroutine init_shortwave real(kind= dbl_kind), dimension(ntrcr, ncat) :: & ztrcr_sw - !$OMP PARALLEL DO PRIVATE(iblk,i,j,n,ilo,ihi,jlo,jhi,this_block, & - !$OMP cszn,l_print_point,debug,ipoint) + !!$OMP PARALLEL DO PRIVATE(iblk,i,j,n,ilo,ihi,jlo,jhi,this_block, & + !!$OMP cszn,l_print_point,debug,ipoint) do iblk=1,nblocks ! Initialize