Memory leak in ESMPy?
The benchmarks occasionally fail due to high memory usage. It looks like memory consumption is accumulating over regrid calls, or (less likely) regridder instantiations.
This is could be memory leak in EDMF or ESMPy.
However, ESMPy grids and meshes have a destroy()
method (and free_memory()
for meshes). the Regrid class also has destroy()
. So I guess we need finalize()
for adapters too.
The docs of ESMPy Regrid say:
ESMF_FieldRegridRelease() is called when the Regrid object goes out of scope (this only happens when the Manager goes out of scope, there is a destroy() call for explicit deallocation of the Regrid).
Sothis might be the problem with benchmarks that might re-run the setup code for multiple trials(?).
Edited by Martin Lange