<br><font size=2 face="sans-serif">Francois,</font>
<br>
<br><font size=2 face="sans-serif">If it fails it is a serious bug. &nbsp;The
checkClear is expensive so should not be in for production work. &nbsp;Try
if a clear() before gets rid of error and if so move clear up into whatever
code calls it. &nbsp;If you tell me a bit more I will try and fix.</font>
<br>
<br><font size=2 face="sans-serif">John</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Francois Margot &lt;fmargot@andrew.cmu.edu&gt;</b>
</font>
<br><font size=1 face="sans-serif">Sent by: coin-lpsolver-bounces@list.coin-or.org</font>
<p><font size=1 face="sans-serif">08/13/2005 06:49 AM</font>
<td width=59%>
<table width=100%>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td valign=top><font size=1 face="sans-serif">coin-lpsolver@list.coin-or.org</font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td valign=top>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td valign=top><font size=1 face="sans-serif">[Coin-lpsolver] checkClear()
in createRim() and NDEBUG compilation &nbsp; &nbsp; &nbsp; &nbsp;flag</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2><tt><br>
If I want to compile an optimized version of Clp (-O) should I use the<br>
flag NDEBUG or not? In Makefile.Clp, I have:<br>
<br>
 &nbsp;ifeq ($(OptLevel),-g)<br>
# &nbsp; &nbsp; CXXFLAGS += -DCLP_DEBUG<br>
#CXXFLAGS += -DPRESOLVE_DEBUG=1<br>
endif<br>
ifeq ($(OptLevel),-O2)<br>
# &nbsp; &nbsp; CXXFLAGS += -DNDEBUG<br>
endif<br>
<br>
meaning that NDEBUG is not used, even when optimization is set. Is this<br>
correct?<br>
<br>
Moreover, in ClpSimplex::createRim(), around lines 3362 in ClpSimplex.cpp,
<br>
I have<br>
<br>
#ifndef NDEBUG<br>
 &nbsp; &nbsp; &nbsp; for (iRow=0;iRow&lt;4;iRow++) {<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int
length =numberRows2+factorization_-&gt;maximumPivots();<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if
(iRow==3||objective_-&gt;type()&gt;1)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;length += numberColumns_;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;assert(rowArray_[iRow]-&gt;capacity()==length);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; rowArray_[iRow]-&gt;checkClear();<br>
 &nbsp; &nbsp; &nbsp; }<br>
<br>
 &nbsp; &nbsp; &nbsp; for (iColumn=0;iColumn&lt;2;iColumn++) {<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int
length =numberColumns_;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if
(iColumn)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;length=CoinMax(numberRows2,numberColumns_);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;assert(columnArray_[iColumn]-&gt;capacity()==length);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; columnArray_[iColumn]-&gt;checkClear();<br>
 &nbsp; &nbsp; &nbsp; }<br>
#endif<br>
<br>
The code sometimes stops in the calls to<br>
<br>
rowArray_[iRow]-&gt;checkClear();<br>
columnArray_[iColumn]-&gt;checkClear();<br>
<br>
Are these calls debugging checks only or is it a serious failure?<br>
If the latter is true, can I simply clear the vectors and continue?<br>
<br>
Francois<br>
_______________________________________________<br>
Coin-lpsolver mailing list<br>
Coin-lpsolver@list.coin-or.org<br>
http://list.coin-or.org/mailman/listinfo/coin-lpsolver<br>
</tt></font>
<br>