Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emphasis Optimality causes assertion fail #112

Closed
Andful opened this issue Sep 30, 2024 · 7 comments
Closed

Emphasis Optimality causes assertion fail #112

Andful opened this issue Sep 30, 2024 · 7 comments

Comments

@Andful
Copy link

Andful commented Sep 30, 2024

The following formulation causes assertion error when emphasis is optimal.

Formulation:
formulation.lp (LP format)
Version:

SCIP version 10.0.0 [precision: 8 byte] [memory: block] [mode: debug] [LP solver: Soplex 7.1.0] [GitHash: 9511b02a22]
Copyright (c) 2002-2024 Zuse Institute Berlin (ZIB)

External libraries: 
  Readline 8.2         GNU library for command line editing (gnu.org/s/readline)
  Soplex 7.1.0         Linear Programming Solver developed at Zuse Institute Berlin (soplex.zib.de) [GitHash: 595bfac9]
  CppAD 20180000.0     Algorithmic Differentiation of C++ algorithms developed by B. Bell (github.com/coin-or/CppAD)
  ZLIB 1.3             General purpose compression library by J. Gailly and M. Adler (zlib.net)
  TinyCThread 1.2      small portable implementation of the C11 threads API (tinycthread.github.io)
  GMP 6.3.0            GNU Multiple Precision Arithmetic Library developed by T. Granlund (gmplib.org)
  AMPL/MP 690e9e7      AMPL .nl file reader library (github.com/ampl/mp)
  Nauty 2.8.8          Computing Graph Automorphism Groups by Brendan D. McKay (users.cecs.anu.edu.au/~bdm/nauty)
  sassy 1.1            Symmetry preprocessor by Markus Anders (github.com/markusa4/sassy)

