Why are you calling the direct.c code directly?   You can call it via the 
documented NLopt interface with the algorithm GN_DIRECT_L.

On Mar 6, 2014, at 5:00 AM, Peter Rockett <[email protected]> wrote:

> Hi
> 
> I was wanting to experiment with the DIRECT solver in nlopt. Downloaded, 
> built, OK. The test example tstc.c in the /direct directory looks absolutely 
> perfect for my use. But when I try to build this test case, I get a 
> compilation error. The call to direct_optimize() in /direct/tstc.c has 17 
> arguments whereas the function prototype in /direct/direct.h has 20 
> arguments. Moreover, the following three parameters are undocumented in 
> /direct/direct_wrap.c
> 
> double start
> double maxtime
> int* force_stop
> 
> It is a little difficult to figure out what is missing because many of the 
> arguments in tstc.c call are literal constants but my guess is that i) the 
> above three have been added at some time but tstc.c has not been updated, ii) 
> updating the documentation in direct_wrap.c has been overlooked. I have had a 
> look at the code downstream but it very rapidly degenerates to the output 
> from f2c which is not the most readable stuff in the world!
> 
> Regardless, the nlopt code does not appear to build 'out of the box'.
> 
> Would you be able to advise on this?
> 
> Best wishes,
> 
> Peter Rockett
> EEE
> University of Sheffield
> 
> 
> 


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

Reply via email to