Thank you for the reply. COBYLA *didn't* print anything. And I tracked back the NLOPT_FAILURE result.
It become a bit clear. >C++ interface (nlopt.hpp) that return code causes it >to throw a std::runtime_error exception Oh, I didn't know this specification. >(I should probably return ROUNDOFF_LIMITED instead of NLOPT_FAILURE in Yes, I think it is better to do so. I don't specify any parameter that let COBLYA converge to greater accuracy than machine precision allows. Well, then how can I avoid this exception? Please let me know what kind of setting will avoid this exception and let NLopt return with positive return code. > >On Nov 27, 2011, at 12:24 PM, Yoji Imashuku wrote: >> In my code(C++), I use try/catch to catch exceptions, and as you say >> COBYLA does not print anything. >> I debugged the code to determine the reason for the exception and >> found >> "cobyla: rounding errors are becoming damaging." > >Re-reading your description, I'm confused. Are you saying that it >*doesn't* print anything? But then what do you mean by that this is >the "reason for the exception?" > >Note that if COBYLA fails because of roundoff errors at that point in >the code, it returns NLOPT_FAILURE, which gets passed back to the >user. But in the C++ interface (nlopt.hpp) that return code causes it >to throw a std::runtime_error exception, as documented in the manual. > >Do you mean that you got a std::runtime_error exception, and you >tracked back the NLOPT_FAILURE result to the same lines of code as >those in COBYLA which print the "roundoff errors becoming damaging" >error? If so, that may not be a bug; it may be the expected behavior >if you are asking COBLYA to try to converge to greater accuracy than >machine precision allows. > >(I should probably return ROUNDOFF_LIMITED instead of NLOPT_FAILURE in >that particular case, which will throw an nlopt::roundoff_limited >exception in the C++ interface). > >Steven > >_______________________________________________ >NLopt-discuss mailing list >[email protected] >http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss _______________________________________________ NLopt-discuss mailing list [email protected] http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss
