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

Kernel dying when repeatedly accessing OutputReader.hydrograph #288

Open
huard opened this issue Jun 1, 2023 · 3 comments
Open

Kernel dying when repeatedly accessing OutputReader.hydrograph #288

huard opened this issue Jun 1, 2023 · 3 comments

Comments

@huard
Copy link
Collaborator

huard commented Jun 1, 2023

  • RavenPy version: 0.12
  • Python version: 3.9
  • Operating System: Linux

Description

The CANOPEX notebook had kernel failures that seem to be resolved by accessing out.hydrograph.q_sim only once.
For some reason, making multiple calls to xr.open_dataset seem to create problems.

This probably calls for caching the opened file.

@huard
Copy link
Collaborator Author

huard commented Nov 2, 2023

Similar issue observed with #320, where repeated calls to from_nc methods to create the model configuration slowed down the calculations and generated apparently random kernel failures.

@Zeitsperre
Copy link
Member

This is definitely a cause of many failures, both here and elsewhere. The tests that tend to fail with segfaults are those that rely on many open_dataset calls. Whether this is related to the async troubles with libnetcdf or not, we should try reducing the read operations if possible. Maybe having pytest fixtures that yield copied objects would be safer?

@huard
Copy link
Collaborator Author

huard commented Nov 2, 2023

This issue is seen in notebooks that describe real use cases, not in the test suite, so it's bit trickier. I think for the moment we can "solve" this by documenting the problem. Could you link to online resources that capture the issue?

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

No branches or pull requests

2 participants