Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic fix to make sure NetCDF files get closed #485

Merged
merged 1 commit into from
Dec 22, 2022

Conversation

mattw-nws
Copy link
Contributor

@mattw-nws mattw-nws commented Dec 22, 2022

Fixes #481. Seems to do the job in serial and parallel builds.

Additions

  • static function data_access::NetCDFPerFeatureDataProvider::cleanup_shared_providers()

Removals

Changes

  • Calls above static function in Formulation_Manager destructor.

Testing

Screenshots

Notes

Todos

Checklist

  • PR has an informative and human-readable title
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows project standards (link if applicable)
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future todos are captured in comments
  • Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
  • Reviewers requested with the Reviewers tool ➡️

Testing checklist (automated report can be put here)

  1. Passing all auto tests. Tested on data in ./data/forcing with mixed realization with NetCDF and CSV forcing in different catchments, serial and parallel builds (2 partitions). Not seeing any H5Dclose errors.

Target Environment support

  • Linux

@mattw-nws mattw-nws marked this pull request as ready for review December 22, 2022 17:53
@hellkite500
Copy link
Member

Two notes:

Should probably add a simple unit test of the cleanup function...

I would consider adding the cleanup_shared_providers to the DataProvider interface as a virtual function...or we could go a step further and build a SharedDataProvider subclass if we think there are enough significant differences between shared providers and non-shared...

@hellkite500 hellkite500 mentioned this pull request Dec 22, 2022
9 tasks
@mattw-nws mattw-nws merged commit 75641b8 into NOAA-OWP:master Dec 22, 2022
@mattw-nws mattw-nws deleted the issue-481 branch December 22, 2022 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HDF5 already closed error when NetCDF forcing is used
2 participants