Thanks and sorry for the noise.
Yes, I call NLopt from a single thread.
FYI, seems the problem is a LAPACK call (dsyevr) that returns correct eigenvalues and wrong eigenvectors if called from multiple threads.
Investigating if it is my fault or I'm misusing the system library.
Thanks!
                        mario

On 26-May-11 18:39, Steven G. Johnson wrote:

On May 25, 2011, at 9:01 AM, Mario Valle wrote:
I use NLopt from the C++ interface on Linux. The optimizer is: nlopt::LD_LBFGS. Everything worked perfectly until I changed the function to be optimized to use OpenMP and BLAS. Now seems I have conflicts between OpenMP and my BLAS library (not related to NLopt, I hope).

I assume that you are calling NLopt from a single thread, and that only your objective function is multi-threaded with OpenMP. In that case there shouldn't be any possibility of conflict.

My problem is that NLopt raises the generic exception "nlopt failure" when the gradient vector contains -Inf values.

Is there a more precise error reporting mechanism in NLopt or should I rely on printf statements in my function?

No, there are no more precise error codes; if you have inf (or nan) values in your gradient, that will cause problems, so you will want to fix your objective function.

Steven

_______________________________________________
NLopt-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss

--
Ing. Mario Valle
Data Analysis and Visualization Group            | http://www.cscs.ch/~mvalle
Swiss National Supercomputing Centre (CSCS)      | Tel:  +41 (91) 610.82.60
v. Cantonale Galleria 2, 6928 Manno, Switzerland | Fax:  +41 (91) 610.82.82


_______________________________________________
NLopt-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss

Reply via email to