<div dir="ltr">Hi Jean-Philippe,<div><br></div><div>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: <a href="http://list.coin-or.org/pipermail/coinmp/2012-February/000029.html" target="_blank">http://list.coin-or.org/pipermail/coinmp/2012-February/000029.html</a>.</div>
<div><br></div><div>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: <a href="https://projects.coin-or.org/Cbc/browser/trunk/Cbc/src/Cbc_C_Interface.h" target="_blank">https://projects.coin-or.org/Cbc/browser/trunk/Cbc/src/Cbc_C_Interface.h</a>. (Feedback would be greatly appreciated!)</div>
<div><br></div><div>Best,</div><div>Miles</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 10, 2014 at 1:27 AM, Jean-Philippe Chancelier <span dir="ltr"><<a href="mailto:jpc@cermics.enpc.fr" target="_blank">jpc@cermics.enpc.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hi All,<br>
<br>
I am using Cbc through CoinMp and it seams (valgrind report) that<br>
some memory allocated by CbcCreateSolverObject is not freed<br>
when exiting CoinMP.<br>
<br>
jpc@clio: valgrind --suppressions=tests/valgrind.supp --leak-check=full bin/scilex -nw<br>
==18397== Memcheck, a memory error detector<br>
==18397== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.<br>
==18397== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info<br>
==18397== Command: bin/scilex -nw<br>
==18397==<br>
-nsp->exec src/libglpk/qp.sce<br>
Coin0506I Presolve 2 (0) rows, 3 (0) columns and 6 (0) elements<br>
Clp0006I 0 Obj -0 Dual inf 1.0499997 (3) w.o. free dual inf (1)<br>
Clp0006I 2 Obj 202.5<br>
Clp0006I 2 Obj 202.5<br>
Clp0000I Optimal - objective value 202.5<br>
Clp0032I Optimal objective 202.5 - 2 iterations time 0.542<br>
-nsp->quit<br>
==18397==<br>
==18397== HEAP SUMMARY:<br>
.....<br>
==18397== 2,430 (676 direct, 1,754 indirect) bytes in 1 blocks are definitely lost in loss record 4,833 of 4,868<br>
==18397== at 0x402A6DC: operator new(unsigned int) (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)<br>
==18397== by 0x405E04F: CbcCreateSolverObject() (in /usr/lib/libCoinMP.so.0.0.0)<br>
==18397== by 0x4060DEA: CbcOptimizeProblem (in /usr/lib/libCoinMP.so.0.0.0)<br>
==18397== by 0x405ABB9: CoinOptimizeProblem (in /usr/lib/libCoinMP.so.0.0.0)<br>
==18397== by 0x84CEE09: nsp_coinmp_solve (coinmp_cpp.cpp:109)<br>
==18397== by 0x84C4621: int_coinmp_solve (clp-IN.c:510)<br>
==18397== by 0x84C29D0: liblinprog_Interf (linprog-IN.c:1258)<br>
==18397== by 0x82CA544: nsp_interfaces (callfunc.c:443)<br>
==18397== by 0x82BC0A4: nsp_eval_func (FuncEval.c:164)<br>
==18397== by 0x82B610E: nsp_eval (Eval.c:3091)<br>
==18397== by 0x82B7678: nsp_eval_arg (Eval.c:1282)<br>
==18397== by 0x82B8415: EvalEqual (Eval.c:1587)<br>
==18397==<br>
<br>
I do the following<br>
hProb = CoinCreateProblem(problemName);<br>
result = CoinLoadMatrix(....)<br>
...<br>
result = CoinOptimizeProblem(hProb, 0);<br>
Retcode->R[0]= CoinGetSolutionStatus(hProb);<br>
RetCost->R[0]= CoinGetObjectValue(hProb);<br>
CoinGetSolutionValues(hProb, X->R, NULL, NULL, Lambda->R);<br>
CoinUnloadProblem(hProb);<br>
<br>
The versions I use are the followings.<br>
<br>
BuildTools <a href="https://projects.coin-or.org/svn/BuildTools/stable/0.7" target="_blank">https://projects.coin-or.org/svn/BuildTools/stable/0.7</a><br>
CoinUtils <a href="https://projects.coin-or.org/svn/CoinUtils/stable/2.8/CoinUtils" target="_blank">https://projects.coin-or.org/svn/CoinUtils/stable/2.8/CoinUtils</a><br>
Clp <a href="https://projects.coin-or.org/svn/Clp/stable/1.14/Clp" target="_blank">https://projects.coin-or.org/svn/Clp/stable/1.14/Clp</a><br>
Osi <a href="https://projects.coin-or.org/svn/Osi/stable/0.105/Osi" target="_blank">https://projects.coin-or.org/svn/Osi/stable/0.105/Osi</a><br>
Cgl <a href="https://projects.coin-or.org/svn/Cgl/stable/0.57/Cgl" target="_blank">https://projects.coin-or.org/svn/Cgl/stable/0.57/Cgl</a><br>
Cbc <a href="https://projects.coin-or.org/svn/Cbc/stable/2.7/Cbc
Data/Sample" target="_blank">https://projects.coin-or.org/svn/Cbc/stable/2.7/Cbc<br>
Data/Sample</a> <a href="https://projects.coin-or.org/svn/Data/Sample/stable/1.2" target="_blank">https://projects.coin-or.org/svn/Data/Sample/stable/1.2</a><br>
<br>
Best Regards<br>
jpc<br>
<br>
<br>
<br>
_______________________________________________<br>
Cbc mailing list<br>
<a href="mailto:Cbc@list.coin-or.org">Cbc@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/cbc" target="_blank">http://list.coin-or.org/mailman/listinfo/cbc</a><br>
</blockquote></div><br></div>