-
Notifications
You must be signed in to change notification settings - Fork 95
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
Summary restart load fix #305
Conversation
252129f
to
754f04c
Compare
8a3cfe4
to
3ba55aa
Compare
python/tests/ecl_tests/test_sum.py
Outdated
with pushd("subdir"): | ||
prediction = create_case( case = "PREDICTION", restart_case = restart_case, data_start = history.end_date) | ||
prediction.fwrite() | ||
|
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 think you need to explain what you are thinking here.
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.
This was to reproduce / test a reasonably contrived bug. Have added documentation describing the situation which used to fail.
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.
What is scope()
for?
3ba55aa
to
a96e96c
Compare
The loading of a restarted case was wrong in the summary loader when the restarted case was given as an absolute pathname.
a96e96c
to
e874913
Compare
Weird construction - removed; better implemented with a function. |
e874913
to
3cb324f
Compare
3cb324f
to
67e9beb
Compare
I'm working on this in-between other things, so the pace is not exactly hyper speed. But, I can confirm that I reproduce the exact same failure locally on my machine. I'll start digging now.. |
It is Here (https://github.com/joakim-hove/libecl/blob/67e9bebe925631086743c06491bf68c94124bb01/lib/ecl/ecl_smspec.c#L508) I'm expecting that the reason it kicks in now is because you are interpreting the paths now as absolute paths. And that it kicks in only on macOS because the prefix of any I hope that helps ;) |
Thank you - hopefully I can take it from here. |
No problem. If you just enforce the path in the test to be more than 64 characters long it should burn on your machine as well.. If you do not figure it out, we can discuss it further in Thursday :) |
Thank you - this is a semi-old bug which was unearthed now.
It should be: if (restart_case) {
if (strlen(restart_case) <= (SUMMARY_RESTART_SIZE * ECL_STRING8_LENGTH))
ecl_smspec->restart_case = util_alloc_string_copy( restart_case );
} i.e. nothing should be done if the test fails - that is actually semi-ok. |
22d33ee
to
129952b
Compare
129952b
to
67ee923
Compare
OK @pgdr - I have tried to address your comments and now this green on Travis - further comments? |
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.
No further comments, good work!
#319 has been rebased on top of this - they need to be merged together. Closing this |
Task
Bug when loading a restarted summary case when the restarted source was given as an absolute path.
The first commit is the fix.
The two middle commits are test refactoring, the last commit is a test of the fix.
NB: This fix unearthed another bug/problem which comes in the Statoil testdata. That problem is fixed here: #319.