NOMAD.jl
NOMAD.jl copied to clipboard
NOMAD exception
I get sometimes this exception:
NOMAD exception (report to developper):
NOMAD::Exception thrown (/workspace/srcdir/nomad/src/Param/PbParameters.cpp, 174) Invalid Parameter. Check: LOWER_BOUND is equal to UPPER_BOUND at index 2. Value = 0
terminate called after throwing an instance of 'NOMAD_4_3::Exception'
what(): NOMAD::Exception thrown (/workspace/srcdir/nomad/src/Algos/../Cache/CacheBase.hpp, 165) Cannot get instance. A non-virtual object derived from CacheBase must be instantiated first. For example, call CacheSet::setInstance() ONCE before calling CacheBase::getInstance()
If I restart Julia and try again it works. Any idea?
Additional finding: It seams to happen always if I did create a plot with PyPlot.jl BEFORE calling NOMAD.
@ufechner7 Could I see the characteristics of your blackbox ? For example,
- is it a multithread julia function ? In this case, NOMAD.jl is not really robust.
- I can also see the following error on your log
Check: LOWER_BOUND is equal to UPPER_BOUND at index 2. Value = 0
Did you try to fix a variable ?
@ufechner7 Could I see the characteristics of your blackbox ?
The blackbox is not multi-threaded (well, perhaps some BLAS operations are, but I am not using Julia multi-threading. I use modelling toolkit based simulations, but just a simple solver like:
sol = solve(prob, Rodas5(), dt=dt, tstops=tstops, abstol=tol, dtmax=1, maxiters=Int64(1e6), reltol = tol, saveat=ts)
I did not fix any variable, just restarting Julia fixes the problem.
It reproducible fails after I executed:
plot(rand(3))
in the REPL (from PyPlot).
Error message:
NOMAD exception (report to developper):
NOMAD::Exception thrown (/workspace/srcdir/nomad/src/Param/PbParameters.cpp, 174) Invalid Parameter. Check: LOWER_BOUND is equal to UPPER_BOUND at index 0. Value = 0
(x_best_feas = nothing, bbo_best_feas = nothing, x_best_inf = nothing, bbo_best_inf = nothing)
So this error message is misleading.
But it should be easy to reproduce, just add PyPlot to your project and run the command mentioned above. I would be glad about a workaround, like stopping the PyPlot event loop, or running NOMAD in a separate process...
Could you provide me a simple test reproducing the problem ?
Maybe two other things to check (eventually for a workaround):
- what is your computer system (mac, linux, windows or freebsd) ?
- Are you using Pluto.jl ? In this case, this package does not work well.
- have you observed the crash when changing the plot backend (for example, GR or plotly.js) ?