[Cbc] unfreed memory
Miles Lubin
miles.lubin at gmail.com
Fri Jul 11 02:04:49 EDT 2014
Hi Jean-Philippe,
CbcCreateSolverObject() is part of CoinMP, which is a separate project from
Cbc. I would suggest that you report the issue to the developer of CoinMP,
but it seems like it was already reported more than two years ago:
http://list.coin-or.org/pipermail/coinmp/2012-February/000029.html.
Anyway, you may be interested in the new C interface to Cbc which is under
development and is soon to be released as part of Cbc proper. It's designed
to be much more lightweight than CoinMP. Currently it's available in svn
trunk:
https://projects.coin-or.org/Cbc/browser/trunk/Cbc/src/Cbc_C_Interface.h.
(Feedback would be greatly appreciated!)
Best,
Miles
On Thu, Jul 10, 2014 at 1:27 AM, Jean-Philippe Chancelier <
jpc at cermics.enpc.fr> wrote:
>
> Hi All,
>
> I am using Cbc through CoinMp and it seams (valgrind report) that
> some memory allocated by CbcCreateSolverObject is not freed
> when exiting CoinMP.
>
> jpc at clio: valgrind --suppressions=tests/valgrind.supp --leak-check=full
> bin/scilex -nw
> ==18397== Memcheck, a memory error detector
> ==18397== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
> ==18397== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for
> copyright info
> ==18397== Command: bin/scilex -nw
> ==18397==
> -nsp->exec src/libglpk/qp.sce
> Coin0506I Presolve 2 (0) rows, 3 (0) columns and 6 (0) elements
> Clp0006I 0 Obj -0 Dual inf 1.0499997 (3) w.o. free dual inf (1)
> Clp0006I 2 Obj 202.5
> Clp0006I 2 Obj 202.5
> Clp0000I Optimal - objective value 202.5
> Clp0032I Optimal objective 202.5 - 2 iterations time 0.542
> -nsp->quit
> ==18397==
> ==18397== HEAP SUMMARY:
> .....
> ==18397== 2,430 (676 direct, 1,754 indirect) bytes in 1 blocks are
> definitely lost in loss record 4,833 of 4,868
> ==18397== at 0x402A6DC: operator new(unsigned int) (in
> /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
> ==18397== by 0x405E04F: CbcCreateSolverObject() (in
> /usr/lib/libCoinMP.so.0.0.0)
> ==18397== by 0x4060DEA: CbcOptimizeProblem (in
> /usr/lib/libCoinMP.so.0.0.0)
> ==18397== by 0x405ABB9: CoinOptimizeProblem (in
> /usr/lib/libCoinMP.so.0.0.0)
> ==18397== by 0x84CEE09: nsp_coinmp_solve (coinmp_cpp.cpp:109)
> ==18397== by 0x84C4621: int_coinmp_solve (clp-IN.c:510)
> ==18397== by 0x84C29D0: liblinprog_Interf (linprog-IN.c:1258)
> ==18397== by 0x82CA544: nsp_interfaces (callfunc.c:443)
> ==18397== by 0x82BC0A4: nsp_eval_func (FuncEval.c:164)
> ==18397== by 0x82B610E: nsp_eval (Eval.c:3091)
> ==18397== by 0x82B7678: nsp_eval_arg (Eval.c:1282)
> ==18397== by 0x82B8415: EvalEqual (Eval.c:1587)
> ==18397==
>
> I do the following
> hProb = CoinCreateProblem(problemName);
> result = CoinLoadMatrix(....)
> ...
> result = CoinOptimizeProblem(hProb, 0);
> Retcode->R[0]= CoinGetSolutionStatus(hProb);
> RetCost->R[0]= CoinGetObjectValue(hProb);
> CoinGetSolutionValues(hProb, X->R, NULL, NULL, Lambda->R);
> CoinUnloadProblem(hProb);
>
> The versions I use are the followings.
>
> BuildTools https://projects.coin-or.org/svn/BuildTools/stable/0.7
> CoinUtils https://projects.coin-or.org/svn/CoinUtils/stable/2.8/CoinUtils
> Clp https://projects.coin-or.org/svn/Clp/stable/1.14/Clp
> Osi https://projects.coin-or.org/svn/Osi/stable/0.105/Osi
> Cgl https://projects.coin-or.org/svn/Cgl/stable/0.57/Cgl
> Cbc https://projects.coin-or.org/svn/Cbc/stable/2.7/Cbc
> Data/Sample https://projects.coin-or.org/svn/Data/Sample/stable/1.2
>
> Best Regards
> jpc
>
>
>
> _______________________________________________
> Cbc mailing list
> Cbc at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cbc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20140711/e4994cf6/attachment.html>
More information about the Cbc
mailing list