Assertion error: scip: /home/andful/projects/scip/src/scip/branch_relpscost.c:850: needsStrongBranching: Assertion `!branchruledata->usehyptestforreliability || bestpscand != NULL' failed.
Log when running bin/scip -c "set emphasis optimality" -c "read formulation.lp" -c "optimize" -c "quit" &> out.log:
out.log
backrace:

__pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)
    at ./nptl/pthread_kill.c:44
warning: 44	./nptl/pthread_kill.c: No such file or directory
(gdb) backtrace
#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)
    at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
    at ./nptl/pthread_kill.c:89
#3  0x00007ffff764526e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x00007ffff76288ff in __GI_abort () at ./stdlib/abort.c:79
#5  0x00007ffff762881b in __assert_fail_base (
    fmt=0x7ffff77d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
    assertion=assertion@entry=0x555556541720 "!branchruledata->usehyptestforreliability || bestpscand != NULL", 
    file=file@entry=0x555556540f80 "/home/andful/projects/scip/src/scip/branch_relpscost.c", 
    line=line@entry=850, 
    function=function@entry=0x555556542f80 <__PRETTY_FUNCTION__.6> "needsStrongBranching")
    at ./assert/assert.c:94
#6  0x00007ffff763b507 in __assert_fail (
    assertion=0x555556541720 "!branchruledata->usehyptestforreliability || bestpscand != NULL", file=0x555556540f80 "/home/andful/projects/scip/src/scip/branch_relpscost.c", line=850, 
    function=0x555556542f80 <__PRETTY_FUNCTION__.6> "needsStrongBranching")
    at ./assert/assert.c:103
#7  0x00005555555bc426 in needsStrongBranching (scip=0x555556da89d0, 
    branchrule=0x555556dec970, branchcand=0x55555708f4b8, 
    branchcandfrac=0.38974176816065165, bestpscand=0x0, bestpscandfrac=0, reliable=10, 
    relerrorthreshold=0.050000000000000003, clevel=SCIP_CONFIDENCELEVEL_MEDIUM, 
    useancpscost=0) at /home/andful/projects/scip/src/scip/branch_relpscost.c:850
#8  0x00005555555beebe in execRelpscost (scip=0x555556da89d0, branchrule=0x555556dec970, 
    branchcands=0x5555571b22b0, branchcandssol=0x55555734d120, 
    branchcandsfrac=0x555557362800, branchorbitidx=0x0, nbranchcands=31, executebranch=1, 
    result=0x7fffffffca6c) at /home/andful/projects/scip/src/scip/branch_relpscost.c:1338
#9  0x00005555555c3646 in branchExeclpRelpscost (scip=0x555556da89d0, 
    branchrule=0x555556dec970, allowaddcons=1, result=0x7fffffffca6c)
    at /home/andful/projects/scip/src/scip/branch_relpscost.c:2190
#10 0x0000555555cd80ea in SCIPbranchruleExecLPSol (branchrule=0x555556dec970, 
    set=0x555556dad8c0, stat=0x55555705b990, tree=0x555556f87780, sepastore=0x5555572264d0, 
    cutoffbound=67233728.000100002, allowaddcons=1, result=0x7fffffffca6c)
    at /home/andful/projects/scip/src/scip/branch.c:1590
#11 0x0000555555cdb139 in SCIPbranchExecLP (blkmem=0x555556dab7e0, set=0x555556dad8c0, 
    stat=0x55555705b990, transprob=0x55555705b870, origprob=0x55555705c8c0, 
    tree=0x555556f87780, reopt=0x0, lp=0x5555570a3da0, sepastore=0x5555572264d0, 
    branchcand=0x55555702f300, eventqueue=0x555557071380, cutoffbound=67233728.000100002, 
    allowaddcons=1, result=0x7fffffffca6c)
    at /home/andful/projects/scip/src/scip/branch.c:2591
#12 0x0000555555fd5d2b in SCIPbranchLP (scip=0x555556da89d0, result=0x7fffffffca6c)
    at /home/andful/projects/scip/src/scip/scip_branch.c:1241
#13 0x0000555555680925 in consEnfolpIntegral (scip=0x555556da89d0, conshdlr=0x555556dece80, 
--Type <RET> for more, q to quit, c to continue without paging--
    conss=0x0, nconss=0, nusefulconss=0, solinfeasible=0, result=0x7fffffffca6c)
    at /home/andful/projects/scip/src/scip/cons_integral.c:106
#14 0x0000555555d1d196 in SCIPconshdlrEnforceLPSol (conshdlr=0x555556dece80, 
    blkmem=0x555556dab7e0, set=0x555556dad8c0, stat=0x55555705b990, tree=0x555556f87780, 
    sepastore=0x5555572264d0, solinfeasible=0, result=0x7fffffffca6c)
    at /home/andful/projects/scip/src/scip/cons.c:3471
#15 0x00005555560cab28 in enforceConstraints (blkmem=0x555556dab7e0, set=0x555556dad8c0, 
    messagehdlr=0x555556da8ad0, stat=0x55555705b990, prob=0x55555705b870, 
    primal=0x55555706b740, tree=0x555556f87780, lp=0x5555570a3da0, 
    relaxation=0x55555706b7c0, sepastore=0x5555572264d0, branchcand=0x55555702f300, 
    branched=0x7fffffffcc4c, cutoff=0x7fffffffceec, infeasible=0x7fffffffcef8, 
    propagateagain=0x7fffffffcc44, solvelpagain=0x7fffffffcc40, 
    solverelaxagain=0x7fffffffcc3c, forced=0)
    at /home/andful/projects/scip/src/scip/solve.c:3625
#16 0x00005555560cefd3 in solveNode (blkmem=0x555556dab7e0, set=0x555556dad8c0, 
    messagehdlr=0x555556da8ad0, stat=0x55555705b990, mem=0x555556da9770, 
    origprob=0x55555705c8c0, transprob=0x55555705b870, primal=0x55555706b740, 
    tree=0x555556f87780, reopt=0x0, lp=0x5555570a3da0, relaxation=0x55555706b7c0, 
    pricestore=0x555557221f30, sepastore=0x5555572264d0, branchcand=0x55555702f300, 
    cutpool=0x555557226550, delayedcutpool=0x5555572265e0, conflict=0x555556dbc7b0, 
    conflictstore=0x555557065d20, eventfilter=0x555556e14ec0, eventqueue=0x555557071380, 
    cliquetable=0x5555570b4c90, cutoff=0x7fffffffceec, postpone=0x7fffffffcef0, 
    unbounded=0x7fffffffcef4, infeasible=0x7fffffffcef8, restart=0x7fffffffd128, 
    afternodeheur=0x7fffffffcf00, stopped=0x7fffffffcf04)
    at /home/andful/projects/scip/src/scip/solve.c:4530
#17 0x00005555560d28ee in SCIPsolveCIP (blkmem=0x555556dab7e0, set=0x555556dad8c0, 
    messagehdlr=0x555556da8ad0, stat=0x55555705b990, mem=0x555556da9770, 
    origprob=0x55555705c8c0, transprob=0x55555705b870, primal=0x55555706b740, 
    tree=0x555556f87780, reopt=0x0, lp=0x5555570a3da0, relaxation=0x55555706b7c0, 
    pricestore=0x555557221f30, sepastore=0x5555572264d0, cutpool=0x555557226550, 
    delayedcutpool=0x5555572265e0, branchcand=0x55555702f300, conflict=0x555556dbc7b0, 
    conflictstore=0x555557065d20, eventfilter=0x555556e14ec0, eventqueue=0x555557071380, 
    cliquetable=0x5555570b4c90, restart=0x7fffffffd128)
    at /home/andful/projects/scip/src/scip/solve.c:5212
#18 0x00005555560494b7 in SCIPsolve (scip=0x555556da89d0)
    at /home/andful/projects/scip/src/scip/scip_solve.c:2658
#19 0x000055555587dc4f in SCIPdialogExecOptimize (scip=0x555556da89d0, 
    dialog=0x555556dcf7e0, dialoghdlr=0x555556dcc910, nextdialog=0x7fffffffd2e0)
    at /home/andful/projects/scip/src/scip/dialog_default.c:2192
#20 0x0000555555d76c2d in SCIPdialogExec (dialog=0x555556dcf7e0, set=0x555556dad8c0, 
    dialoghdlr=0x555556dcc910, nextdialog=0x7fffffffd2e0)
    at /home/andful/projects/scip/src/scip/dialog.c:951
#21 0x0000555555d74dbb in SCIPdialoghdlrExec (dialoghdlr=0x555556dcc910, set=0x555556dad8c0)
    at /home/andful/projects/scip/src/scip/dialog.c:402
#22 0x0000555555ff4e86 in SCIPstartInteraction (scip=0x555556da89d0)
--Type <RET> for more, q to quit, c to continue without paging--
    at /home/andful/projects/scip/src/scip/scip_dialog.c:252
#23 0x000055555608b2a3 in SCIPprocessShellArguments (scip=0x555556da89d0, argc=9, 
    argv=0x7fffffffd998, defaultsetname=0x555556535004 "scip.set")
    at /home/andful/projects/scip/src/scip/scipshell.c:538
#24 0x000055555608b43a in SCIPrunShell (argc=9, argv=0x7fffffffd998, 
    defaultsetname=0x555556535004 "scip.set")
    at /home/andful/projects/scip/src/scip/scipshell.c:594
#25 0x000055555557926f in main (argc=9, argv=0x7fffffffd998)
    at /home/andful/projects/scip/src/main.c:71

Local variables obtained with select-frame 7 and info locals:

branchruledata = 0x555556dec5d8
pscostdownsize = 0
pscostupsize = 0
pscostsize = 0
dpscostdownsize = 0
dpscostupsize = 0
dpscostsize = 0
__PRETTY_FUNCTION__ = "needsStrongBranching"
@ambros-gleixner
Copy link
Member

Thank you for your bug report! Can you try the following fix:

diff --git a/src/scip/branch_relpscost.c b/src/scip/branch_relpscost.c
index 7c46d60fce..a2fc78ea00 100644
--- a/src/scip/branch_relpscost.c
+++ b/src/scip/branch_relpscost.c
@@ -1234,8 +1234,8 @@ SCIP_RETCODE execRelpscost(
          for( c = 0; c < nbranchcands; ++c )
          {
             if( needsStrongBranching(scip, branchrule, branchcands[c], branchcandsfrac[c],
-                  bestpscand > 0 ? branchcands[bestpscand] : NULL,
-                  bestpscand > 0 ? branchcandsfrac[bestpscand] : 0.0,
+                  bestpscand >= 0 ? branchcands[bestpscand] : NULL,
+                  bestpscand >= 0 ? branchcandsfrac[bestpscand] : 0.0,
                   reliable, relerrorthreshold, clevel, useancpscost) )
             {
                useancpscost = FALSE;

?

@Andful
Copy link
Author

Andful commented Oct 8, 2024

Seems to give the same error:

Backtrace
__pthread_kill_implementation (no_tid=0, signo=6, threadid=)
    at ./nptl/pthread_kill.c:44
warning: 44	./nptl/pthread_kill.c: No such file or directory
(gdb) bt
#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=)
    at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=)
    at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=, signo=signo@entry=6)
    at ./nptl/pthread_kill.c:89
#3  0x00007ffff764526e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x00007ffff76288ff in __GI_abort () at ./stdlib/abort.c:79
#5  0x00007ffff762881b in __assert_fail_base (
    fmt=0x7ffff77d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
    assertion=assertion@entry=0x555556541720 "!branchruledata->usehyptestforreliability || bestpscand != NULL", 
    file=file@entry=0x555556540f80 "/home/andful/projects/scip/src/scip/branch_relpscost.c", line=line@entry=850, 
    function=function@entry=0x555556542f80 <__PRETTY_FUNCTION__.6> "needsStrongBranching")
    at ./assert/assert.c:94
#6  0x00007ffff763b507 in __assert_fail (
    assertion=0x555556541720 "!branchruledata->usehyptestforreliability || bestpscand != NULL", file=0x555556540f80 "/home/andful/projects/scip/src/scip/branch_relpscost.c", 
    line=850, function=0x555556542f80 <__PRETTY_FUNCTION__.6> "needsStrongBranching")
    at ./assert/assert.c:103
#7  0x00005555555bc426 in needsStrongBranching (scip=0x555556da89d0, 
    branchrule=0x555556dec970, branchcand=0x55555708f4b8, 
    branchcandfrac=0.38974176816065165, bestpscand=0x0, bestpscandfrac=0, reliable=10, 
    relerrorthreshold=0.050000000000000003, clevel=SCIP_CONFIDENCELEVEL_MEDIUM, 
    useancpscost=0) at /home/andful/projects/scip/src/scip/branch_relpscost.c:850
#8  0x00005555555beebe in execRelpscost (scip=0x555556da89d0, branchrule=0x555556dec970, 
    branchcands=0x5555571b22b0, branchcandssol=0x55555734d120, 
    branchcandsfrac=0x555557362800, branchorbitidx=0x0, nbranchcands=31, executebranch=1, 
    result=0x7fffffffca6c) at /home/andful/projects/scip/src/scip/branch_relpscost.c:1338
#9  0x00005555555c3646 in branchExeclpRelpscost (scip=0x555556da89d0, 
    branchrule=0x555556dec970, allowaddcons=1, result=0x7fffffffca6c)
    at /home/andful/projects/scip/src/scip/branch_relpscost.c:2190
#10 0x0000555555cd80ea in SCIPbranchruleExecLPSol (branchrule=0x555556dec970, 
    set=0x555556dad8c0, stat=0x55555705b990, tree=0x555556f87780, 
    sepastore=0x5555572264d0, cutoffbound=67233728.000100002, allowaddcons=1, 
    result=0x7fffffffca6c) at /home/andful/projects/scip/src/scip/branch.c:1590
#11 0x0000555555cdb139 in SCIPbranchExecLP (blkmem=0x555556dab7e0, set=0x555556dad8c0, 
    stat=0x55555705b990, transprob=0x55555705b870, origprob=0x55555705c8c0, 
    tree=0x555556f87780, reopt=0x0, lp=0x5555570a3da0, sepastore=0x5555572264d0, 
    branchcand=0x55555702f300, eventqueue=0x555557071380, cutoffbound=67233728.000100002, 
    allowaddcons=1, result=0x7fffffffca6c)
    at /home/andful/projects/scip/src/scip/branch.c:2591
#12 0x0000555555fd5d2b in SCIPbranchLP (scip=0x555556da89d0, result=0x7fffffffca6c)
--Type  for more, q to quit, c to continue without paging--
    at /home/andful/projects/scip/src/scip/scip_branch.c:1241
#13 0x0000555555680925 in consEnfolpIntegral (scip=0x555556da89d0, 
    conshdlr=0x555556dece80, conss=0x0, nconss=0, nusefulconss=0, solinfeasible=0, 
    result=0x7fffffffca6c) at /home/andful/projects/scip/src/scip/cons_integral.c:106
#14 0x0000555555d1d196 in SCIPconshdlrEnforceLPSol (conshdlr=0x555556dece80, 
    blkmem=0x555556dab7e0, set=0x555556dad8c0, stat=0x55555705b990, tree=0x555556f87780, 
    sepastore=0x5555572264d0, solinfeasible=0, result=0x7fffffffca6c)
    at /home/andful/projects/scip/src/scip/cons.c:3471
#15 0x00005555560cab28 in enforceConstraints (blkmem=0x555556dab7e0, set=0x555556dad8c0, 
    messagehdlr=0x555556da8ad0, stat=0x55555705b990, prob=0x55555705b870, 
    primal=0x55555706b740, tree=0x555556f87780, lp=0x5555570a3da0, 
    relaxation=0x55555706b7c0, sepastore=0x5555572264d0, branchcand=0x55555702f300, 
    branched=0x7fffffffcc4c, cutoff=0x7fffffffceec, infeasible=0x7fffffffcef8, 
    propagateagain=0x7fffffffcc44, solvelpagain=0x7fffffffcc40, 
    solverelaxagain=0x7fffffffcc3c, forced=0)
    at /home/andful/projects/scip/src/scip/solve.c:3625
#16 0x00005555560cefd3 in solveNode (blkmem=0x555556dab7e0, set=0x555556dad8c0, 
    messagehdlr=0x555556da8ad0, stat=0x55555705b990, mem=0x555556da9770, 
    origprob=0x55555705c8c0, transprob=0x55555705b870, primal=0x55555706b740, 
    tree=0x555556f87780, reopt=0x0, lp=0x5555570a3da0, relaxation=0x55555706b7c0, 
    pricestore=0x555557221f30, sepastore=0x5555572264d0, branchcand=0x55555702f300, 
    cutpool=0x555557226550, delayedcutpool=0x5555572265e0, conflict=0x555556dbc7b0, 
    conflictstore=0x555557065d20, eventfilter=0x555556e14ec0, eventqueue=0x555557071380, 
    cliquetable=0x5555570b4c90, cutoff=0x7fffffffceec, postpone=0x7fffffffcef0, 
    unbounded=0x7fffffffcef4, infeasible=0x7fffffffcef8, restart=0x7fffffffd128, 
    afternodeheur=0x7fffffffcf00, stopped=0x7fffffffcf04)
    at /home/andful/projects/scip/src/scip/solve.c:4530
#17 0x00005555560d28ee in SCIPsolveCIP (blkmem=0x555556dab7e0, set=0x555556dad8c0, 
    messagehdlr=0x555556da8ad0, stat=0x55555705b990, mem=0x555556da9770, 
    origprob=0x55555705c8c0, transprob=0x55555705b870, primal=0x55555706b740, 
    tree=0x555556f87780, reopt=0x0, lp=0x5555570a3da0, relaxation=0x55555706b7c0, 
    pricestore=0x555557221f30, sepastore=0x5555572264d0, cutpool=0x555557226550, 
    delayedcutpool=0x5555572265e0, branchcand=0x55555702f300, conflict=0x555556dbc7b0, 
    conflictstore=0x555557065d20, eventfilter=0x555556e14ec0, eventqueue=0x555557071380, 
    cliquetable=0x5555570b4c90, restart=0x7fffffffd128)
    at /home/andful/projects/scip/src/scip/solve.c:5212
#18 0x00005555560494b7 in SCIPsolve (scip=0x555556da89d0)
    at /home/andful/projects/scip/src/scip/scip_solve.c:2658
#19 0x000055555587dc4f in SCIPdialogExecOptimize (scip=0x555556da89d0, 
    dialog=0x555556dcf7e0, dialoghdlr=0x555556dcc910, nextdialog=0x7fffffffd2e0)
    at /home/andful/projects/scip/src/scip/dialog_default.c:2192
#20 0x0000555555d76c2d in SCIPdialogExec (dialog=0x555556dcf7e0, set=0x555556dad8c0, 
    dialoghdlr=0x555556dcc910, nextdialog=0x7fffffffd2e0)
    at /home/andful/projects/scip/src/scip/dialog.c:951
--Type  for more, q to quit, c to continue without paging--
#21 0x0000555555d74dbb in SCIPdialoghdlrExec (dialoghdlr=0x555556dcc910, 
    set=0x555556dad8c0) at /home/andful/projects/scip/src/scip/dialog.c:402
#22 0x0000555555ff4e86 in SCIPstartInteraction (scip=0x555556da89d0)
    at /home/andful/projects/scip/src/scip/scip_dialog.c:252
#23 0x000055555608b2a3 in SCIPprocessShellArguments (scip=0x555556da89d0, argc=9, 
    argv=0x7fffffffd998, defaultsetname=0x555556535004 "scip.set")
    at /home/andful/projects/scip/src/scip/scipshell.c:538
#24 0x000055555608b43a in SCIPrunShell (argc=9, argv=0x7fffffffd998, 
    defaultsetname=0x555556535004 "scip.set")
    at /home/andful/projects/scip/src/scip/scipshell.c:594
#25 0x000055555557926f in main (argc=9, argv=0x7fffffffd998)
    at /home/andful/projects/scip/src/main.c:71

(Locals unchanged)

@Andful
Copy link
Author

Andful commented Oct 8, 2024

I accidentally used the LP from #110 and it also fails with that LP

Backtrace
#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=)
    at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=)
    at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=, signo=signo@entry=6)
    at ./nptl/pthread_kill.c:89
#3  0x00007ffff764526e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x00007ffff76288ff in __GI_abort () at ./stdlib/abort.c:79
#5  0x00007ffff762881b in __assert_fail_base (
    fmt=0x7ffff77d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
    assertion=assertion@entry=0x555556541720 "!branchruledata->usehyptestforreliability || bestpscand != NULL", 
    file=file@entry=0x555556540f80 "/home/andful/projects/scip/src/scip/branch_relpscost.c", line=line@entry=850, 
    function=function@entry=0x555556542f80 <__PRETTY_FUNCTION__.6> "needsStrongBranching")
    at ./assert/assert.c:94
#6  0x00007ffff763b507 in __assert_fail (
    assertion=0x555556541720 "!branchruledata->usehyptestforreliability || bestpscand != NULL", file=0x555556540f80 "/home/andful/projects/scip/src/scip/branch_relpscost.c", 
    line=850, function=0x555556542f80 <__PRETTY_FUNCTION__.6> "needsStrongBranching")
    at ./assert/assert.c:103
#7  0x00005555555bc426 in needsStrongBranching (scip=0x555556da89d0, 
    branchrule=0x555556dec970, branchcand=0x555557078158, 
    branchcandfrac=0.9894513898617967, bestpscand=0x0, bestpscandfrac=0, reliable=10, 
    relerrorthreshold=0.050000000000000003, clevel=SCIP_CONFIDENCELEVEL_MEDIUM, 
    useancpscost=0) at /home/andful/projects/scip/src/scip/branch_relpscost.c:850
#8  0x00005555555beebe in execRelpscost (scip=0x555556da89d0, branchrule=0x555556dec970, 
    branchcands=0x55555712b590, branchcandssol=0x555557177a80, 
    branchcandsfrac=0x555557178b70, branchorbitidx=0x0, nbranchcands=2, executebranch=1, 
    result=0x7fffffffca6c) at /home/andful/projects/scip/src/scip/branch_relpscost.c:1338
#9  0x00005555555c3646 in branchExeclpRelpscost (scip=0x555556da89d0, 
    branchrule=0x555556dec970, allowaddcons=1, result=0x7fffffffca6c)
    at /home/andful/projects/scip/src/scip/branch_relpscost.c:2190
#10 0x0000555555cd80ea in SCIPbranchruleExecLPSol (branchrule=0x555556dec970, 
    set=0x555556dad8c0, stat=0x55555705b990, tree=0x555556f87780, 
    sepastore=0x555557092c80, cutoffbound=-0.97912300302553346, allowaddcons=1, 
    result=0x7fffffffca6c) at /home/andful/projects/scip/src/scip/branch.c:1590
#11 0x0000555555cdb139 in SCIPbranchExecLP (blkmem=0x555556dab7e0, set=0x555556dad8c0, 
    stat=0x55555705b990, transprob=0x55555705b870, origprob=0x55555705c8c0, 
    tree=0x555556f87780, reopt=0x0, lp=0x5555570660b0, sepastore=0x555557092c80, 
    branchcand=0x55555702f300, eventqueue=0x555557075470, 
    cutoffbound=-0.97912300302553346, allowaddcons=1, result=0x7fffffffca6c)
    at /home/andful/projects/scip/src/scip/branch.c:2591
#12 0x0000555555fd5d2b in SCIPbranchLP (scip=0x555556da89d0, result=0x7fffffffca6c)
--Type  for more, q to quit, c to continue without paging--
    at /home/andful/projects/scip/src/scip/scip_branch.c:1241
#13 0x0000555555680925 in consEnfolpIntegral (scip=0x555556da89d0, 
    conshdlr=0x555556dece80, conss=0x0, nconss=0, nusefulconss=0, solinfeasible=0, 
    result=0x7fffffffca6c) at /home/andful/projects/scip/src/scip/cons_integral.c:106
#14 0x0000555555d1d196 in SCIPconshdlrEnforceLPSol (conshdlr=0x555556dece80, 
    blkmem=0x555556dab7e0, set=0x555556dad8c0, stat=0x55555705b990, tree=0x555556f87780, 
    sepastore=0x555557092c80, solinfeasible=0, result=0x7fffffffca6c)
    at /home/andful/projects/scip/src/scip/cons.c:3471
#15 0x00005555560cab28 in enforceConstraints (blkmem=0x555556dab7e0, set=0x555556dad8c0, 
    messagehdlr=0x555556da8ad0, stat=0x55555705b990, prob=0x55555705b870, 
    primal=0x55555706bd30, tree=0x555556f87780, lp=0x5555570660b0, 
    relaxation=0x55555706bdb0, sepastore=0x555557092c80, branchcand=0x55555702f300, 
    branched=0x7fffffffcc4c, cutoff=0x7fffffffceec, infeasible=0x7fffffffcef8, 
    propagateagain=0x7fffffffcc44, solvelpagain=0x7fffffffcc40, 
    solverelaxagain=0x7fffffffcc3c, forced=0)
    at /home/andful/projects/scip/src/scip/solve.c:3625
#16 0x00005555560cefd3 in solveNode (blkmem=0x555556dab7e0, set=0x555556dad8c0, 
    messagehdlr=0x555556da8ad0, stat=0x55555705b990, mem=0x555556da9770, 
    origprob=0x55555705c8c0, transprob=0x55555705b870, primal=0x55555706bd30, 
    tree=0x555556f87780, reopt=0x0, lp=0x5555570660b0, relaxation=0x55555706bdb0, 
    pricestore=0x55555712b6d0, sepastore=0x555557092c80, branchcand=0x55555702f300, 
    cutpool=0x555557129de0, delayedcutpool=0x555557129e70, conflict=0x555556dbc7b0, 
    conflictstore=0x555557065d20, eventfilter=0x555556e14ec0, eventqueue=0x555557075470, 
    cliquetable=0x55555707d230, cutoff=0x7fffffffceec, postpone=0x7fffffffcef0, 
    unbounded=0x7fffffffcef4, infeasible=0x7fffffffcef8, restart=0x7fffffffd128, 
    afternodeheur=0x7fffffffcf00, stopped=0x7fffffffcf04)
    at /home/andful/projects/scip/src/scip/solve.c:4530
#17 0x00005555560d28ee in SCIPsolveCIP (blkmem=0x555556dab7e0, set=0x555556dad8c0, 
    messagehdlr=0x555556da8ad0, stat=0x55555705b990, mem=0x555556da9770, 
    origprob=0x55555705c8c0, transprob=0x55555705b870, primal=0x55555706bd30, 
    tree=0x555556f87780, reopt=0x0, lp=0x5555570660b0, relaxation=0x55555706bdb0, 
    pricestore=0x55555712b6d0, sepastore=0x555557092c80, cutpool=0x555557129de0, 
    delayedcutpool=0x555557129e70, branchcand=0x55555702f300, conflict=0x555556dbc7b0, 
    conflictstore=0x555557065d20, eventfilter=0x555556e14ec0, eventqueue=0x555557075470, 
    cliquetable=0x55555707d230, restart=0x7fffffffd128)
    at /home/andful/projects/scip/src/scip/solve.c:5212
#18 0x00005555560494b7 in SCIPsolve (scip=0x555556da89d0)
    at /home/andful/projects/scip/src/scip/scip_solve.c:2658
#19 0x000055555587dc4f in SCIPdialogExecOptimize (scip=0x555556da89d0, 
    dialog=0x555556dcf7e0, dialoghdlr=0x555556dcc910, nextdialog=0x7fffffffd2e0)
    at /home/andful/projects/scip/src/scip/dialog_default.c:2192
#20 0x0000555555d76c2d in SCIPdialogExec (dialog=0x555556dcf7e0, set=0x555556dad8c0, 
    dialoghdlr=0x555556dcc910, nextdialog=0x7fffffffd2e0)
    at /home/andful/projects/scip/src/scip/dialog.c:951
--Type  for more, q to quit, c to continue without paging--
#21 0x0000555555d74dbb in SCIPdialoghdlrExec (dialoghdlr=0x555556dcc910, 
    set=0x555556dad8c0) at /home/andful/projects/scip/src/scip/dialog.c:402
#22 0x0000555555ff4e86 in SCIPstartInteraction (scip=0x555556da89d0)
    at /home/andful/projects/scip/src/scip/scip_dialog.c:252
#23 0x000055555608b2a3 in SCIPprocessShellArguments (scip=0x555556da89d0, argc=9, 
    argv=0x7fffffffd998, defaultsetname=0x555556535004 "scip.set")
    at /home/andful/projects/scip/src/scip/scipshell.c:538
#24 0x000055555608b43a in SCIPrunShell (argc=9, argv=0x7fffffffd998, 
    defaultsetname=0x555556535004 "scip.set")
    at /home/andful/projects/scip/src/scip/scipshell.c:594
#25 0x000055555557926f in main (argc=9, argv=0x7fffffffd998)
    at /home/andful/projects/scip/src/main.c:71

Locals

branchruledata = 0x555556dec5d8
pscostdownsize = 0
pscostupsize = 1
pscostsize = 0
dpscostdownsize = 0
dpscostupsize = 0
dpscostsize = 0
__PRETTY_FUNCTION__ = "needsStrongBranching"

@ambros-gleixner
Copy link
Member

Sorry, I forgot to check other occurrences of the function. Can you add

diff --git a/src/scip/branch_relpscost.c b/src/scip/branch_relpscost.c
index 7c46d60fce..615a0f1501 100644
--- a/src/scip/branch_relpscost.c
+++ b/src/scip/branch_relpscost.c
@@ -1234,8 +1234,8 @@ SCIP_RETCODE execRelpscost(
          for( c = 0; c < nbranchcands; ++c )
          {
             if( needsStrongBranching(scip, branchrule, branchcands[c], branchcandsfrac[c],
-                  bestpscand > 0 ? branchcands[bestpscand] : NULL,
-                  bestpscand > 0 ? branchcandsfrac[bestpscand] : 0.0,
+                  bestpscand >= 0 ? branchcands[bestpscand] : NULL,
+                  bestpscand >= 0 ? branchcandsfrac[bestpscand] : 0.0,
                   reliable, relerrorthreshold, clevel, useancpscost) )
             {
                useancpscost = FALSE;
@@ -1336,8 +1336,8 @@ SCIP_RETCODE execRelpscost(
             size = MIN(downsize, upsize);

             usesb = needsStrongBranching(scip, branchrule, branchcands[c], branchcandsfrac[c],
-                  bestpscand > 0 ? branchcands[bestpscand] : NULL,
-                  bestpscand > 0 ? branchcandsfrac[bestpscand] : 0.0,
+                  bestpscand >= 0 ? branchcands[bestpscand] : NULL,
+                  bestpscand >= 0 ? branchcandsfrac[bestpscand] : 0.0,
                   reliable, relerrorthreshold, clevel, FALSE);

             /* count the number of variables that are completely uninitialized */

@Andful
Copy link
Author

Andful commented Oct 8, 2024

Yes, that fixes it!!

@ambros-gleixner
Copy link
Member

Great. This will be available on master within the next days. Please check again and close the issue if master works for you without patch.

@DominikKamp
Copy link
Contributor

The fix is available with be3ef27.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants