-
Notifications
You must be signed in to change notification settings - Fork 604
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++ debugging nlopt #474
Comments
I am having the same issue (with LD_MMA, e.g., but different large numbers as result values). I am currently investigating the source code as to where such a result code could even come from, but to no luck so far. What you can do is to use I could tell you that this lack of debuggability is also the case when using the C interface, but that won't help you either, unfortunately. |
Some further insights after stepping through my program:
nlopt::result res = nlopt::result::SUCCESS; // use an initialisation here in order not to get the large number
std::exception_ptr nloptException = nullptr;
try {
res = opt.optimize(u0, minf); // if this throws, the error code is still in its initialised state
} catch (...) {
nloptException = std::current_exception();
} |
I have found out, that that error code does not mean anything (as you said its just "random" value ). When I get this big value, I know that something is wrong in terms of implementation (wrong number of boundaries, C++ syntax error, wrong usage of nlopt functions, ...). |
Hi, I am sorry for maybe a vague question but is there a way to find out (debug/verbose/...) why nlopt fails? I am using C++ API and the only exception is that the nlopt returns
nlopt failure
after a few iterations and from that, I cannot find any clue. The numeric code of theresult
is a weird number (99968768). Therefore I would like to ask what can someone do in order to debug nlopt?The text was updated successfully, but these errors were encountered: