-
Notifications
You must be signed in to change notification settings - Fork 94
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
#663 Fix crash when calling ecl_grid_reset_actnum #664
Conversation
Can one of the admins verify this patch? |
I was assigned to this, but I am the submitter. If there is any need to modify the patch, please let me know, but AFAIK this hasn't been evaluated yet. Unassigned myself. |
Thank you for your patch @lindkvis 👍 We will need some time to go through the consequences of the change. We will get back to you as soon as possible. |
@lindkvis Sorry for the late reply! We have looked at the relevant code now and we think there might be an issue with your patch. In particular, Also, could you please provide a test that fails on the current implementation that verifies the new patch? |
Dear @lindkvis. We are preparing a new release of libecl now. Are you interested in pushing this issue so that we get it in before that? I know that you are not necessarily following the releases of libecl, but I think potential bug-fixes etc would be easier to handle if we sync up a bit... |
@markusdregi . I have updated the pull request following review. Because we have to alter the coarse cell indices as well, which is in a private scope inaccessible from ecl_grid that led to a new method in ecl_coarse_cell. Please advice if this isn't what you meant. As for data, we are not at liberty to share this and have no sharable data. I can at least ask @hhgs if he is able to make it available to you for testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The proposed solution seems correct now but I think there may be some unnecessary lines of code, I have added a few comments, please have a look at them, this PR is almost ready for merge
And thanks for putting efforts into this ;)
lib/ecl/ecl_grid.cpp
Outdated
} | ||
} else { | ||
ecl_coarse_cell_type * coarse_cell = ecl_grid_iget_coarse_group(ecl_grid, cell->coarse_group); | ||
ecl_coarse_cell_reset_active_index(coarse_cell, cell->active); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If my comment in ecl_coarse_grid.cpp
is correct, then we do not need to loop through all the cells in order to retrieve the coarse cells. We can directly access the list of coarse cells in the grid and reset them all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the pull request. I don't really have any more time to put into this so I hope this is acceptable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for all your efforts 👍
Too bad we don't have a test for this, if you'll ever find a dataset with coarse cells that can be made freely available, please let us know
jenkins test this please |
Issue
Resolves #663
Approach