[SciPy-user] [OpenOpt] problem with ralg (latest SVN)
Emanuele Olivetti
emanuele@relativita....
Fri Sep 5 18:00:17 CDT 2008
OK. Running another custom example I got again the initial "ralg missing"
error message. Increasing verbosity as you suggested (problem.debug = 1)
shows the same error message shown before, i.e. "cond" is not available
in numpy.linalg, so import fails:
----
...<cut>...
in solve
result = self.problem.solve(self.optimization_algorithm) # perform
optimization!
File
"/usr/lib/python2.5/site-packages/scikits/openopt/Kernel/BaseProblem.py",
line 185, in solve
return runProbSolver(self, solvers, *args, **kwargs)
File
"/usr/lib/python2.5/site-packages/scikits/openopt/Kernel/runProbSolver.py",
line 43, in runProbSolver
solverClass = getattr(my_import(__solverPaths__[solver_str]),
solver_str)
File
"/usr/lib/python2.5/site-packages/scikits/openopt/Kernel/runProbSolver.py",
line 268, in my_import
mod = __import__(name)
File
"/usr/lib/python2.5/site-packages/scikits/openopt/solvers/UkrOpt/ralg_oo.py",
line 2, in <module>
from numpy.linalg import norm, cond
ImportError: cannot import name cond
----
Hope this helps,
Emanuele
Emanuele Olivetti wrote:
> Thanks for help.
>
> Unfortunately after updating from SVN again I'm not able to reproduce
> the same error, but instead I get this, about failing to import "cond" from
> numpy.linalg. It seems that "cond" is not available until the very latest
> numpy (and even autogenerated NumPy API on scipy.org have no "cond"):
> ----
> $ python openopt/scikits/openopt/examples/nlp_1.py
> OpenOpt checks user-supplied gradient df (shape: (150,) )
> according to:
> prob.diffInt = [ 1.00000000e-07]
> |1 - info_user/info_numerical| <= prob.maxViolation = 0.01
> derivatives are equal
> ========================
> OpenOpt checks user-supplied gradient dc (shape: (2, 150) )
> according to:
> prob.diffInt = [ 1.00000000e-07]
> |1 - info_user/info_numerical| <= prob.maxViolation = 0.01
> derivatives are equal
> ========================
> OpenOpt checks user-supplied gradient dh (shape: (2, 150) )
> according to:
> prob.diffInt = [ 1.00000000e-07]
> |1 - info_user/info_numerical| <= prob.maxViolation = 0.01
> derivatives are equal
> ========================
> Traceback (most recent call last):
> File "openopt/scikits/openopt/examples/nlp_1.py", line 108, in <module>
> r = p.solve('ralg', debug = 1)
> File
> "/usr/lib/python2.5/site-packages/scikits/openopt/Kernel/BaseProblem.py",
> line 185, in solve
> return runProbSolver(self, solvers, *args, **kwargs)
> File
> "/usr/lib/python2.5/site-packages/scikits/openopt/Kernel/runProbSolver.py",
> line 43, in runProbSolver
> solverClass = getattr(my_import(__solverPaths__[solver_str]),
> solver_str)
> File
> "/usr/lib/python2.5/site-packages/scikits/openopt/Kernel/runProbSolver.py",
> line 268, in my_import
> mod = __import__(name)
> File
> "/usr/lib/python2.5/site-packages/scikits/openopt/solvers/UkrOpt/ralg_oo.py",
> line 2, in <module>
> from numpy.linalg import norm, cond
> ImportError: cannot import name cond
> ----
>
> Any suggestion on how to solve this?
>
> Sorry for the mess.
>
> Emanuele
>
> Note: this error pops out using numpy+scipy shipped with
> ubuntu. When using recent SVN version of numpy+scipy
> everything works well.
>
> dmitrey wrote:
>
>> Hi Emanuele,
>> as it is mentioned in openopt install webpage and README.txt numpy v
>> >= 1.1.0 is recommended. Some other oo users informed of bugs due to
>> older versions.
>>
>> Could you inform what will be outputed if you set p.debug = 1? (either
>> directly or via p = NLP(..., debug=1,...))
>>
>> If the problem with numpy versions is critical for users of your soft,
>> you'd better to put more recent numpy into Debian soft channel.
>>
>> Regards, D.
>>
>> Emanuele Olivetti wrote:
>>
>>
>>> Same problem with numpy 1.0.4 + scipy 0.6.0
>>> (shipped with ubuntu 8.04 hardy heron).
>>>
>>> E.
>>>
>>> Emanuele Olivetti wrote:
>>>
>>>
>>>
>>>> Dear all and Dmitrey,
>>>>
>>>> I've just updated to latest openopt (SVN). When using numpy 1.0.3
>>>> and scipy 0.5.2 (standard in Ubuntu 7.10 gutsy gibbon) openopt says
>>>> that "ralg" (NLP) algorithm is missing! With more recent numpy
>>>> and scipy it seems to work reliably. But what happened with respect
>>>> to older numpy+scipy? In that case even running examples/nlp_1.py
>>>> returns:
>>>> ----
>>>> $ python nlp_1.py
>>>> OpenOpt checks user-supplied gradient df (shape: (150,) )
>>>> according to:
>>>> prob.diffInt = [ 1.00000000e-07]
>>>> |1 - info_user/info_numerical| <= prob.maxViolation = 0.01
>>>> derivatives are equal
>>>> ========================
>>>> OpenOpt checks user-supplied gradient dc (shape: (2, 150) )
>>>> according to:
>>>> prob.diffInt = [ 1.00000000e-07]
>>>> |1 - info_user/info_numerical| <= prob.maxViolation = 0.01
>>>> derivatives are equal
>>>> ========================
>>>> OpenOpt checks user-supplied gradient dh (shape: (2, 150) )
>>>> according to:
>>>> prob.diffInt = [ 1.00000000e-07]
>>>> |1 - info_user/info_numerical| <= prob.maxViolation = 0.01
>>>> derivatives are equal
>>>> ========================
>>>> OO Error:incorrect solver is called, maybe the solver "ralg" is not
>>>> installed. Maybe setting p.debug=1 could specify the matter more precisely
>>>> Traceback (most recent call last):
>>>> File "nlp_1.py", line 110, in <module>
>>>> r = p.solve('ralg')
>>>> File
>>>> "/usr/lib/python2.5/site-packages/scikits/openopt/Kernel/BaseProblem.py",
>>>> line 185, in solve
>>>> return runProbSolver(self, solvers, *args, **kwargs)
>>>> File
>>>> "/usr/lib/python2.5/site-packages/scikits/openopt/Kernel/runProbSolver.py",
>>>> line 48, in runProbSolver
>>>> p.err('incorrect solver is called, maybe the solver "' + solver_str
>>>> +'" is not installed. Maybe setting p.debug=1 could specify the matter
>>>> more precisely')
>>>> File
>>>> "/usr/lib/python2.5/site-packages/scikits/openopt/Kernel/oologfcn.py",
>>>> line 16, in ooerr
>>>> raise OpenOptException(msg)
>>>> scikits.openopt.Kernel.oologfcn.OpenOptException: incorrect solver is
>>>> called, maybe the solver "ralg" is not installed. Maybe setting
>>>> p.debug=1 could specify the matter more precisely
>>>> ----
>>>>
>>>> This did not happen before so I guess it is due to a recent
>>>> commit. It is possible to solve the problem?
>>>>
>>>> Kind Regards,
>>>>
>>>> Emanuele
>>>>
>>>> _______________________________________________
>>>> SciPy-user mailing list
>>>> SciPy-user@scipy.org
>>>> http://projects.scipy.org/mailman/listinfo/scipy-user
>>>>
>>>>
>>>>
>>>>
>>>>
>>> _______________________________________________
>>> SciPy-user mailing list
>>> SciPy-user@scipy.org
>>> http://projects.scipy.org/mailman/listinfo/scipy-user
>>>
>>>
>>>
>>>
>>>
>>>
>> _______________________________________________
>> SciPy-user mailing list
>> SciPy-user@scipy.org
>> http://projects.scipy.org/mailman/listinfo/scipy-user
>>
>>
>>
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
>
More information about the SciPy-user
mailing list