coin-or / Cgl

Cut Generator Library
Other
24 stars 16 forks source link

Assertion in tree local cut generator #106

Open christoph-cullmann opened 3 months ago

christoph-cullmann commented 3 months ago

I run into

clpsolve: /local/ssd/cullmann/build/lpsolve.clpsolve/libcbc/src/Cbc/src/CbcTreeLocal.cpp:852: void CbcTreeLocal::deleteCut(OsiRowCut &): Assertion `i < n' failed.

with current master with local=on in this ILP. value_6497547.lp.txt.gz

❯ ./clpsolve test/value_6497547.lp                
This is clpsolve, Release: 24.04i, Build: 15676635, Tag: master, Branch: master
(c) Copyright AbsInt Angewandte Informatik GmbH
Progress: [12:59:18]: Reading lp file 'test/value_6497547.lp'...
Progress: [12:59:18]: Finished reading lp file.
Progress: [12:59:19]: 0 fixed, 785 tightened bounds, 89 strengthened rows, 0 substitutions
Progress: [12:59:19]: 0 fixed, 1283 tightened bounds, 667 strengthened rows, 0 substitutions
Progress: [12:59:20]: 0 fixed, 251 tightened bounds, 86 strengthened rows, 0 substitutions
Progress: [12:59:20]: 0 fixed, 23 tightened bounds, 29 strengthened rows, 0 substitutions
Progress: [12:59:20]: 0 fixed, 0 tightened bounds, 10 strengthened rows, 0 substitutions
Progress: [12:59:20]: 0 fixed, 0 tightened bounds, 9 strengthened rows, 0 substitutions
Progress: [12:59:20]: 0 fixed, 0 tightened bounds, 5 strengthened rows, 0 substitutions
Progress: [12:59:20]: processed model has 5847 rows, 5505 columns (5505 integer (1155 of which binary)) and 18806 elements
Progress: [12:59:21]: 12 added rows had average density of 8.5833333
Progress: [12:59:21]: At root node, 12 cuts changed objective from 6497568 to 6497547 in 5 passes
Progress: [12:59:21]: Cut generator 0 (Probing) - 8 row cuts average 4.9 elements, 0 column cuts (0 active)  in 0.093 seconds - new frequency is 1
Progress: [12:59:21]: Cut generator 1 (Gomory) - 13 row cuts average 9.8 elements, 0 column cuts (0 active)  in 0.004 seconds - new frequency is 1
Progress: [12:59:21]: Cut generator 2 (Reduce-and-split) - 0 row cuts average 0.0 elements, 0 column cuts (0 active)  in 0.006 seconds - new frequency is 1000
Progress: [12:59:21]: Cut generator 3 (Gomory(2)) - 13 row cuts average 9.4 elements, 0 column cuts (0 active)  in 0.002 seconds - new frequency is 1
Progress: [12:59:21]: Cut generator 4 (TwoMirCuts) - 21 row cuts average 8.6 elements, 0 column cuts (0 active)  in 0.005 seconds - new frequency is 1
Progress: [12:59:21]: Cut generator 5 (ZeroHalf) - 2 row cuts average 7.0 elements, 0 column cuts (0 active)  in 0.166 seconds - new frequency is 1
Progress: [12:59:21]: After 0 nodes, 1 on tree, -1e+50 best solution, best possible 6497547 (2.93 seconds)
Progress: [12:59:21]: Integer solution of 6489629 found by rounding after 18 iterations and 1 nodes (2.97 seconds)
Progress: [12:59:21]: Integer solution of 6497547 found by DiveAny after 19 iterations and 1 nodes (2.99 seconds)
clpsolve: /local/ssd/cullmann/build/lpsolve.clpsolve/libcbc/src/Cbc/src/CbcTreeLocal.cpp:852: void CbcTreeLocal::deleteCut(OsiRowCut &): Assertion `i < n' failed.
Assert: Caught fatal signal 6 (Aborted).
    Please report this problem to our support.
    Program: clpsolve, Release: 24.04i, Build: 15676635, Tag: master

    Backtrace (please include this in your support request):
     0# Ur::MessageHandler::print(Ur::Message&) in ./clpsolve
     1# Ur::Application::catchSignal(int) in ./clpsolve
     2# 0x000073A3C01AEAE0 in /usr/lib/libc.so.6
     3# 0x000073A3C0206E44 in /usr/lib/libc.so.6
     4# gsignal in /usr/lib/libc.so.6
     5# abort in /usr/lib/libc.so.6
     6# 0x000073A3C01963DF in /usr/lib/libc.so.6
     7# 0x000073A3C01A6C67 in /usr/lib/libc.so.6
     8# CbcTreeLocal::deleteCut(OsiRowCut&) in ./clpsolve
     9# CbcTreeLocal::empty() in ./clpsolve
    10# CbcModel::branchAndBound(int) in ./clpsolve
    11# CbcMain1(std::__1::deque<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>, CbcModel&, CbcParameters&, int (*)(CbcModel*, int), ampl_info*) in ./clpsolve
    12# CbcMain1(int, char const**, CbcModel&, CbcParameters&, int (*)(CbcModel*, int), ampl_info*) in ./clpsolve
    13# solveLP(char const*) in ./clpsolve
    14# main in ./clpsolve
    15# 0x000073A3C0197C88 in /usr/lib/libc.so.6
    16# __libc_start_main in /usr/lib/libc.so.6
    17# _start in ./clpsolve
jjhforrest commented 3 months ago

Easy to fix that bug - code did not realize it had optimal solution. However the code gives incorrect answers to many problems - I may try and understand code.

christoph-cullmann commented 3 months ago

Thanks for taking a look!