[Ipopt-tickets] [Ipopt] #91: Ipopt in R under Linux - a bug or complilation error?
Ipopt
coin-trac at coin-or.org
Thu Feb 19 06:40:27 EST 2009
#91: Ipopt in R under Linux - a bug or complilation error?
-----------------------------------------------+----------------------------
Reporter: anton | Owner: ipopt-team
Type: defect | Status: new
Priority: normal | Component: Ipopt
Version: 3.5 (C++ Version) | Severity: normal
Keywords: R, interface, Ipopt, Linux, x86-64 |
-----------------------------------------------+----------------------------
I have written an interface to Ipopt, which enables its use in the R
environment (http://cran.r-project.org/). This helps me in solving
nonlinear regression problems. This R-ipopt interface is written in C++,
and it is built under Linux as a shared object libRipopt.so, which depends
on libraries libipopt.so and libR.so, and is explicitly loaded by the R
executable. I have built it also under Windows, with a similar design. The
bundle R-Ripopt-ipopt worked fine with Windows, but under Linux it
sometimes works, and sometimes it crashes with a “caught segfault”
message. The Valgrind Memcheck tool has revealed that the crash happens
inside the ipopt part of the code. Here is an exapmle of the Valgrind
report:
==11082== Invalid write of size 4
==11082== at 0xAD47D36:
Ipopt::Journal::SetPrintLevel(Ipopt::EJournalCategory,
Ipopt::EJournalLevel) (in
/home/anton/CoinIpopt/build/lib/libipopt.so.0.0.0)
==11082== by 0xAC0A1E2:
Ipopt::IpoptApplication::OpenOutputFile(std::string, Ipopt::EJournalLevel)
(in /home/anton/CoinIpopt/build/lib/libipopt.so.0.0.0)
==11082== by 0xAC11BFC:
Ipopt::IpoptApplication::Initialize(std::istream&) (in
/home/anton/CoinIpopt/build/lib/libipopt.so.0.0.0)
==11082== by 0xAC1621D:
Ipopt::IpoptApplication::Initialize(std::string) (in
/home/anton/CoinIpopt/build/lib/libipopt.so.0.0.0)
==11082== by 0xA9A4DE8: do_Ripopt (Ripopt.cpp:71)
==11082== by 0x4ED6316: (within /usr/lib/R/lib/libR.so)
==11082== by 0x4EFE2AD: Rf_eval (in /usr/lib/R/lib/libR.so)
==11082== by 0x4EFF67F: (within /usr/lib/R/lib/libR.so)
==11082== by 0x4FDCF86: (within /usr/lib/R/lib/libR.so)
==11082== by 0x4EFE063: Rf_eval (in /usr/lib/R/lib/libR.so)
==11082== by 0x4F00277: (within /usr/lib/R/lib/libR.so)
==11082== by 0x4EFE063: Rf_eval (in /usr/lib/R/lib/libR.so)
==11082== Address 0x18 is not stack'd, malloc'd or (recently) free'd
Could you please help to resolve this problem? I should add that this
happens under Debian GNU/Linux x86_64. Maybe, the problem is actually
hidden inside R (and hardly in Ripopt, as I first thought), but I really
don’t know. I can send you a copy of my source code together with the g++
options I used, if required. Unfortunately, I cannot send the statistical
data that I processed.
I hope that this report will be useful for the further development of
ipopt, which I personally find a great product.
Best regards,
Anton Tyutin
--
Ticket URL: <https://projects.coin-or.org/Ipopt/ticket/91>
Ipopt <http://projects.coin-or.org/Ipopt>
Interior-point optimizer for nonlinear programs.
More information about the Ipopt-tickets
mailing list