-
Notifications
You must be signed in to change notification settings - Fork 43
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
C stress test failed #149
Comments
Hi @nbelakovski , Could you take a look at this? There is a bug here (I have created a branch to reproduce the bug easily: https://github.com/libprima/prima/tree/c_stress_test_failure). In the new version (which has other issues as you mentioned; I will fix them), the bug is not triggered anymore but we do not know why. There is nothing more scary than a magically disappeared bug. Many thanks. Best regards, |
I think I see the issue. I've been unable to reproduce this locally, even when using the same intel compiler, so the above is theoretical but I think it's a compelling case, particularly since the issue does not arise for cobyla (also note the failed windows test is due to the issue with the setup-fortran action linking the wrong libgfortran which we fixed). Note that calcfc is no longer specified for all algorithms, it appears this was corrected in c85e631. However the potential issue of the user calling
Either option allows the user to call |
We should not set them to an arbitrary normal value if they are not defined yet. (why 0? Why not 1? 100?) If they are not defined yet, then they should have a velue that indicates "uninitialised" (in the mathematical sense, which is different from "uninitialised" in the programming sense). The ideal value would be NaN. This is w very important point. Otherwise, the logic is wrong and it may lead to mysterious bugs. However, here the situation is different. result.x should be x0, and the other should be the constraint value at x0. BTW, I am against passing the value of x0 to Thank you. |
Let me put is in this way: at any moment, the content of "result" should be consistent. It cannot be partially initialised and partially not (unless the initialisation is being done), and it cannot contain values that seems "normal" when it is indeed "uninitialised" (mathematically), giving us the wrong impression that it is initialised when it is indeed not. |
This resolves libprima#149.
I wasn't clear here: result.x and result.nlconstr are pointers, so I meant setting them to NULL (which is also 0), not an arbitrary value. As for the other points we discussed them in your office and I've now opened #180 to implement the changes. |
See the branch
https://github.com/libprima/prima/tree/c_stress_test_failure
and the workflow run
https://github.com/libprima/prima/actions/runs/7934551296/job/21665774763
The text was updated successfully, but these errors were encountered: