Skip to content
This repository has been archived by the owner on Oct 23, 2020. It is now read-only.

Commit

Permalink
Remove vestigal calls to config pool routines from halo exchanges.
Browse files Browse the repository at this point in the history
Consequentially removes memory leak in halo reuse.
  • Loading branch information
Larofeticus committed Mar 13, 2018
1 parent 9e729cd commit 6f00f13
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/framework/mpas_dmpar.F
Original file line number Diff line number Diff line change
Expand Up @@ -6800,8 +6800,6 @@ subroutine mpas_dmpar_exch_group_add_field(domain, groupName, fieldName, timeLev
do while (associated(exchGroupPtr))
if ( nLen == exchGroupPtr % nLen) then
if ( groupName(1:nLen) == exchGroupPtr % groupName(1:exchGroupPtr % nLen) ) then
call mpas_pool_add_config(exchGroupPtr % fieldPool, fieldName, timeLevelLocal)

! Add field to exchange group's fieldList
if ( associated(exchGroupPtr % fieldList) ) then
! If the field is already added, find it.
Expand Down Expand Up @@ -6923,9 +6921,6 @@ subroutine mpas_dmpar_exch_group_remove_field(domain, groupName, fieldName, iErr
do while (associated(exchGroupPtr))
if ( nLen == exchGroupPtr % nLen) then
if ( groupName(1:nLen) == exchGroupPtr % groupName(1:exchGroupPtr % nLen) ) then
! Remove after the transition to exchange_field_lists is complete
call mpas_pool_remove_config(exchGroupPtr % fieldPool, fieldName)
if ( associated(exchGroupPtr % fieldList) ) then
exchFieldListPtr => exchGroupPtr % fieldList
nullify(prevFieldListPtr)
Expand Down Expand Up @@ -7320,8 +7315,6 @@ subroutine mpas_dmpar_exch_group_reuse_halo_exch(domain, groupName, timeLevel, h
else
exchFieldListPtr % haloLayers(:) = .true.
end if
call mpas_pool_remove_config(exchGroupPtr % fieldPool, exchFieldListPtr % fieldName)
call mpas_pool_add_config(exchGroupPtr % fieldPool, exchFieldListPtr % fieldName, timeLevelLocal)
exchFieldListPtr => exchFieldListPtr % next
end do
end if
Expand Down

0 comments on commit 6f00f13

Please sign in to comment.