[Coin-lpsolver] Assert Problems

John J Forrest jjforre at us.ibm.com
Tue Mar 1 10:00:06 EST 2005


Kyle,

a) the error does not look wonderful.  It is just possible that it is just 
infeasible but it is still an unlikely value.  I can't really help just 
from message.

(On your note about CoinMpsIo - if you send file I can easily fix and it 
may give a clue about objective problem).

You raise an interesting issue on asserts and I would welcome discussion. 
I can see three sorts of uses of assert -
1) Double checking on some logical error - in my case that might be an 
array that is marked as all zero when it is not.  This is sometimes but 
not always on a -Dxxx_DEBUG flag given to compiler.
2) Something that should not happen but the code will recover - it may 
have happened once and I want to track it down.
3) Something that should not happen but the code can't recover.

At present with gcc and optimization -DNDEBUG is set and with some other 
compilers that is also true.  So in that case all asserts are null tests. 
So it is perfectly possible that your error would go away if you used a 
greater optimization level.  However that is obviously not acceptable.

As asserts slow down the code I could look into using CoinAssert which we 
could define.  This could print the same message but throw a clean 
exception.  I would leave some type 1 asserts as they are but change 
others.  Comments?

It is possible you can trap an assert - I see it throws some sort of 
exception but it looks fairly fatal.

John Forrest



Kyle Ellrott <kellrott at csbl.bmb.uga.edu> 
Sent by: coin-lpsolver-bounces at list.coin-or.org
02/28/2005 07:26 PM

To
coin-lpsolver at list.coin-or.org
cc

Subject
[Coin-lpsolver] Assert Problems






Under particular situations my software will produce assert errors in 
the COIN library.  Namely:

OsiClpSolverInterface.cpp:480: failed assertion 
`modelPtr_->objectiveValue()<1.0e100'

What is this error indicative of?  Also is there any way to make COIN 
respond to bad input a little less dramatically?  I would prefer a 
return with an error, something that would let my software respond 
accordingly, rather then killing everything in it's tracks.

Kyle

_______________________________________________
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/20050301/ce2ce9c1/attachment.html>


More information about the Clp mailing list