MIP Start and invalid pointer

84 views
Skip to first unread message

Leandro C. Coelho

unread,
Mar 28, 2019, 7:15:29 PM3/28/19
to Gurobi Optimization
I provide a MIP Start for some variables of a model. For some instances it goes through, whereas for others I see something like:

MIP start produced solution with objective 4415.02 (0.12s)
MIP start produced solution with objective 3345.02 (0.13s)
MIP start produced solution with objective 3175.02 (0.14s)
free(): invalid pointer
Aborted (core dumped)


I use the C++ API, and gdb shows me this happens inside the optimize() call. I use the variable.set(GDB_DoubleAttr_Start, value) call for some of the variables.

Any ideas of where to dig?

Michael Winkler

unread,
Mar 28, 2019, 9:47:14 PM3/28/19
to Gurobi Optimization
Hi Leandro,

my current guess is that you somehow corrupt memory/do an invalid write which then leads to an invalid free. To check this could you run valgrind on your binary (see valgrind.org). If you are not so familiar with valgrind this tool will show memory leaks, uninitialized memory leaks(UMR), invalid reads and invalid writes.
I this tool comes out clean please let us know.

Best,
Michael

Leandro C. Coelho

unread,
Mar 29, 2019, 1:22:12 PM3/29/19
to Gurobi Optimization
Hi Michael,
Many thanks for reminding me of valgrind. Problem solved (of course it was on my end, as you guessed).
Leandro
Reply all
Reply to author
Forward
0 new messages