Closed pascalzeugin closed 2 years ago
Hello, the minimal working example works on my machine, with different versions of Python up to 3.10 and different version of Pyomo up to the recent 6.2. I tried to replicate your error with Pyomo 5.7 all the way up to 6.2, and did not succeed in replicating.
The error you're seeing is because something goes wrong when Pyomo tries to find a solver (bonmin, I assume). Pyomo cannot find the solver, and Rbfopt is supposed to return an error, but something breaks before that happens; on my machine, if I provide the wrong solver path, I get a (graceful) error message explaining the situation. Note that the error happens inside Pyomo.
I used the same code you wrote above, just changing the path to the solver. I would need more information, because as things stand I cannot replicate the bug.
(The fact that the error trace mentions a UnicodeDecodeError makes me suspect it may have something to do with the string used to indicate the solver path.)
I updated the COIN-OR optimization suite to the newest version, i.e. 1.8.0 and the erorr traceback changed:
Iter Cycle Action Objective value Time Gap
---- ----- ------ --------------- ---- ---
0 0 Initialization -0.782797 0.00 100.00 *
0 0 Initialization 69.095477 0.00 100.00
0 0 Initialization 20.000000 0.00 100.00
0 0 GlobalStep -9.829600 0.02 100.00 *
1 0 GlobalStep -9.946732 0.04 100.00 *
2 0 GlobalStep -0.133622 0.06 100.00
3 0 GlobalStep -8.304083 0.07 100.00
4 0 GlobalStep -9.999968 0.09 100.00 *
Traceback (most recent call last):
File "C:\ProjTMS\MecosTools\mbtools4x\bin\untitled0.py", line 10, in <module>
val, x, itercount, evalcount, fast_evalcount = alg.optimize()
File "c:\users\c565785\appdata\local\programs\python\python39\lib\site-packages\rbfopt\rbfopt_algorithm.py", line 803, in optimize
self.optimize_serial(pause_after_iters)
File "c:\users\c565785\appdata\local\programs\python\python39\lib\site-packages\rbfopt\rbfopt_algorithm.py", line 1060, in optimize_serial
(adj, next_p, ind) = local_step(
File "c:\users\c565785\appdata\local\programs\python\python39\lib\site-packages\rbfopt\rbfopt_algorithm.py", line 2446, in local_step
min_rbf = aux.minimize_rbf(
File "c:\users\c565785\appdata\local\programs\python\python39\lib\site-packages\rbfopt\rbfopt_aux_problems.py", line 297, in minimize_rbf
if (not opt.available()):
File "c:\users\c565785\appdata\local\programs\python\python39\lib\site-packages\pyomo\solvers\plugins\solvers\ASL.py", line 115, in available
return self.version() is not None
File "c:\users\c565785\appdata\local\programs\python\python39\lib\site-packages\pyomo\opt\base\solvers.py", line 421, in version
self._version = self._get_version()
File "c:\users\c565785\appdata\local\programs\python\python39\lib\site-packages\pyomo\solvers\plugins\solvers\ASL.py", line 104, in _get_version
if results.stdout.strip().split()[-1].startswith('ASL('):
IndexError: list index out of range
I could trace the problem back to the bonmin.exe itself. When it tries to retrieve the version of the solver, it fails because two dll's are not found svml_dispmd.dll
and libifcoremd.dll
.
I used the excutable installer to install the suite. Can you tell where the problem is?
I don't know where the problem is, but you seem to have found the source of the error: your bonmin executable causes a system error.
You may want to look for help with the COIN Optimization suite. You can also try to download the Windows executable for bonmin and ipopt provided by AMPL ( https://ampl.com/products/solvers/open-source/ ), and see if those work.
Hi Giacomo
Thank you for your help, substituting the solvers with the ones from the source you've provided works like charm! Your help is much appreciated!
Best regards Pascal
Ok, glad to know it worked. I'm closing this.
When I run the minimum working example as shown below
then I get the following error
I'm using Python 3.9.6 by the way.