From 9d46187e08e6d999ad144090133e91c17e1305eb Mon Sep 17 00:00:00 2001 From: Eric <7784797+GFDL-Eric@users.noreply.github.com> Date: Tue, 7 Sep 2021 10:52:06 -0400 Subject: [PATCH 1/3] Time_interp_external fixes for performance and 3D data override (#811) Fixes load_record read_data call for 3d variables with fms2_io. Eliminates redundant data loading and validity checking for on-grid interpolations. --- time_interp/time_interp_external.F90 | 2 +- time_interp/time_interp_external2.F90 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/time_interp/time_interp_external.F90 b/time_interp/time_interp_external.F90 index 004eac5ce5..accb070498 100644 --- a/time_interp/time_interp_external.F90 +++ b/time_interp/time_interp_external.F90 @@ -1097,7 +1097,6 @@ subroutine load_record(field, rec, interp, is_in, ie_in, js_in, je_in, window_id field%mask(isw:iew,jsw:jew,:,ib) = mask_out(isw:iew,jsw:jew,:) > 0 deallocate(mask_out) - field%need_compute(ib, window_id) = .false. else if ( field%region_type .NE. NO_REGION ) then call mpp_error(FATAL, "time_interp_external: region_type should be NO_REGION when interp is not present") @@ -1108,6 +1107,7 @@ subroutine load_record(field, rec, interp, is_in, ie_in, js_in, je_in, window_id ! convert units where(field%mask(isw:iew,jsw:jew,:,ib)) field%data(isw:iew,jsw:jew,:,ib) = & field%data(isw:iew,jsw:jew,:,ib)*field%slope + field%intercept + field%need_compute(ib, window_id) = .false. endif end subroutine load_record diff --git a/time_interp/time_interp_external2.F90 b/time_interp/time_interp_external2.F90 index a11eb84084..1c113dcd44 100644 --- a/time_interp/time_interp_external2.F90 +++ b/time_interp/time_interp_external2.F90 @@ -1067,7 +1067,7 @@ subroutine load_record(field, rec, interp, is_in, ie_in, js_in, je_in, window_id start(2) = field%js_src; nread(2) = field%je_src - field%js_src + 1 start(3) = 1; nread(3) = size(field%src_data,3) start(field%tdim) = rec; nread(field%tdim) = 1 - call read_data(field%fileobj,field%name,field%src_data(:,:,:,ib),corner=start,edge_lengths=nread) + call read_data(field%fileobj,field%name,field%src_data(:,:,:,ib:ib),corner=start,edge_lengths=nread) endif !$OMP END CRITICAL isw=field%isc;iew=field%iec @@ -1117,7 +1117,6 @@ subroutine load_record(field, rec, interp, is_in, ie_in, js_in, je_in, window_id field%mask(isw:iew,jsw:jew,:,ib) = mask_out(isw:iew,jsw:jew,:) > 0 deallocate(mask_out) - field%need_compute(ib, window_id) = .false. else if ( field%region_type .NE. NO_REGION ) then call mpp_error(FATAL, "time_interp_external: region_type should be NO_REGION when interp is not present") @@ -1128,6 +1127,7 @@ subroutine load_record(field, rec, interp, is_in, ie_in, js_in, je_in, window_id ! convert units where(field%mask(isw:iew,jsw:jew,:,ib)) field%data(isw:iew,jsw:jew,:,ib) = & field%data(isw:iew,jsw:jew,:,ib)*field%slope + field%intercept + field%need_compute(ib, window_id) = .false. endif end subroutine load_record From 9fb5a50439573ad84edaddcbe79724261b29c9bd Mon Sep 17 00:00:00 2001 From: Ryan Mulhall <35538242+rem1776@users.noreply.github.com> Date: Tue, 7 Sep 2021 10:54:24 -0400 Subject: [PATCH 2/3] Update gcc 11.1.0 check in configure.ac (#808) Update compiler version check in configure script to only error on 11.1.0, not any subsequent versions --- configure.ac | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 1ac208eded..9efb579c1f 100644 --- a/configure.ac +++ b/configure.ac @@ -273,11 +273,11 @@ if test -n "$fc_version_info"; then fi # Check if gcc is 11.1 for class(*) select type bug -AC_MSG_CHECKING([if gcc 11 is loaded]) -if [ test -n "`$FC --version | grep GNU | grep 11\..\..`" ]; then +AC_MSG_CHECKING([if gcc 11.1.0 is loaded]) +if [ test -n "`$FC --version | grep GNU | grep 11\.1\..`" ]; then AC_MSG_RESULT([yes]) - AC_MSG_ERROR([Compilation with gcc and gfortran 11 is unsupported by this version\ - of FMS. Please use another compiler version]) + AC_MSG_ERROR([Compilation with gcc and gfortran 11.1.0 is unsupported \ +by this version of FMS due to a bug in the compiler. Please use a different version of gcc/gfortran.]) else AC_MSG_RESULT([no]) fi From d6c3b57ad1076817f27b660050c0b5dd48abb818 Mon Sep 17 00:00:00 2001 From: rem1776 Date: Tue, 7 Sep 2021 11:37:01 -0400 Subject: [PATCH 3/3] Updates changelog and version number for 2021.03.01 patch --- CHANGELOG.md | 6 ++++++ configure.ac | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c6c906899..8686cd654a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ and this project uses `yyyy.rr[.pp]`, where `yyyy` is the year a patch is releas `rr` is a sequential release number (starting from `01`), and an optional two-digit sequential patch number (starting from `01`). +## [2021.03.01] - 2021-09-07 +### Fixed +- TIME_INTERP: Fixes issue in load_record when reading 3d variables with fms2_io and elimates redundant loads and validity checks for on-grid interpolations +### Changed +- Changes configure script to only check for gcc 11.1.0, not any gcc 11 version + ## [2021.03] - 2021-08-16 ### Known Issues - DIAG_MANAGER: 3D diurnal diagnostic variables are not supported in this version of FMS diff --git a/configure.ac b/configure.ac index 9efb579c1f..bb91cda777 100644 --- a/configure.ac +++ b/configure.ac @@ -25,7 +25,7 @@ AC_PREREQ([2.69]) # Initialize with name, version, and support email address. AC_INIT([GFDL FMS Library], - [2021.03.0], + [2021.03.01], [gfdl.climate.model.info@noaa.gov], [FMS], [https://www.gfdl.noaa.gov/fms])