Issue #3 resolved

Error running tests

created an issue

After installing all the dependencies (in Debian) and compiling the library (with no errors) I obtain the following output from the test bayesopttest:

{{{ Running C++ interface Bounds: 1 1 Sampling initial points... 1 ... 1 Initial theta: 1 Error:-4 Final theta: 1 DONE Error:-2 Iteration: 1 of 300 | Total samples: 31 Trying point at: 1 Best found at: 1 Best outcome: 10.0004 Error:-2 ... }}}

( Full output: )

I traced the error to function: nlopt_optimize

Any idea of what is wrong?

Your library looks great, thank you for sharing.

Comments (12)

  1. Ruben Martinez-Cantin repo owner

    Ignore error code -4. It is a warning about reaching the maximum number of iterations. But the result is good. On the other hand, error code -2 is important. Are you using the latests version (commit 63437ecfb410)?

    Which version of Debian, boost and nlopt are you using? In Ubuntu 11.x, I can't reproduce the problem.

  2. B0RJA reporter

    I have tested the library on another debian machine and I only get error code -4:

    Running C++ interface
    Sampling initial points...
    Initial theta: [1](0.06)
    Final theta: [1](0.185134)
    Iteration: 1 of 300 | Total samples: 31
    Trying point at: [1](0.55973)
    Best found at: [1](0.510021)
    Best outcome: 10.0004
    Iteration: 300 of 300 | Total samples: 330
    Trying point at: [1](0.559728)
    Best found at: [1](0.510021)
    Best outcome: 10.0004
    Final result C++: [1](0.510021)
    Final result C: (0.510021, )
    Elapsed time in C++: 79.44 seconds
    Elapsed time in C: 79.77 seconds

    I suposse something is wrong in my system not related to your library. Please, close the issue.

    The elapsed time in my computer is much smaller:

    Elapsed time in C++: 0.22 seconds
    Elapsed time in C: 0.2 second

    perhaps numpy is not running. I will write you if find the solution.

    Thanks for replying.

  3. B0RJA reporter

    The library works fine in Debian stable. I have tested in four different machines having problems only with (the one) Debian testing. I'm having other issues with this machine so I really think the problem is not related to your library.

  4. Ruben Martinez-Cantin repo owner

    Although DIRECT does not require initial point (therefore it was not initialized), NLOPT still checks if it is inside the search bounds. Returning the -2 error if it was not.

    It should be fixed in the last commit.

  5. B0RJA reporter

    I have tested the last commit and there are no more errors.

    I want to use your library to optimize (many) parameters in different fields of numerical simulation. Currently, I am using genetic algorithms for this task. My simulations are time consuming and I first need to implement your library with MPI to execute on cluster. I'll keep you informed of the results.

    Thank you very much for your support.

  6. Log in to comment