[Ipopt] ipopt with python
Vyacheslav Kungurtsev
vyacheslav.kungurtsev at esat.kuleuven.be
Fri Nov 21 10:32:31 EST 2014
Hello,
Somehow after the weekend I tried again and ipopt installed just fine and
the examples ran OK. I have no idea what happened.
Now I am trying to run ipopt with python, and having trouble with both
pyipopt and cyipopt
With pyipopt:
the error appears as:
~/pyipopt/examples$ python hs071.py
Traceback (most recent call last):
File "hs071.py", line 6, in <module>
import pyipopt
File "/usr/local/lib/python2.7/
dist-packages/pyipopt/__init__.py", line 16, in <module>
from pyipoptcore import *
ImportError: /usr/local/lib/python2.7/dist-packages/pyipopt/pyipoptcore.so:
undefined symbol: _ZTVN10__cxxabiv117__class_type_infoE
Indeed, it so happens that:
$ nm /usr/local/lib/python2.7/dist-
packages/pyipopt/pyipoptcore.so | grep _ZTVN10__cxxabiv117__class_type_infoE
U _ZTVN10__cxxabiv117__class_type_infoE
the symbol arises from libstdc++ and I have tried adding it to setup.py as
such:
extra_link_args=['-libstdc++']
,
or
extra_link_args=['-libstdc++', + IPOPT_LIB],
or
libraries=[
...
'coinmetis','libstdc++',
...
and in all cases setup.py installs with no error, but the import error
remains when I try to run the example.
Do you have any suggestions? Am I linking it improperly in the setup file?
With cyipopt the setup.py requires:
these
IPOPT_ICLUDE_DIRS=['include_mt/coin', np.get_include()]
IPOPT_LIBS=['Ipopt39', 'IpoptFSS']
IPOPT_LIB_DIRS=['lib_mt/x64/release']
IPOPT_DLL=['Ipopt39.dll', 'IpoptFSS39.dll']
to be set correctly. I am not quite sure how to find the proper
directories. Would I even have dll files given that I am running ubuntu?
Sorry if the question is rather basic.
some info about my computer, if it helps:
Ubuntu 14.04
gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2
Thank you
On Fri, Nov 14, 2014 at 11:27 PM, Tony Kelman <kelman at berkeley.edu> wrote:
> Yes, as much additional information as you can provide. What OS (Linux
> distribution?) and compiler versions? What are the contents of that
> IpLimMemQuasiNewtonUpdater.lo file? It should be a ~10 line text file. If
> something went wrong during compilation of the
> IpLimMemQuasiNewtonUpdater.cpp source, the best way to figure out what’s
> happening is to upload full config.log files (both from the top-level and
> the Ipopt subdirectory), and a log of all the output from make to see if
> there were any unusual warnings or errors you may have missed.
>
> -Tony
>
>
> *From:* Vyacheslav Kungurtsev <vyacheslav.kungurtsev at esat.kuleuven.be>
> *Sent:* Thursday, November 13, 2014 2:35 AM
> *To:* ipopt at list.coin-or.org
> *Subject:* [Ipopt] libtool error during installation
>
> Hello all,
>
> I am installing Ipopt on a new machine, and third party installation and
> configure seems to work fine, but I get the following error with make:
>
>
>
> make[3]: Entering directory `/home/slava/CoinIpopt/Ipopt/src/Algorithm'
> /bin/bash ../../../libtool --tag=CXX --mode=link g++ -O3 -pipe -DNDEBUG
> -pedantic-errors -Wparentheses -Wreturn-type -Wcast-qual -Wall
> -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas
> -Wno-long-long -DIPOPT_BUILD -o libipoptalg.la
> IpAdaptiveMuUpdate.lo IpAlgBuilder.lo IpAlgorithmRegOp.lo
> IpAugRestoSystemSolver.lo IpBacktrackingLineSearch.lo
> IpDefaultIterateInitializer.lo IpEquilibrationScaling.lo
> IpExactHessianUpdater.lo IpFilter.lo IpFilterLSAcceptor.lo
> IpGenAugSystemSolver.lo IpGradientScaling.lo IpIpoptAlg.lo
> IpIpoptCalculatedQuantities.lo IpIpoptData.lo IpIteratesVector.lo
> IpLeastSquareMults.lo IpLimMemQuasiNewtonUpdater.lo IpLoqoMuOracle.lo
> IpLowRankAugSystemSolver.lo IpLowRankSSAugSystemSolver.lo
> IpMonotoneMuUpdate.lo IpNLPBoundsRemover.lo IpNLPScaling.lo
> IpOptErrorConvCheck.lo IpOrigIpoptNLP.lo IpOrigIterationOutput.lo
> IpPDFullSpaceSolver.lo IpPDPerturbationHandler.lo IpPDSearchDirCalc.lo
> IpPenaltyLSAcceptor.lo IpProbingMuOracle.lo IpQualityFunctionMuOracle.lo
> IpRestoConvCheck.lo IpRestoFilterConvCheck.lo IpRestoIpoptNLP.lo
> IpRestoIterateInitializer.lo IpRestoIterationOutput.lo IpRestoMinC_1Nrm.lo
> IpRestoPenaltyConvCheck.lo IpRestoRestoPhase.lo IpStdAugSystemSolver.lo
> IpTimingStatistics.lo IpUserScaling.lo IpWarmStartIterateInitializer.lo
> libtool: link: `IpLimMemQuasiNewtonUpdater.lo' is not a valid libtool
> object
> make[3]: *** [libipoptalg.la] Error 1
> make[3]: Leaving directory `/home/slava/CoinIpopt/Ipopt/src/Algorithm'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/home/slava/CoinIpopt/Ipopt/src/Algorithm'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/slava/CoinIpopt/Ipopt'
>
>
> Any suggestions would be appreciated. Let me know if you need more
> information about my system or anything.
>
> Thank you
>
> Best regards,
> ~Vyacheslav Kungurtsev
>
>
> ------------------------------
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20141121/115c29fb/attachment.html>
More information about the Ipopt
mailing list