close file handles in CarpetHDF5 reader when VisIt closes files

Issue #1484 closed
Roland Haas created an issue

The VisIt plugin contains some caching logic for the HDF5 file metadata (namely which datasets exist in which file, can be disabled by setting the environment variable CARPETHDF5_CACHE_METADATA to "no"). There is a design flaw in this code that causes it to never close the HDF5 file handle which in turn causes libHDF5 to use up memory and (importantly) to not free the OS file handle. With large runs and many variables it is quite possible to run out of file descriptors.

The attached patch tries to correct this by freeing the HDF5 handle when VisIt closes a file (but keeps the cached metadata in memory).

Keyword: CarpetHDF5

Comments (4)

  1. Erik Schnetter
    • changed status to open
    • removed comment

    Nobody seems to feel comfortable enough with this code to review the patch. Please apply.

  2. Log in to comment