coin-or / Cbc

COIN-OR Branch-and-Cut solver
Other
798 stars 115 forks source link

Valgrind Error #365

Open yashpuranik opened 3 years ago

yashpuranik commented 3 years ago

I compiled Cbc (2.10.5) /Clp (1.17.6) from source under WSL

and ran the executable generated from clpdriver.cpp in the Cbc/examples directory on the attached mps file (ex.mps.txt). Valgrind log and stdout logs are also attached.

From what I can gather, here: https://github.com/coin-or/Clp/blob/756ddd3ed813eb1fa8b2d1b4fe813e6a4d7aa1eb/Clp/src/ClpSolve.cpp#L2469 columnLength is an array of length 10816. However, here: https://github.com/coin-or/Clp/blob/756ddd3ed813eb1fa8b2d1b4fe813e6a4d7aa1eb/Clp/src/ClpSolve.cpp#L3049 numberColumns = 11024. Not sure what is causing the discrepancy.

ex.mps.txt stdout.txt valgrind.log

tkralphs commented 3 years ago

Thanks, we'll take a look at this!

jjhforrest commented 3 years ago

Hopefully fixd in master If you want to check it is a simple fix in Clp (1.17.6)

a/src/ClpSolve.cpp +++ b/src/ClpSolve.cpp @@ -2670,6 +2670,11 @@ int ClpSimplex::initialSolve(ClpSolve &options) model2->addColumns(numberArtificials, NULL, NULL, addCost, addStarts, addRow, addElement); }