From 11886acc04676b93847c54327ace256f20684778 Mon Sep 17 00:00:00 2001 From: Tom Clune Date: Thu, 7 Dec 2023 16:01:52 -0500 Subject: [PATCH 01/11] NAG 7.141 found even more places where TARGET is required. --- griddedio/GriddedIO.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/griddedio/GriddedIO.F90 b/griddedio/GriddedIO.F90 index 7b62d2e0dacf..f4a3f9ae91a5 100644 --- a/griddedio/GriddedIO.F90 +++ b/griddedio/GriddedIO.F90 @@ -108,13 +108,13 @@ function new_MAPL_GriddedIO(metadata,input_bundle,output_bundle,write_collection end function new_MAPL_GriddedIO subroutine CreateFileMetaData(this,items,bundle,timeInfo,vdata,ogrid,global_attributes,rc) - class (MAPL_GriddedIO), intent(inout) :: this + class (MAPL_GriddedIO), target, intent(inout) :: this type(GriddedIOitemVector), target, intent(inout) :: items type(ESMF_FieldBundle), intent(inout) :: bundle type(TimeData), intent(inout) :: timeInfo type(VerticalData), intent(inout), optional :: vdata type (ESMF_Grid), intent(inout), pointer, optional :: ogrid - type(StringStringMap), intent(in), optional :: global_attributes + type(StringStringMap), intent(in), target, optional :: global_attributes integer, intent(out), optional :: rc type(ESMF_Grid) :: input_grid From 78f63cd64ef5aa5e77cda186141ba5e9e4e76a2f Mon Sep 17 00:00:00 2001 From: Tom Clune Date: Thu, 7 Dec 2023 19:21:42 -0500 Subject: [PATCH 02/11] Updates from work on discover. --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 679ce4e05a3a..4306ae5715c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Improved error message for missing labels in GridManager. + ### Fixed - Corrected some unit tests (and test utilities) to fix dangling pointers detected by NAG. Most (possibly all) of these changes are already on release/MAPL-v3, but it was getting annoying to have NAG fail unit tests with develop branch. From 76ad67af070b86cca8db9da1cbd9847ce2b92bce Mon Sep 17 00:00:00 2001 From: Tom Clune Date: Fri, 8 Dec 2023 09:22:35 -0500 Subject: [PATCH 03/11] NAG TARGET updates. --- base/MAPL_GridManager.F90 | 2 +- gridcomps/ExtData2G/ExtDataConfig.F90 | 4 ++-- gridcomps/ExtData2G/ExtDataGridCompNG.F90 | 4 ++-- gridcomps/ExtData2G/ExtDataOldTypesCreator.F90 | 2 +- griddedio/GriddedIO.F90 | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/base/MAPL_GridManager.F90 b/base/MAPL_GridManager.F90 index eb2bd07b782b..360c784ea808 100644 --- a/base/MAPL_GridManager.F90 +++ b/base/MAPL_GridManager.F90 @@ -291,7 +291,7 @@ function make_grid_from_config(this, config, unusable, prefix, rc) result(grid) end if call ESMF_ConfigGetAttribute(config, label=label, value=grid_type, rc=status) - _ASSERT(status==0,'label not found') + _ASSERT(status==0,'label ['//label//'] not found') allocate(factory, source=this%make_factory(trim(grid_type), config, prefix=prefix, rc=status)) _VERIFY(status) diff --git a/gridcomps/ExtData2G/ExtDataConfig.F90 b/gridcomps/ExtData2G/ExtDataConfig.F90 index 086476a761fe..c4ed2cbf8d39 100644 --- a/gridcomps/ExtData2G/ExtDataConfig.F90 +++ b/gridcomps/ExtData2G/ExtDataConfig.F90 @@ -162,7 +162,7 @@ end subroutine new_ExtDataConfig_from_yaml function count_rules_for_item(this,item_name,rc) result(number_of_rules) integer :: number_of_rules - class(ExtDataConfig), intent(in) :: this + class(ExtDataConfig), target, intent(in) :: this character(len=*), intent(in) :: item_name integer, optional, intent(out) :: rc @@ -265,7 +265,7 @@ function sort_rules_by_start(hconfig_sequence,rc) result(sorted_index) end function sort_rules_by_start function get_item_type(this,item_name,unusable,rc) result(item_type) - class(ExtDataConfig), intent(inout) :: this + class(ExtDataConfig), target, intent(inout) :: this character(len=*), intent(in) :: item_name class(KeywordEnforcer), optional, intent(in) :: unusable integer, optional, intent(out) :: rc diff --git a/gridcomps/ExtData2G/ExtDataGridCompNG.F90 b/gridcomps/ExtData2G/ExtDataGridCompNG.F90 index ce335399f252..7b53575e600b 100644 --- a/gridcomps/ExtData2G/ExtDataGridCompNG.F90 +++ b/gridcomps/ExtData2G/ExtDataGridCompNG.F90 @@ -256,7 +256,7 @@ SUBROUTINE Initialize_ ( GC, IMPORT, EXPORT, CLOCK, rc ) integer :: idx type(MAPL_MetaComp),pointer :: MAPLSTATE - type(ExtDataOldTypesCreator),target :: config_yaml + type(ExtDataOldTypesCreator), target :: config_yaml character(len=ESMF_MAXSTR) :: new_rc_file logical :: found_in_config integer :: num_primary,num_derived,num_rules @@ -1449,7 +1449,7 @@ end subroutine createFileLevBracket subroutine IOBundle_Add_Entry(IOBundles,item,entry_num,rc) type(IOBundleNGVector), intent(inout) :: IOBundles - type(primaryExport), intent(inout) :: item + type(primaryExport), target, intent(inout) :: item integer, intent(in) :: entry_num integer, intent(out), optional :: rc diff --git a/gridcomps/ExtData2G/ExtDataOldTypesCreator.F90 b/gridcomps/ExtData2G/ExtDataOldTypesCreator.F90 index f6e4533b2f2c..9e588d0b23ee 100644 --- a/gridcomps/ExtData2G/ExtDataOldTypesCreator.F90 +++ b/gridcomps/ExtData2G/ExtDataOldTypesCreator.F90 @@ -55,7 +55,7 @@ end function new_ExtDataOldTypesCreator subroutine fillin_primary(this,item_name,base_name,primary_item,time,clock,unusable,rc) - class(ExtDataOldTypesCreator), intent(inout) :: this + class(ExtDataOldTypesCreator), target, intent(inout) :: this character(len=*), intent(in) :: item_name character(len=*), intent(in) :: base_name type(PrimaryExport), intent(inout) :: primary_item diff --git a/griddedio/GriddedIO.F90 b/griddedio/GriddedIO.F90 index f4a3f9ae91a5..20d09063a7f8 100644 --- a/griddedio/GriddedIO.F90 +++ b/griddedio/GriddedIO.F90 @@ -729,8 +729,8 @@ subroutine RegridVector(this,xName,yName,rc) yptr3d => yptr3d_inter end if else - if (associated(xptr3d)) nullify(xptr3d) - if (associated(yptr3d)) nullify(yptr3d) + nullify(xptr3d) + nullify(yptr3d) end if call ESMF_FieldBundleGet(this%input_bundle,xname,field=xfield,rc=status) From 867863320ebdca24ba00111e4f3e138277a9fac4 Mon Sep 17 00:00:00 2001 From: Tom Clune Date: Fri, 8 Dec 2023 09:52:11 -0500 Subject: [PATCH 04/11] Updated unit test. Need to update test because error message in GridManager was improved. --- base/tests/Test_GridManager.pf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/tests/Test_GridManager.pf b/base/tests/Test_GridManager.pf index 9e7e6f17fcb9..540437006763 100644 --- a/base/tests/Test_GridManager.pf +++ b/base/tests/Test_GridManager.pf @@ -52,7 +52,7 @@ contains if (status == 0) then call grid_manager%delete(grid) end if - @assertExceptionRaised('label not found') + @assertExceptionRaised('label [GRID_TYPE:] not found') ! Check that it actually failed @assertFalse(0 == status, 'made a grid even though there is no prototype') From 4150672834f051ffd848cbc4bf4afb10cc8553f8 Mon Sep 17 00:00:00 2001 From: Weiyuan Jiang Date: Fri, 8 Dec 2023 10:44:08 -0500 Subject: [PATCH 05/11] fix pfio tests --- pfio/AbstractDirectoryService.F90 | 6 +++--- pfio/DirectoryService.F90 | 6 +++--- pfio/MultiGroupServer.F90 | 8 ++++---- pfio/tests/pfio_ctest_io.F90 | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pfio/AbstractDirectoryService.F90 b/pfio/AbstractDirectoryService.F90 index 2eceb9d4c121..86088b98c0cd 100644 --- a/pfio/AbstractDirectoryService.F90 +++ b/pfio/AbstractDirectoryService.F90 @@ -53,7 +53,7 @@ subroutine connect_to_client(this, port_name, server, rc) import AbstractSocketVector class (AbstractDirectoryService), target, intent(inout) :: this character(*), intent(in) :: port_name - class (BaseServer), intent(inout) :: server + class (BaseServer), target, intent(inout) :: server integer, optional, intent(out) :: rc end subroutine connect_to_client @@ -61,9 +61,9 @@ subroutine publish(this, port, server, rc) use pFIO_BaseServerMod import AbstractDirectoryService import PortInfo - class (AbstractDirectoryService), intent(inout) :: this + class (AbstractDirectoryService), target, intent(inout) :: this type(PortInfo), target, intent(in) :: port - class (BaseServer), intent(inout) :: server + class (BaseServer), intent(in) :: server integer, optional, intent(out) :: rc end subroutine diff --git a/pfio/DirectoryService.F90 b/pfio/DirectoryService.F90 index 325beb523acb..47a4cde92ad6 100644 --- a/pfio/DirectoryService.F90 +++ b/pfio/DirectoryService.F90 @@ -286,7 +286,7 @@ end subroutine connect_to_server subroutine connect_to_client(this, port_name, server, rc) class (DirectoryService), target, intent(inout) :: this character(*), intent(in) :: port_name - class (BaseServer), intent(inout) :: server + class (BaseServer), target, intent(inout) :: server integer, optional, intent(out) :: rc class (AbstractSocket), pointer :: sckt @@ -422,9 +422,9 @@ end subroutine connect_to_client ! But it would allow future implementation to query for servers ! or possibly to allow servers to satisfy multiple clients. subroutine publish(this, port, server, rc) - class (DirectoryService), intent(inout) :: this + class (DirectoryService), target,intent(inout) :: this type(PortInfo),target, intent(in) :: port - class (BaseServer), intent(inout) :: server + class (BaseServer), intent(in) :: server integer, optional, intent(out) :: rc character(len=MAX_LEN_PORT_NAME) :: port_name integer :: ierror diff --git a/pfio/MultiGroupServer.F90 b/pfio/MultiGroupServer.F90 index 9fe61430bb41..abbee7fd73dd 100644 --- a/pfio/MultiGroupServer.F90 +++ b/pfio/MultiGroupServer.F90 @@ -440,7 +440,7 @@ subroutine start_back(this, rc) integer, parameter :: stag = 6782 integer :: status - type (StringSet) :: FilesBeingWritten + type (StringSet), target :: FilesBeingWritten allocate(this%serverthread_done_msgs(1)) this%serverthread_done_msgs(:) = .false. @@ -625,10 +625,10 @@ subroutine start_back_writers(rc) integer, pointer :: g_4d(:,:,:,:), l_4d(:,:,:,:), g_5d(:,:,:,:,:), l_5d(:,:,:,:,:) integer :: d_rank, request_id integer(kind=INT64) :: msize_word, s0, e0, s1, e1, s2, e2, s3, e3, s4, e4, s5, e5 - type (StringAttributeMap) :: vars_map + type (StringAttributeMap), target :: vars_map type (StringAttributeMapIterator) :: var_iter - type (IntegerMessageMap) :: msg_map - type (IntegerMessageMapIterator) :: msg_iter + type (IntegerMessageMap), target :: msg_map + type (IntegerMessageMapIterator) :: msg_iter class (*), pointer :: x_ptr(:) integer , allocatable :: buffer_v(:) diff --git a/pfio/tests/pfio_ctest_io.F90 b/pfio/tests/pfio_ctest_io.F90 index ff00a0b4795c..df8da3c881eb 100644 --- a/pfio/tests/pfio_ctest_io.F90 +++ b/pfio/tests/pfio_ctest_io.F90 @@ -457,7 +457,7 @@ program main integer :: rank, npes, ierror, provided,required integer :: status, color, key - class(BaseServer),allocatable :: iserver,oserver + class(BaseServer), target, allocatable :: iserver,oserver class(AbstractDirectoryService), allocatable, target :: directory_service type (CommandLineOptions0) :: options From 9a83750115e97294283d0c9ae07c5f41f8d6f8b8 Mon Sep 17 00:00:00 2001 From: Benjamin Auer Date: Fri, 8 Dec 2023 14:38:03 -0500 Subject: [PATCH 06/11] change iterator pattern for apparent NAG bug in HConfig --- gridcomps/ExtData2G/ExtDataConfig.F90 | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gridcomps/ExtData2G/ExtDataConfig.F90 b/gridcomps/ExtData2G/ExtDataConfig.F90 index c4ed2cbf8d39..dad14c2c771f 100644 --- a/gridcomps/ExtData2G/ExtDataConfig.F90 +++ b/gridcomps/ExtData2G/ExtDataConfig.F90 @@ -87,8 +87,8 @@ recursive subroutine new_ExtDataConfig_from_yaml(ext_config,config_file,current_ if (ESMF_HConfigIsDefined(input_config,keyString="Samplings")) then temp_configs = ESMF_HConfigCreateAt(input_config,keyString="Samplings",_RC) - hconfigIter = ESMF_HConfigIterBegin(temp_configs) hconfigIterBegin = ESMF_HConfigIterBegin(temp_configs) + hconfigIter = hconfigIterBegin hconfigIterEnd = ESMF_HConfigIterEnd(temp_configs) do while (ESMF_HConfigIterLoop(hconfigIter,hconfigIterBegin,hconfigIterEnd)) hconfig_key = ESMF_HConfigAsStringMapKey(hconfigIter,_RC) @@ -96,12 +96,14 @@ recursive subroutine new_ExtDataConfig_from_yaml(ext_config,config_file,current_ ts = ExtDataTimeSample(single_sample,_RC) call ext_config%sample_map%insert(trim(hconfig_key),ts) enddo + call ESMF_HConfigDestroy(temp_configs) end if if (ESMF_HConfigIsDefined(input_config,keyString="Collections")) then temp_configs = ESMF_HConfigCreateAt(input_config,keyString="Collections",_RC) - hconfigIter = ESMF_HConfigIterBegin(temp_configs) + call ESMF_HConfigFileSave(temp_configs,"temp_file.yaml") hconfigIterBegin = ESMF_HConfigIterBegin(temp_configs) + hconfigIter = hconfigIterBegin hconfigIterEnd = ESMF_HConfigIterEnd(temp_configs) do while (ESMF_HConfigIterLoop(hconfigIter,hconfigIterBegin,hconfigIterEnd)) hconfig_key = ESMF_HConfigAsStringMapKey(hconfigIter,_RC) @@ -111,12 +113,13 @@ recursive subroutine new_ExtDataConfig_from_yaml(ext_config,config_file,current_ ds = ExtDataFileStream(single_collection,current_time,_RC) call ext_config%file_stream_map%insert(trim(hconfig_key),ds) enddo + call ESMF_HConfigDestroy(temp_configs) end if if (ESMF_HConfigIsDefined(input_config,keyString="Exports")) then temp_configs = ESMF_HConfigCreateAt(input_config,keyString="Exports",_RC) - hconfigIter = ESMF_HConfigIterBegin(temp_configs) hconfigIterBegin = ESMF_HConfigIterBegin(temp_configs) + hconfigIter = hconfigIterBegin hconfigIterEnd = ESMF_HConfigIterEnd(temp_configs) do while (ESMF_HConfigIterLoop(hconfigIter,hconfigIterBegin,hconfigIterEnd)) hconfig_key = ESMF_HConfigAsStringMapKey(hconfigIter,_RC) @@ -140,8 +143,9 @@ recursive subroutine new_ExtDataConfig_from_yaml(ext_config,config_file,current_ if (ESMF_HConfigIsDefined(input_config,keyString="Derived")) then temp_configs = ESMF_HConfigCreateAt(input_config,keyString="Derived",_RC) - hconfigIter = ESMF_HConfigIterBegin(temp_configs) + !hconfigIter = ESMF_HConfigIterBegin(temp_configs) hconfigIterBegin = ESMF_HConfigIterBegin(temp_configs) + hconfigIter = hconfigIterBegin hconfigIterEnd = ESMF_HConfigIterEnd(temp_configs) do while (ESMF_HConfigIterLoop(hconfigIter,hconfigIterBegin,hconfigIterEnd)) hconfig_key = ESMF_HConfigAsStringMapKey(hconfigIter,_RC) From e9406a76f20497383408cc97bc40f408bdce9f67 Mon Sep 17 00:00:00 2001 From: Benjamin Auer Date: Fri, 8 Dec 2023 14:43:03 -0500 Subject: [PATCH 07/11] remove commented out line --- gridcomps/ExtData2G/ExtDataConfig.F90 | 1 - 1 file changed, 1 deletion(-) diff --git a/gridcomps/ExtData2G/ExtDataConfig.F90 b/gridcomps/ExtData2G/ExtDataConfig.F90 index dad14c2c771f..d89748ea506e 100644 --- a/gridcomps/ExtData2G/ExtDataConfig.F90 +++ b/gridcomps/ExtData2G/ExtDataConfig.F90 @@ -143,7 +143,6 @@ recursive subroutine new_ExtDataConfig_from_yaml(ext_config,config_file,current_ if (ESMF_HConfigIsDefined(input_config,keyString="Derived")) then temp_configs = ESMF_HConfigCreateAt(input_config,keyString="Derived",_RC) - !hconfigIter = ESMF_HConfigIterBegin(temp_configs) hconfigIterBegin = ESMF_HConfigIterBegin(temp_configs) hconfigIter = hconfigIterBegin hconfigIterEnd = ESMF_HConfigIterEnd(temp_configs) From 4d0a82174265d15ba6e9029aefa0341d9fd7536e Mon Sep 17 00:00:00 2001 From: Benjamin Auer Date: Fri, 8 Dec 2023 14:43:41 -0500 Subject: [PATCH 08/11] remove debugging yaml dump --- gridcomps/ExtData2G/ExtDataConfig.F90 | 1 - 1 file changed, 1 deletion(-) diff --git a/gridcomps/ExtData2G/ExtDataConfig.F90 b/gridcomps/ExtData2G/ExtDataConfig.F90 index d89748ea506e..5307b39209bd 100644 --- a/gridcomps/ExtData2G/ExtDataConfig.F90 +++ b/gridcomps/ExtData2G/ExtDataConfig.F90 @@ -101,7 +101,6 @@ recursive subroutine new_ExtDataConfig_from_yaml(ext_config,config_file,current_ if (ESMF_HConfigIsDefined(input_config,keyString="Collections")) then temp_configs = ESMF_HConfigCreateAt(input_config,keyString="Collections",_RC) - call ESMF_HConfigFileSave(temp_configs,"temp_file.yaml") hconfigIterBegin = ESMF_HConfigIterBegin(temp_configs) hconfigIter = hconfigIterBegin hconfigIterEnd = ESMF_HConfigIterEnd(temp_configs) From bc5ca5dbe8cba60ffb3414102d79fd07a6fa9380 Mon Sep 17 00:00:00 2001 From: Tom Clune Date: Fri, 8 Dec 2023 15:22:33 -0500 Subject: [PATCH 09/11] More fixes for using NAG. - Also a cmake fix for OS X. --- CHANGELOG.md | 2 ++ CMakeLists.txt | 4 ++++ base/MAPL_Config.F90 | 3 ++- base/tests/mapl_bundleio_test.F90 | 4 ++-- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4306ae5715c2..ceaf62ff92d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Corrected some unit tests (and test utilities) to fix dangling pointers detected by NAG. Most (possibly all) of these changes are already on release/MAPL-v3, but it was getting annoying to have NAG fail unit tests with develop branch. +- Fix for CMake an Apple. Needs to set `__DARWIN` as an fpp flag. (Only used by NAG, but ...) + ### Removed ### Deprecated diff --git a/CMakeLists.txt b/CMakeLists.txt index af1e66536d35..3253cc3c9df8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -220,6 +220,9 @@ include(CheckCompilerCapabilities) if(SUPPORT_FOR_MPI_IERROR_KEYWORD) add_compile_definitions(SUPPORT_FOR_MPI_IERROR_KEYWORD) endif() +if (APPLE) + add_compile_definitions("-D__DARWIN") +endif() add_subdirectory (pfio) add_subdirectory (profiler) @@ -242,6 +245,7 @@ if (PFUNIT_FOUND) add_subdirectory (pfunit EXCLUDE_FROM_ALL) endif () + # Support for automated code generation include(mapl_acg) include(mapl_create_stub_component) diff --git a/base/MAPL_Config.F90 b/base/MAPL_Config.F90 index 9cae1e8cdb2c..f31daf1cc93d 100644 --- a/base/MAPL_Config.F90 +++ b/base/MAPL_Config.F90 @@ -72,7 +72,6 @@ function MAPL_ConfigCreate(unusable, rc) result(config) #endif character, parameter :: NUL = achar(00) !! what it says - _UNUSED_DUMMY(unusable) config = ESMF_ConfigCreate(rc=rc) config%cptr%buffer(1:1) = EOL config%cptr%buffer(2:2) = EOB @@ -80,6 +79,8 @@ function MAPL_ConfigCreate(unusable, rc) result(config) config%cptr%next_line = 1 config%cptr%value_begin = 1 + _RETURN(_SUCCESS) + _UNUSED_DUMMY(unusable) end function MAPL_ConfigCreate !------------------------------------------------------------------------------ diff --git a/base/tests/mapl_bundleio_test.F90 b/base/tests/mapl_bundleio_test.F90 index be606ce717a5..ad9981c858c6 100644 --- a/base/tests/mapl_bundleio_test.F90 +++ b/base/tests/mapl_bundleio_test.F90 @@ -150,7 +150,7 @@ function create_cf(grid_name,im_world,jm_world,nx,ny,lm,cs_stretch_param,rc) res call MAPL_ConfigSetAttribute(cf,value=dateline, label=trim(grid_name)//".DATELINE:",_RC) end if - + _RETURN(_SUCCESS) end function create_cf function create_gridname(im,jm,date,pole) result(gridname) @@ -260,7 +260,7 @@ program ut_ReGridding call UnpackGridName(Gridname,im_world_new,jm_world_new,dateline_new,pole_new) lm_world=3 - cfoutput = create_cf(gridname,im_world_new,jm_world_new,nx,ny,lm_world,cs_stretch_param,_RC) + cfoutput = create_cf(trim(gridname),im_world_new,jm_world_new,nx,ny,lm_world,cs_stretch_param,_RC) grid_new=grid_manager%make_grid(cfoutput,prefix=trim(gridname)//".",_RC) bundle=ESMF_FieldBundleCreate(name="cfio_bundle",_RC) call ESMF_FieldBundleSet(bundle,grid=grid_new,_RC) From e98954c3d1da24b0731d28b05c01d206633bc47c Mon Sep 17 00:00:00 2001 From: Tom Clune Date: Fri, 8 Dec 2023 16:02:42 -0500 Subject: [PATCH 10/11] All ctests now pass with NAG. --- gridcomps/ExtData2G/ExtDataConfig.F90 | 2 +- gridcomps/ExtData2G/ExtDataGridCompNG.F90 | 2 +- .../ExtData2G/ExtDataOldTypesCreator.F90 | 39 ++++++++++--------- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/gridcomps/ExtData2G/ExtDataConfig.F90 b/gridcomps/ExtData2G/ExtDataConfig.F90 index 5307b39209bd..6ee6f96af98f 100644 --- a/gridcomps/ExtData2G/ExtDataConfig.F90 +++ b/gridcomps/ExtData2G/ExtDataConfig.F90 @@ -189,7 +189,7 @@ end function count_rules_for_item function get_time_range(this,item_name,rc) result(time_range) type(ESMF_Time), allocatable :: time_range(:) - class(ExtDataConfig), intent(in) :: this + class(ExtDataConfig), target, intent(in) :: this character(len=*), intent(in) :: item_name integer, optional, intent(out) :: rc diff --git a/gridcomps/ExtData2G/ExtDataGridCompNG.F90 b/gridcomps/ExtData2G/ExtDataGridCompNG.F90 index 7b53575e600b..0da681786a62 100644 --- a/gridcomps/ExtData2G/ExtDataGridCompNG.F90 +++ b/gridcomps/ExtData2G/ExtDataGridCompNG.F90 @@ -308,7 +308,7 @@ SUBROUTINE Initialize_ ( GC, IMPORT, EXPORT, CLOCK, rc ) _RETURN(ESMF_SUCCESS) end if - config_yaml = ExtDataOldTypesCreator(new_rc_file,time,_RC) + call new_ExtDataOldTypesCreator(config_yaml, new_rc_file, time, _RC) allocate(ITEMNAMES(ITEMCOUNT), STAT=STATUS) _VERIFY(STATUS) diff --git a/gridcomps/ExtData2G/ExtDataOldTypesCreator.F90 b/gridcomps/ExtData2G/ExtDataOldTypesCreator.F90 index 9e588d0b23ee..1abc5720c795 100644 --- a/gridcomps/ExtData2G/ExtDataOldTypesCreator.F90 +++ b/gridcomps/ExtData2G/ExtDataOldTypesCreator.F90 @@ -21,7 +21,9 @@ module MAPL_ExtDataOldTypesCreator use MAPL_ExtDataTimeSample use MAPL_ExtDataTimeSampleMap implicit none + public :: ExtDataOldTypesCreator + public :: new_ExtDataOldTypesCreator type, extends(ExtDataConfig) :: ExtDataOldTypesCreator private @@ -30,28 +32,27 @@ module MAPL_ExtDataOldTypesCreator procedure :: fillin_derived end type ExtDataOldTypesCreator - interface ExtDataOldTypesCreator - module procedure :: new_ExtDataOldTypesCreator - end interface +!# interface ExtDataOldTypesCreator +!# module procedure :: new_ExtDataOldTypesCreator +!# end interface contains - function new_ExtDataOldTypesCreator(config_file,current_time,unusable,rc ) result(ExtDataObj) - character(len=*), intent(in) :: config_file - type(ESMF_Time), intent(in) :: current_time - class(KeywordEnforcer), optional, intent(in) :: unusable - integer, optional, intent(out) :: rc - - type(ExtDataOldTypesCreator) :: ExtDataObj - - integer :: status - - _UNUSED_DUMMY(unusable) - call ExtDataObj%ExtDataConfig%new_ExtDataConfig_from_yaml(config_file,current_time,rc=status) - _VERIFY(status) - - _RETURN(_SUCCESS) - end function new_ExtDataOldTypesCreator + subroutine new_ExtDataOldTypesCreator(extdataobj, config_file,current_time,unusable,rc ) + type(ExtDataOldTypesCreator), target, intent(out) :: ExtDataObj + character(len=*), intent(in) :: config_file + type(ESMF_Time), intent(in) :: current_time + class(KeywordEnforcer), optional, intent(in) :: unusable + integer, optional, intent(out) :: rc + + + integer :: status + + call ExtDataObj%ExtDataConfig%new_ExtDataConfig_from_yaml(config_file,current_time,_RC) + + _RETURN(_SUCCESS) + _UNUSED_DUMMY(unusable) + end subroutine new_ExtDataOldTypesCreator subroutine fillin_primary(this,item_name,base_name,primary_item,time,clock,unusable,rc) From 8b771ee6a80a651a3856af03a11ad319465cc366 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Sun, 10 Dec 2023 11:47:13 -0500 Subject: [PATCH 11/11] Update for release --- CHANGELOG.md | 15 ++++++++++----- CMakeLists.txt | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 07bc9bf77262..46169ef62b46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,18 +11,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +### Fixed + +### Removed + +### Deprecated + +## [2.42.4] - 2023-12-10 + +### Changed + - Improved error message for missing labels in GridManager. ### Fixed - Corrected some unit tests (and test utilities) to fix dangling pointers detected by NAG. Most (possibly all) of these changes are already on release/MAPL-v3, but it was getting annoying to have NAG fail unit tests with develop branch. - - Fix for CMake an Apple. Needs to set `__DARWIN` as an fpp flag. (Only used by NAG, but ...) -### Removed - -### Deprecated - ## [2.42.3] - 2023-12-06 ### Fixed diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e01591ee1b1..c04500255b85 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ endif () project ( MAPL - VERSION 2.42.3 + VERSION 2.42.4 LANGUAGES Fortran CXX C) # Note - CXX is required for ESMF # Set the possible values of build type for cmake-gui