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

Error when using large maxbounds (acces violation?) #26

Closed
martinveenvlietrhdhv opened this issue Aug 1, 2023 · 5 comments · Fixed by #29
Closed

Error when using large maxbounds (acces violation?) #26

martinveenvlietrhdhv opened this issue Aug 1, 2023 · 5 comments · Fixed by #29

Comments

@martinveenvlietrhdhv
Copy link

martinveenvlietrhdhv commented Aug 1, 2023

Hello,

When using a large maxbound on stress period data (for example recharge, maxbound = 50000) an error occurs when loading the ListInput class for viewing (and adjusting) transient data. I'm testing with a simple dataset (recharge on 1 cell only), but have tested it with other datasets as well (I guess maxbound is only used for memory purposes, so the dataset itself shouldn't matter as long as it is smaller than maxbound, but have tested larger sets as well just to be sure). I'm using modflow 6.4.2.

Unfortunately the error is quite vague and almost seems to occur randomly (does not seem to occur for all stress packages or all models, however always occurs with rather large models and higher maxbounds):
Process finished with exit code -1073741819 (0xC0000005)

It seems to be some access violation. I have tried running the model on multiple IDEs, locations and with a clean install (only installing the modflow API and it's dependencies), yet the ListInput remains inaccessible.

However, when I lower the maxbound to, for example, 40000 the modflow API loads just fine and the ListInput class for transient data is accessible.

In all cases the Modflow model itself runs fine (and also loads fine in FloPy, just not in the modflow API). It is even possible to run the models through the API with callback (so there seems nothing wrong with the input), it is just not possible to access the ListInput for recharge in this case.

@jlarsen-usgs
Copy link
Contributor

@martinveenvlietrhdhv

Can you zip up and send me a copy of your test model. I'd like to see if I can re-create the issue and track down where the error is occurring.

@martinveenvlietrhdhv
Copy link
Author

I've shared a copy of the model through email with Jlarsen

@jlarsen-usgs
Copy link
Contributor

@martinveenvlietrhdhv

I have a copy of the model. Working on it today

jlarsen-usgs added a commit that referenced this issue Aug 8, 2023
…array

update(_ptr_to_recarray): slice pointers prior to setting data to recarray

Closes #26
@jlarsen-usgs
Copy link
Contributor

@martinveenvlietrhdhv

The issue is fixed. It seemed to be a problem with slicing pointers and setting the data in a single line. Large data sets were failing, but now pass when we slice the pointer first and then set it to the numpy recarray

@martinveenvlietrhdhv
Copy link
Author

Works nicely now! Thank you for looking into the issue and fixing it!

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 a pull request may close this issue.

2 participants