[SCIP] Crashes related to variable deletion in Branch-Price-and-Cut

Hulst, Rolf van der (UT-EEMCS) r.p.vanderhulst at utwente.nl
Fri Jan 7 17:51:47 CET 2022


Dear Scip community,


I am doing branch-price-and-cut, so I add both variables and cutting planes dynamically.

Cutting planes are added by calling SCIPcreateEmptyRowSepa(), and then adding the relevant row by calling SCIPaddRow().

The variables are added as follows. Note that the variables are also allowed to be deleted by SCIP, which occasionally happens.

SCIP_CALL(SCIPaddPricedVar(scip,variable.variable,pricing_value));
SCIP_CALL(SCIPcreateVar(scip,&variable.variable, name.c_str(),0.0,1.0,1.0,SCIP_VARTYPE_BINARY,
                        initial,TRUE,NULL,NULL,NULL,NULL,(SCIP_VARDATA *)(index)));
SCIPvarMarkDeletable(variable.variable);
SCIP_CALL(SCIPaddPricedVar(scip,variable.variable,pricing_value));

After that, I add the variables to the relevant cutting plane rows using:

SCIP_CALL(SCIPaddVarToRow(scip,cutting_plane.row,variable.variable,coefficient));

I also catch variable deletion events in order to update my local storage (e.g. make sure that I do not access deleted variables)

SCIP_CALL(SCIPcatchVarEvent(scip,variable.variable,SCIP_EVENTTYPE_VARDELETED,SCIPfindEventhdlr(scip,VarDeletedEventHandler::name().c_str()),NULL,NULL));

I get the following error. It is reproduciable: (e.g. consistent every time).


....../scipoptsuite-8.0.0/scip/src/scip/lp.c:1189: rowSearchCoefPart: Assertion `row->cols_index[pos] == row->cols[pos]->index' failed.


Relevant stack trace: (SCIP 8.0, compiled in debug)

__GI_raise 0x00007f3e9cd7918b
__GI_abort 0x00007f3e9cd58859
__assert_fail_base 0x00007f3e9cd58729
__GI___assert_fail 0x00007f3e9cd69f36
rowSearchCoefPart lp.c:1189
rowSearchCoef lp.c:1238
SCIProwIncCoef lp.c:5542
SCIPvarAddToRow var.c:14319
SCIPaddVarToRow scip_lp.c:1695
-------------------------------
user pricing code
-------------------------------
pricerRedcostObj objpricer.cpp:182
SCIPpricerRedcost pricer.c:410
SCIPpricerExec pricer.c:494
SCIPpriceLoop solve.c:2114
priceAndCutLoop solve.c:2374
solveNodeLP solve.c:3080
propAndSolve solve.c:3886
solveNode solve.c:4186
SCIPsolveCIP solve.c:4982
SCIPsolve scip_solve.c:2745
SCIPdialogExecOptimize dialog_default.c:2183
SCIPdialogExec dialog.c:942
SCIPdialoghdlrExec dialog.c:393
SCIPstartInteraction scip_dialog.c:243
SCIPprocessShellArguments scipshell.c:479
runSCIP main.cpp:29
main main.cpp:45
__libc_start_main 0x00007f3e9cd5a0b3
_start 0x000055f8d93b876e




The problem seems to persist in both SCIP 7.3 and 8.0.

For different instances scip sometimes crashes at other points internally, but this is always at some assertion for row or column indicing. If this is helpful, I could also provide these stacktraces/errors. When compiling in release, I simply get an internal segfault within SCIP.


The problem disappears if I either:

  1.  Do not mark the variables as deletable (e.g. they are not deleted)
  2.  Do not generate any cutting plane rows (but do delete variables from the original problem constraints).

So my suspicion is that something goes wrong in SCIP's internal storage when variables are deleted.

I am confused, because the documentation on the website (https://scipopt.org/doc/html/FAQ.php#howtodeletevariables) mentions that for linear constraints SCIP handles deletion automatically (and it does so fine for my fixed set covering constraints). Do I need to manually delete variables from cut rows in the variable deletion callback, or should this be done by SCIP and is this simply a bug?

Best,

Rolf

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20220107/7c054df5/attachment.html>


More information about the Scip mailing list