[Coin-lpsolver] checkClear() in createRim() and NDEBUG compilation flag
John J Forrest
jjforre at us.ibm.com
Sun Aug 14 02:47:47 EDT 2005
Francois,
If it fails it is a serious bug. The checkClear is expensive so should
not be in for production work. Try if a clear() before gets rid of error
and if so move clear up into whatever code calls it. If you tell me a bit
more I will try and fix.
John
Francois Margot <fmargot at andrew.cmu.edu>
Sent by: coin-lpsolver-bounces at list.coin-or.org
08/13/2005 06:49 AM
To
coin-lpsolver at list.coin-or.org
cc
Subject
[Coin-lpsolver] checkClear() in createRim() and NDEBUG compilation flag
If I want to compile an optimized version of Clp (-O) should I use the
flag NDEBUG or not? In Makefile.Clp, I have:
ifeq ($(OptLevel),-g)
# CXXFLAGS += -DCLP_DEBUG
#CXXFLAGS += -DPRESOLVE_DEBUG=1
endif
ifeq ($(OptLevel),-O2)
# CXXFLAGS += -DNDEBUG
endif
meaning that NDEBUG is not used, even when optimization is set. Is this
correct?
Moreover, in ClpSimplex::createRim(), around lines 3362 in ClpSimplex.cpp,
I have
#ifndef NDEBUG
for (iRow=0;iRow<4;iRow++) {
int length =numberRows2+factorization_->maximumPivots();
if (iRow==3||objective_->type()>1)
length += numberColumns_;
assert(rowArray_[iRow]->capacity()==length);
rowArray_[iRow]->checkClear();
}
for (iColumn=0;iColumn<2;iColumn++) {
int length =numberColumns_;
if (iColumn)
length=CoinMax(numberRows2,numberColumns_);
assert(columnArray_[iColumn]->capacity()==length);
columnArray_[iColumn]->checkClear();
}
#endif
The code sometimes stops in the calls to
rowArray_[iRow]->checkClear();
columnArray_[iColumn]->checkClear();
Are these calls debugging checks only or is it a serious failure?
If the latter is true, can I simply clear the vectors and continue?
Francois
_______________________________________________
Coin-lpsolver mailing list
Coin-lpsolver at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/coin-lpsolver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20050814/c4061b76/attachment.html>
More information about the Clp
mailing list