From b9075a8240f4f387b1107d1c2ce89f6c78153881 Mon Sep 17 00:00:00 2001 From: Niki Zadeh Date: Mon, 12 Jul 2021 10:55:54 -0400 Subject: [PATCH 1/2] Bug fix for FMS2 issue #761, broadcast from root pe - This addresses the FMS issue $761 https://github.com/NOAA-GFDL/FMS/issues/761 - There is a mpp_broadcast in the FMS2 subroutine get_unlimited_dimension_name() and this subroutine has to be called by all pes, so it cannot be inside a if(is_root_pe()) block --- src/framework/MOM_restart.F90 | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/framework/MOM_restart.F90 b/src/framework/MOM_restart.F90 index 74db4e0f95..edf7289484 100644 --- a/src/framework/MOM_restart.F90 +++ b/src/framework/MOM_restart.F90 @@ -1092,7 +1092,6 @@ subroutine restore_state(filename, directory, day, G, CS) ! Check the remaining files for different times and issue a warning ! if they differ from the first time. - if (is_root_pe()) then do m = n+1,num_file call get_file_times(IO_handles(n), time_vals, ntime) if (ntime < 1) cycle @@ -1107,7 +1106,6 @@ subroutine restore_state(filename, directory, day, G, CS) call MOM_error(WARNING, "MOM_restart: "//mesg) endif enddo - endif ! Read each variable from the first file in which it is found. do n=1,num_file From c1083794c3158bd68e124fe5f90247a29d5f5318 Mon Sep 17 00:00:00 2001 From: Niki Zadeh Date: Tue, 10 Aug 2021 13:02:03 -0400 Subject: [PATCH 2/2] Restrict printing warning message to root pe - This is restricting the warning message in MOM_restart.F90 to root pe per Bob. --- src/framework/MOM_restart.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/framework/MOM_restart.F90 b/src/framework/MOM_restart.F90 index edf7289484..b917231fcc 100644 --- a/src/framework/MOM_restart.F90 +++ b/src/framework/MOM_restart.F90 @@ -1099,7 +1099,7 @@ subroutine restore_state(filename, directory, day, G, CS) t2 = time_vals(1) deallocate(time_vals) - if (t1 /= t2) then + if (t1 /= t2 .and. is_root_PE()) then write(mesg,'("WARNING: Restart file ",I2," has time ",F10.4,"whereas & &simulation is restarted at ",F10.4," (differing by ",F10.4,").")')& m,t1,t2,t1-t2