From 4c076228193bfc32edf1474348b50dee893997fe Mon Sep 17 00:00:00 2001 From: Benjamin Auer Date: Wed, 18 Dec 2024 15:34:54 -0500 Subject: [PATCH 1/2] fixes #3255 --- CHANGELOG.md | 4 ++++ gridcomps/ExtData2G/ExtDataConfig.F90 | 21 ++++++++++++++++----- gridcomps/ExtData2G/ExtDataGridCompNG.F90 | 4 ---- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b6d16ab7f2f..9fb4c872aaab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,8 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Removed restrction that vector regridding in ExtData2G must be bilinear + ### Fixed +- Fixed by when using multiple rules for a vector item in ExtData2G + ### Removed ### Deprecated diff --git a/gridcomps/ExtData2G/ExtDataConfig.F90 b/gridcomps/ExtData2G/ExtDataConfig.F90 index c7b13c44c5ec..945ad21a4063 100644 --- a/gridcomps/ExtData2G/ExtDataConfig.F90 +++ b/gridcomps/ExtData2G/ExtDataConfig.F90 @@ -324,11 +324,12 @@ subroutine add_new_rule(this,key,export_rule,multi_rule,rc) logical, optional, intent(in) :: multi_rule integer, intent(out), optional :: rc - integer :: semi_pos,status + integer :: semi_pos,status,rule_n_pos type(ExtDataRule) :: rule,ucomp,vcomp type(ExtDataRule), pointer :: temp_rule - character(len=:), allocatable :: uname,vname + character(len=:), allocatable :: uname,vname,original_key logical :: usable_multi_rule + character(len=1) :: rule_num if (present(multi_rule)) then usable_multi_rule = multi_rule @@ -341,14 +342,24 @@ subroutine add_new_rule(this,key,export_rule,multi_rule,rc) rule = ExtDataRule(export_rule,this%sample_map,key,multi_rule=usable_multi_rule,_RC) semi_pos = index(key,";") if (semi_pos > 0) then - call rule%split_vector(key,ucomp,vcomp,rc=status) + rule_n_pos = index(key,rule_sep) + original_key = key + if (rule_n_pos > 0) original_key = key(1:rule_n_pos-1) + + call rule%split_vector(original_key,ucomp,vcomp,rc=status) uname = key(1:semi_pos-1) vname = key(semi_pos+1:len_trim(key)) + + if (rule_n_pos > 0) then + rule_num = key(rule_n_pos+1:rule_n_pos+1) + uname=uname//rule_sep//rule_num + end if + temp_rule => this%rule_map%at(trim(uname)) - _ASSERT(.not.associated(temp_rule),"duplicated export entry key: "//trim(key)) + _ASSERT(.not.associated(temp_rule),"duplicated export entry key: "//trim(uname)) call this%rule_map%insert(trim(uname),ucomp) temp_rule => this%rule_map%at(trim(vname)) - _ASSERT(.not.associated(temp_rule),"duplicated export entry key: "//trim(key)) + _ASSERT(.not.associated(temp_rule),"duplicated export entry key: "//trim(vname)) call this%rule_map%insert(trim(vname),vcomp) else temp_rule => this%rule_map%at(trim(key)) diff --git a/gridcomps/ExtData2G/ExtDataGridCompNG.F90 b/gridcomps/ExtData2G/ExtDataGridCompNG.F90 index d7f2ed39f490..9abc4b2d1fb5 100644 --- a/gridcomps/ExtData2G/ExtDataGridCompNG.F90 +++ b/gridcomps/ExtData2G/ExtDataGridCompNG.F90 @@ -1464,10 +1464,6 @@ subroutine create_bracketing_fields(item,ExtDataState,cf,rc) else if (item%vartype == MAPL_VectorField) then - if (item%Trans /= REGRID_METHOD_BILINEAR) then - _FAIL('No conservative re-gridding with vectors') - end if - call ESMF_StateGet(ExtDataState, trim(item%vcomp1), field,_RC) call ESMF_FieldGet(field,grid=grid,rank=fieldRank,_RC) From d8b97a9ce329b8510fa9cdd233cf3b85b9cb574f Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Wed, 18 Dec 2024 15:40:48 -0500 Subject: [PATCH 2/2] Add Ubuntu24 fixes, prepare for release --- .circleci/config.yml | 2 +- .github/workflows/workflow.yml | 4 ++-- CHANGELOG.md | 16 ++++++++++++---- CMakeLists.txt | 2 +- profiler/tests/test_ExclusiveColumn.pf | 10 +++++----- 5 files changed, 21 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 58c5b8ee9a8d..88afe2ca124e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,7 +15,7 @@ parameters: default: "" # Anchors to prevent forgetting to update a version -os_version: &os_version ubuntu20 +os_version: &os_version ubuntu24 baselibs_version: &baselibs_version v7.27.0 bcs_version: &bcs_version v11.6.0 tag_build_arg_name: &tag_build_arg_name maplversion diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 967d7aa53f0b..e5f266150bc7 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -35,7 +35,7 @@ jobs: name: Build and Test MAPL GNU runs-on: ubuntu-latest container: - image: gmao/ubuntu20-geos-env-mkl:v7.27.0-openmpi_5.0.5-gcc_14.2.0 + image: gmao/ubuntu24-geos-env-mkl:v7.27.0-openmpi_5.0.5-gcc_14.2.0 # Per https://github.com/actions/virtual-environments/issues/1445#issuecomment-713861495 # It seems like we might not need secrets on GitHub Actions which is good for forked # pull requests @@ -86,7 +86,7 @@ jobs: name: Build and Test MAPL Intel runs-on: ubuntu-latest container: - image: gmao/ubuntu20-geos-env:v7.27.0-intelmpi_2021.13-ifort_2021.13 + image: gmao/ubuntu24-geos-env:v7.27.0-intelmpi_2021.13-ifort_2021.13 # Per https://github.com/actions/virtual-environments/issues/1445#issuecomment-713861495 # It seems like we might not need secrets on GitHub Actions which is good for forked # pull requests diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fb4c872aaab..ad6411dbd6fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,16 +11,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -- Removed restrction that vector regridding in ExtData2G must be bilinear - ### Fixed -- Fixed by when using multiple rules for a vector item in ExtData2G - ### Removed ### Deprecated +## [2.51.2] - 2024-12-19 + +### Changed + +- Removed restriction that vector regridding in ExtData2G must be bilinear +- Update CI to use Ubuntu 24 images + +### Fixed + +- Fixed by when using multiple rules for a vector item in ExtData2G +- Fix profiler ExclusiveColumn test for GCC 14 + ## [2.51.1] - 2024-12-10 ### Fixed diff --git a/CMakeLists.txt b/CMakeLists.txt index b253423a3289..f7b5c3ffac4d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ endif () project ( MAPL - VERSION 2.51.1 + VERSION 2.51.2 LANGUAGES Fortran CXX C) # Note - CXX is required for ESMF # Set the possible values of build type for cmake-gui diff --git a/profiler/tests/test_ExclusiveColumn.pf b/profiler/tests/test_ExclusiveColumn.pf index e570bde34550..b6aca8a2297f 100644 --- a/profiler/tests/test_ExclusiveColumn.pf +++ b/profiler/tests/test_ExclusiveColumn.pf @@ -11,15 +11,15 @@ contains class(AbstractMeterNode), pointer :: subnode class(AbstractMeter), pointer :: t type(ExclusiveColumn) :: c - type(UnlimitedVector) :: v + type(UnlimitedVector), target :: v integer :: i integer :: expected(3) - class(*), allocatable :: q - + class(*), pointer :: q + node = MeterNode('top', AdvancedMeter(MpiTimerGauge())) t => node%get_meter() call t%add_cycle(10.0d0) - + call node%add_child('a', AdvancedMeter(MpiTimerGauge())) subnode => node%get_child('a') t => subnode%get_meter() @@ -33,7 +33,7 @@ contains v = c%get_rows(node) expected = [7,1,2] do i = 1, 3 - q = v%at(i) + q => v%at(i) select type (q) type is (integer) @assertEqual(expected(i), q)