[Ipopt-tickets] [Ipopt] #283: Memory leak in Ipopt::Ma86SolverInterface
Ipopt
coin-trac at coin-or.org
Wed Jun 28 10:27:25 EDT 2017
#283: Memory leak in Ipopt::Ma86SolverInterface
------------------------+------------------------
Reporter: mhahn | Owner: ipopt-team
Type: defect | Status: new
Priority: normal | Component: Ipopt
Version: 3.12 | Severity: major
Keywords: memory leak |
------------------------+------------------------
It appears that the member array {{{order_}}} in the class
{{{Ipopt::Ma86SolverInterface}}} is not being freed upon destruction of
the solver interface. While not a major concern in single NLP solves, this
appears to lead to a cumulative loss of free memory in applications where
a large number of NLP solves must be performed (e.g. as relaxation solver
in MINLP branch and bound).
To reproduce, build IPOPT (revision indicated in {{{svn-info}}}) after
getting third party dependencies and configuring with the following
arguments:
{{{
./configure --with-asl=BUILD --with-metis=BUILD --with-hsl=BUILD --with-
mumps=BUILD --enable-debug
}}}
In this instance, BLAS and LAPACK are provided through the OS distribution
(Ubuntu 17.04) and the HSL version is 2014.01.10.
Then, install IPOPT and dependencies to a prefix of your choice, and
execute the following following command line to solve the problem
described in the attached file {{{batch.nl}}}:
{{{
valgrind --tool=memcheck --leak-check=full ipopt batch.nl
linear_solver=ma86 outlev=5
}}}
The expected output (mixed stdout/stderr) is attached in
{{{valgrind.log}}}.
A possible fix is given in {{{possible-fix.diff}}}. It appears to get rid
of the leak reported by {{{valgrind}}}. However, I have not verified
whether there is a set of circumstances in which {{{order_ == NULL}}} when
the destructor is invoked.
Attached are:
* {{{batch.nl}}}: A stub .nl file derived from the test problem 'batch'
from the MacMINLP collection
(https://wiki.mcs.anl.gov/leyffer/index.php/MacMINLP)
* {{{svn-info}}}: A dump of the output of {{{svn info}}} to indicate the
branch and revision of IPOPT that was used
* {{{valgrind.log}}}: A dump of both stdout and stderr for the example run
* {{{possible-fix.diff}}}: A diff file indicating a possible fix that
removes the leak reported in {{{valgrind.log}}}
--
Ticket URL: <https://projects.coin-or.org/Ipopt/ticket/283>
Ipopt <http://projects.coin-or.org/Ipopt>
Interior-point optimizer for nonlinear programs.
More information about the Ipopt-tickets
mailing list