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

inconsistent save_non_semi_variable_index in HighsLP of analytic center #2142

Closed
svigerske opened this issue Jan 20, 2025 · 2 comments
Closed

Comments

@svigerske
Copy link
Collaborator

svigerske commented Jan 20, 2025

With highs_semibug.lp.txt, we get an error in HighsLp::unapplyMods().
The variable indices stored in this->mods_.save_non_semi_variable_index do not fit to this->integrality_. That is, this->mods_.save_non_semi_variable_index stores an index 49, while this->integrality_ has only 15 entries.
In presolve the MIP gets reduced from 51 to 15 entries.
My guess is that this->mods_ should not be present in this HighsLp (or that it was forgotten to update save_non_semi_variable_index when there are presolve reductions).

==877429== Invalid read of size 1
==877429==    at 0x5F9CACB: HighsLp::unapplyMods() (HighsLp.cpp:519)
==877429==    by 0x5F2D48F: Highs::returnFromRun(HighsStatus, bool) (Highs.cpp:4505)
==877429==    by 0x5F1DD3A: Highs::solve() (Highs.cpp:1705)
==877429==    by 0x5F1A7F2: Highs::run() (Highs.cpp:912)
==877429==    by 0x5FF9EDC: HighsMipSolverData::startAnalyticCenterComputation(highs::parallel::TaskGroup const&)::{lambda()#1}::operator()() const (HighsMipSolverData.cpp:323)
==877429==    by 0x6008A21: HighsTask::Callable<HighsMipSolverData::startAnalyticCenterComputation(highs::parallel::TaskGroup const&)::{lambda()#1}>::operator()() (HighsTask.h:57)
==877429==    by 0x600A2B1: HighsTask::run() (HighsTask.h:117)
==877429==    by 0x600A821: highs::parallel::sync(HighsSplitDeque*) (HighsParallel.h:68)
==877429==    by 0x600A8B8: highs::parallel::TaskGroup::sync() const (HighsParallel.h:90)
==877429==    by 0x5FFA20D: HighsMipSolverData::finishAnalyticCenterComputation(highs::parallel::TaskGroup const&) (HighsMipSolverData.cpp:340)
==877429==    by 0x6003FE5: HighsMipSolverData::evaluateRootNode() (HighsMipSolverData.cpp:2150)
==877429==    by 0x5FDF440: HighsMipSolver::run() (HighsMipSolver.cpp:194)
==877429==  Address 0x690ced1 is 31 bytes before a block of size 16 in arena "client"

(line numbers may be off by 2)

Running HiGHS 1.9.0 (git hash: bdf95f2e0): Copyright (c) 2025 HiGHS under MIT licence terms
MIP  highs_semibug has 50 rows; 51 cols; 142 nonzeros; 11 integer variables; 2 semi-continuous variables
Coefficient ranges:
  Matrix [2e-02, 4e+04]
  Cost   [1e+00, 1e+00]
  Bound  [8e-02, 4e+04]
  RHS    [2e+00, 5e+03]
WARNING: 2 semi-continuous/integer variable(s) have zero lower bound so are continuous/integer
Presolving model
24 rows, 25 cols, 87 nonzeros  0s
14 rows, 25 cols, 67 nonzeros  0s
4 rows, 15 cols, 47 nonzeros  0s

Solving MIP model with:
   4 rows
   15 cols (11 binary, 0 integer, 0 implied int., 4 continuous)
   47 nonzeros

Src: B => Branching; C => Central rounding; F => Feasibility pump; H => Heuristic; L => Sub-MIP;
     P => Empty MIP; R => Randomized rounding; S => Solve LP; T => Evaluate node; U => Unbounded;
     z => Trivial zero; l => Trivial lower; u => Trivial upper; p => Trivial point

        Nodes      |    B&B Tree     |            Objective Bounds              |  Dynamic Constraints |       Work      
Src  Proc. InQueue |  Leaves   Expl. | BestBound       BestSol              Gap |   Cuts   InLp Confl. | LpIters     Time

         0       0         0   0.00%   1.1             -inf                 inf        0      0      0         0     0.5s
 R       0       0         0   0.00%   1.1             -73.4740259      101.50%        0      0      0         1     0.9s
@jajhall
Copy link
Member

jajhall commented Jan 20, 2025

Thanks, I'll investigate

@jajhall
Copy link
Member

jajhall commented Jan 20, 2025

Fixed by #2143

@jajhall jajhall closed this as completed Jan 20, 2025
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

2 participants