<br><tt><font size=2>Kish:</font></tt>
<br><tt><font size=2><br>
> However, should my code have reached here under normal circumstances,
or<br>
> are the printf's<br>
> here to show the user an error condition?<br>
</font></tt>
<br><tt><font size=2>Yes - your code should have reached there under normal
circumstances. I'm not sure how those printf's sneaked in there.
Francois Margot (thank you!) has fixed the code in svn (both trunk and
stable). </font></tt>
<br>
<br><tt><font size=2>Robin</font></tt>
<br>
<br>
<br><tt><font size=2><br>
> ---------- Forwarded message ----------<br>
> Date: Sat, 11 Nov 2006 02:58:09 +0000<br>
> From: Kish Shen <kish.shen@crosscoreop.com><br>
> Reply-To: Discussions about open source software for Operations Research<br>
> <coin-discuss@list.coin-or.org><br>
> To: coin-discuss@list.coin-or.org<br>
> Subject: [Coin-discuss] debug printf left in CglKnapsackCover.cpp?<br>
><br>
> Hi,<br>
><br>
> I was running some code using Cbc, and some extra output was produced:<br>
><br>
> At one 1<br>
> 88 21 1.48197<br>
> frac 2<br>
> 23 2.0833 0.746648<br>
> 94 0.6667 0.373324<br>
><br>
> These look like some sort of debugging output, and after some checking,
I<br>
> found that they<br>
> came from CglKnapsackCover.cpp, in the function<br>
> liftUpDownAndUncomplementAndAdd():<br>
><br>
> if (unsatRhs<=0.0&&fabs(xstar[firstFrac])>epsilon2_)
{<br>
> printf("At one %d\n",atOne.getNumElements());<br>
> for (i=0; i<atOne.getNumElements(); i++){<br>
> int iColumn = atOne.getIndices()[i];<br>
> printf("%d %g %g\n",atOne.getIndices()[i],atOne.getElements()[i],<br>
>
xstar[iColumn]);<br>
> }<br>
> printf("frac %d\n",fracCover.getNumElements());<br>
> for (i=0; i<fracCover.getNumElements(); i++){<br>
> int iColumn = fracCover.getIndices()[i];<br>
> printf("%d %g<br>
> %g\n",fracCover.getIndices()[i],fracCover.getElements()[i],<br>
>
xstar[iColumn]);<br>
> }<br>
><br>
> I assume these should only be printed if debugging, so I have put
a #ifdef<br>
> PRINT_DEBUG<br>
> around this code.<br>
><br>
> However, should my code have reached here under normal circumstances,
or<br>
> are the printf's<br>
> here to show the user an error condition?<br>
><br>
> I am using the trunk branch, but I checked the stable branch, and
the<br>
> above code is also there.<br>
><br>
> Looking at CglKnapsackCover.cpp, I found another printf that is not<br>
> enclosed by ifdefs, in<br>
> deriveAKnapsack(), around line 928 in my copy of the file:<br>
><br>
> printf("*** Doubleton Row is ");<br>
> for(i=0; i<2; i++){<br>
> int iColumn
= indices[i];<br>
> sum += elements[i]*xstar[iColumn];<br>
> printf("%d
(coeff = %g, value = %g} ",indices[i],<br>
>
elements[i],xstar[iColumn]);<br>
> }<br>
> printf("<= %g - go for it\n",b);<br>
><br>
> Should there be an ifdef around this as well?<br>
><br>
> --Kish Shen<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
</font></tt>