Opened 14 years ago

Closed 13 years ago

#3 closed defect (invalid)

fix failed assertion in CoinPackedMatrix::removeGaps

Reported by: dmg Owned by: somebody
Priority: major Milestone:
Component: component1 Version:
Keywords: Cc:

Description

We have an example (in a Sandia application that calls the COIN MIP solver) in which line 2368 of ClpPackedMatrix::allElementsInRange invokes

matrix_->compress(smallest);

and soon thereafter we get a failed assertion at CoinPackedMatrix?.cpp:604. Here's a partial traceback at the invocation of matrix_->compress(smallest:

#0 ClpPackedMatrix::allElementsInRange (this=0x8d8dbb0, model=0xbff76c2c,

smallest=9.9999999999999995e-21, largest=1e+20, check=15) at ClpPackedMatrix?.cpp:2368

#1 0x081ee330 in ClpPresolve::presolvedModel (this=0xbff766a0,

si=@0xbff76c2c, feasibilityTolerance=1e-08, keepIntegers=false, numberPasses=5, dropNames=true, doRowObjective=false) at ClpPresolve?.cpp:97

#2 0x08260f59 in ClpSimplex::initialSolve (this=0xbff76c2c,

options=@0xbff76f80) at ClpSolve?.cpp:590

#3 0x081ae2a7 in OsiClpSolverInterface::initialSolve (this=0x8d8d288)

at OsiClpSolverInterface?.cpp:274

and here's a partial traceback at the failed assertion:

#0 0x00edf402 in kernel_vsyscall () #1 0x00324f90 in raise () from /lib/libc.so.6 #2 0x00326678 in abort () from /lib/libc.so.6 #3 0x0031e269 in assert_fail () from /lib/libc.so.6 #4 0x08071a56 in CoinPackedMatrix::removeGaps (this=0x8d98c60)

at CoinPackedMatrix?.cpp:604

#5 0x081f3fd2 in ClpPresolve::gutsOfPresolvedModel (this=0xbff766a0,

originalModel=0xbff76c2c, feasibilityTolerance=1e-08, keepIntegers=false, numberPasses=5, dropNames=true, doRowObjective=false) at ClpPresolve?.cpp:1718

#6 0x081ee36d in ClpPresolve::presolvedModel (this=0xbff766a0,

si=@0xbff76c2c, feasibilityTolerance=1e-08, keepIntegers=false, numberPasses=5, dropNames=true, doRowObjective=false) at ClpPresolve?.cpp:102

#7 0x08260f59 in ClpSimplex::initialSolve (this=0xbff76c2c,

options=@0xbff76f80) at ClpSolve?.cpp:590

#8 0x081ae2a7 in OsiClpSolverInterface::initialSolve (this=0x8d8d288)

at OsiClpSolverInterface?.cpp:274

As a work-around (which may not accord with your design philosophy), I modified our copy of the COIN source as follows: I added

int really_compress(double threshold);

to CoinPackedMatrix? (in CoinUtils?/src/CoinPackedMatrix.hpp), changed line 2368 ofClp/src/ClpPackedMatrix.cpp to

matrix_->really_compress(smallest);

and added the following implementation of really_compress to CoinUtils?/src/CoinPackedMatrix.cpp:

int CoinPackedMatrix::really_compress(double threshold) {

CoinBigIndex? i, j, k, k0, m, n, nelim; m = majorDim_; for (i = k = nelim = 0; i < m; i++) {

j = start_[i]; start_[i] = k0 = k; for (n = j + length_[i]; j < n; j++) {

if (fabs(element_[j])>=threshold) {

element_[k]=element_[j]; index_[k++]=index_[j];

} else {

++nelim;

}

} length_[i] = k - k0;

} start_[m] = k; size_ -= nelim; return nelim;

}

Change History (2)

comment:1 Changed 13 years ago by ladanyi

Hello,

I'm trying to clean up the old Clp tickets. Could you check that the ticket you submitted (#3) is still valid against the latest stable version (stable/1.5)?

Thanks, --Laci

comment:2 Changed 13 years ago by ladanyi

  • Resolution set to invalid
  • Status changed from new to closed

No reply to request made on 09/05/07. Closing ticket.

--Laci

Note: See TracTickets for help on using tickets.