Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NOMAD exception #72

Open
ufechner7 opened this issue Feb 8, 2024 · 3 comments
Open

NOMAD exception #72

ufechner7 opened this issue Feb 8, 2024 · 3 comments

Comments

@ufechner7
Copy link

ufechner7 commented Feb 8, 2024

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.

@salomonl
Copy link
Collaborator

salomonl commented Feb 8, 2024

@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
Copy link
Author

@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...

@salomonl
Copy link
Collaborator

salomonl commented Feb 8, 2024

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) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants