Closed svigerske closed 2 years ago
Can't see any obvious recent changes to cause this. Looking at release 2_108, I think the call to setBestSolution at 7363 of CbcSolver.cpp is the one giving the error. Does the error go away if the argument model.solver()->getNumCols(), is changed to CoinMin(model.solver()->getNumCols(),babModel->solver()->getNumCols())
Yes, that helps!
╶ Main iteration step ────────────────────────────────────────────────────────────────────────────────────────────────╴
Iteration │ Time │ Dual cuts │ Objective value │ Objective gap │ Current solution
#: type │ tot. │ + | tot. │ dual | primal │ abs. | rel. │ obj.fn. | max.err.
╶─────────────────┴────────┴─────────────┴─────────────────────────┴───────────────────┴──────────────────────────────╴
| 8 variables fixed
| 0 fixed, 0 tightened bounds, 10 strengthened rows, 1 substitutions
| processed model has 17 rows, 13 columns (5 integer (5 of which binary)) and 43 elements
| Initial state - 3 integers unsatisfied sum - 0.872028
| Pass 1: suminf. 0.00000 (0) obj. -1e+09 iterations 3
| Solution found of -1e+09
| Relaxing continuous gives -1e+09
| Before mini branch and bound, 2 integers at bound fixed and 5 continuous
| Mini branch and bound did not improve solution (0.76 seconds)
| After 0.78 seconds - Feasibility pump exiting with objective of -1e+09 - took 0.19 seconds
| Integer solution of -1e+09 found by feasibility pump after 0 iterations and 0 nodes (0.88 seconds)
| Search completed - best objective -1000000000, took 0 iterations and 0 nodes (0.91 seconds)
| Maximum depth 0, 0 variables fixed on reduced cost
1: MILP-F 17.36 -inf. | inf. inf. | inf. -1e+09 | 101: 1.05e+02
1: NLPSOLPT-O 19.17 -inf. | 582.236 inf. | inf. 582.236 | 8: 0.00e+00
| 8 variables fixed
| 0 fixed, 0 tightened bounds, 11 strengthened rows, 1 substitutions
| 0 fixed, 0 tightened bounds, 1 strengthened rows, 0 substitutions
| processed model has 23 rows, 18 columns (6 integer (6 of which binary)) and 71 elements
| MIPStart provided solution with cost 582.236
| Integer solution of -117571.84 found by Reduced search after 0 iterations and 0 nodes (0.21 seconds)
| Integer solution of -117786.46 found by DiveCoefficient after 0 iterations and 0 nodes (0.32 seconds)
2: MILP-O 21.10 6 | 6 -117837*| 582.236 1.2e+05 | 2.0e+02 -117837 | 8: 1.12e+03
2: NLPNEWDB-O 21.32 6 | 6 -117837*| 317.285 inf. | inf. 317.285 | 8: 0.00e+00
Thank you!
Fixed by coin-or/Cbc@07f2287276c
We have recently updated to the latest releases of Cbc, Cgl, Osi, Clp, CoinUtils. On GAMS modellib model minlphix I sometimes get a crash on Windows (difficult to reproduce) and some serious complaints from valgrind on some memcopy within CbcModel.
The memcpy that is problematic is the last line of
Somehow is reads more bytes from
solution
than have been allocated. (Note thatnumberColumns
is hereCoinMax(numberColumns, solver_->getNumCols())
.)The solution array has been allocated in the last line of:
Here,
n
is onlysolver_->getNumCols()
.More detailed log:
CC @jjhforrest