Closed svigerske closed 5 years ago
Attachment batch.nl by mhahn created at 2017-06-28 14:28:02
Test problem file
Attachment svn-info by mhahn created at 2017-06-28 14:28:38
Info about SVN revision in question
Attachment valgrind.log by mhahn created at 2017-06-28 14:29:02
Valgrind output
Attachment possible-fix.diff by mhahn created at 2017-06-28 14:29:53
Possible (but largely untested) fix
Comment by @svigerske created at 2017-06-30 10:24:10
Thanks for finding this. This is now fixed in trunk 2c707bd4ea and should make it into the next release.
order_ can be NULL in the destructor, but a delete[] on a NULL pointer is ok (it just does nothing).
Comment by @svigerske created at 2017-06-30 10:24:10
Resolution: fixed
Issue created by migration from Trac.
Original creator: mhahn
Original creation time: 2017-06-28 14:27:25
Assignee: ipopt-team
Version: 3.12
It appears that the member array
order_
in the classIpopt::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: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
: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 byvalgrind
. However, I have not verified whether there is a set of circumstances in whichorder_ == 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 ofsvn info
to indicate the branch and revision of IPOPT that was usedvalgrind.log
: A dump of both stdout and stderr for the example runpossible-fix.diff
: A diff file indicating a possible fix that removes the leak reported invalgrind.log