From a09deb4142bc8d886e8496d7f1d2bdfce050e641 Mon Sep 17 00:00:00 2001 From: Niki Zadeh Date: Mon, 9 May 2016 14:08:23 -0400 Subject: [PATCH] OMP bug fix - Fixes issue #287 - OMP "private" variables are not initialized prior to "private" clause that is the job for "firstprivate" clause - Cause 1/2 degree model crash when compiled with -openmp --- src/ALE/MOM_ALE.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ALE/MOM_ALE.F90 b/src/ALE/MOM_ALE.F90 index c024429853..f4ed20df6c 100644 --- a/src/ALE/MOM_ALE.F90 +++ b/src/ALE/MOM_ALE.F90 @@ -671,7 +671,7 @@ subroutine ALE_remap_scalar(CS, G, nk_src, h_src, s_src, h_dst, s_dst, all_cells !$OMP parallel default(none) shared(CS,G,h_src,s_src,h_dst,s_dst & !$OMP ,ignore_vanished_layers, nk_src,dx ) & -!$OMP private(n_points) +!$OMP firstprivate(n_points) !$OMP do do j = G%jsc,G%jec do i = G%isc,G%iec