[Ipopt-tickets] [Ipopt] #91: Ipopt in R under Linux - a bug or complilation error?
Ipopt
coin-trac at coin-or.org
Mon Feb 23 06:29:45 EST 2009
#91: Ipopt in R under Linux - a bug or complilation error?
--------------------------------+-------------------------------------------
Reporter: anton | Owner: andreasw
Type: defect | Status: assigned
Priority: normal | Component: Ipopt
Version: 3.5 (C++ Version) | Severity: normal
Resolution: | Keywords: R, interface, Ipopt, Linux, x86-64
--------------------------------+-------------------------------------------
Comment (by anton):
Hi Andreas,
Thank you for your feedback. I have found the cause of the crash. It was
an incorrect name for the output file. (As a newcomer to Linux I missed
the point that the ‘~’ sign as a substitute for the home directory may not
work outside the shell.) Ipopt failed to open the file, created a null
pointer file_jrnl in method IpoptApplication::OpenOutputFile, and then
crashed when trying to write to array file_jrnl->print_levels_ in method
Journal::SetPrintLevel.
I propose to insert a check of the validity of the file_jrnl pointer
before calling SetPrintLevel – in the same way as it is already done for
pointer stdout_jrnl in method IpoptApplication::Initialize. Perhaps, it
would be even more consistent to include such a check for every pointer to
a Journal object created by Journalist::AddFileJournal method. In this
case ipopt would not crash but merely generate empty output. This helped
me to find the error, and it might help others too.
Also thank you for the hint with creating new journalists – I will try
this. I had a problem with standard output in R under Windows indeed, and
solved that by redefining methods FileJournal::PrintImpl, but I would
prefer a more elegant solution.
Best regards,
Anton
--
Ticket URL: <https://projects.coin-or.org/Ipopt/ticket/91#comment:2>
Ipopt <http://projects.coin-or.org/Ipopt>
Interior-point optimizer for nonlinear programs.
More information about the Ipopt-tickets
mailing list