From 336cd731dd9ae7668473a5232b17b00f39508149 Mon Sep 17 00:00:00 2001 From: Jun Wang Date: Tue, 13 Jul 2021 15:16:00 +0000 Subject: [PATCH 1/2] fix the omp threading reproducibility issue --- io/FV3GFS_io.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io/FV3GFS_io.F90 b/io/FV3GFS_io.F90 index 364f38efd..1b44f16a2 100644 --- a/io/FV3GFS_io.F90 +++ b/io/FV3GFS_io.F90 @@ -1300,7 +1300,7 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta compute_tsfc_zorl_for_colstart: if (.not. warm_start) then if(Model%frac_grid) then ! 3-way composite if (Model%me == Model%master ) call mpp_error(NOTE, 'gfs_driver::surface_props_input - computing composite tsfc and zorl') -!$omp parallel do default(shared) private(nb, ix) +!$omp parallel do default(shared) private(nb, ix, term1, tem) do nb = 1, Atm_block%nblks do ix = 1, Atm_block%blksz(nb) Sfcprop(nb)%tsfco(ix) = max(con_tice, Sfcprop(nb)%tsfco(ix)) ! this may break restart reproducibility From fe083ba797ac2c2f5cfeec4e0949a06734885849 Mon Sep 17 00:00:00 2001 From: "Jun.Wang" Date: Tue, 13 Jul 2021 20:14:03 +0000 Subject: [PATCH 2/2] fix the typo --- io/FV3GFS_io.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io/FV3GFS_io.F90 b/io/FV3GFS_io.F90 index 1b44f16a2..94d30b220 100644 --- a/io/FV3GFS_io.F90 +++ b/io/FV3GFS_io.F90 @@ -1300,7 +1300,7 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta compute_tsfc_zorl_for_colstart: if (.not. warm_start) then if(Model%frac_grid) then ! 3-way composite if (Model%me == Model%master ) call mpp_error(NOTE, 'gfs_driver::surface_props_input - computing composite tsfc and zorl') -!$omp parallel do default(shared) private(nb, ix, term1, tem) +!$omp parallel do default(shared) private(nb, ix, tem1, tem) do nb = 1, Atm_block%nblks do ix = 1, Atm_block%blksz(nb) Sfcprop(nb)%tsfco(ix) = max(con_tice, Sfcprop(nb)%tsfco(ix)) ! this may break restart reproducibility