Open yantosca opened 9 months ago
@msulprizio @lizziel @christophkeller: I now know where the memory leak is being incurred. In HEMCO/src/Core/hco_config_mod.F90
there is a FileData object (Dta
) that is a local variable that gets allocated, and pointed to by the linked list.
The Dta
object is also needed further down in the loop for those entries in HEMCO_Config.rc
that use -
as the file name (i.e. using the file that is immediately above it).
I tried to replace Dta
with Lct%Dct%Dta
, which would get rid of the memory leak, but then the Dta
object would not be present for those entries that use -
.
I just wanted to note this. It might be going deep into the rabbit hole to try to undo this memory leak, so I will probably put this off for the time being. If any of you have suggestions then let me know. Thanks!
This issue has been automatically marked as stale because it has not had recent activity. If there are no updates within 7 days it will be closed. You can add the "never stale" tag to prevent the Stale bot from closing this issue.
Name and Institution (Required)
Name: Bob Yantosca Institution: Harvard + GCST
Confirm you have reviewed the following documentation
Describe the update
This is a placeholder PR and should not yet be merged. I have made the base branch
main
but will change it later.This is a companion PR to geoschem/geos-chem#2102. Configuring GEOS-Chem with
-DSANITIZE=y
has revealed the following memory leaks in GEOS-Chem and HEMCO:Leak 1 is in HEMCO. We are still investigating.
The other leaks are being addressed in https://github.com/geoschem/geos-chem/pull/2104.
Tagging @msulprizio @lizziel
Expected changes
This will be a zero-diff update that will remove memory leaks. It will not change results.
Reference(s)
N/A
Related Github Issue(s)