[Coin-discuss] arithmetic exception when using Cbc

Kish Shen kish.shen at crosscoreop.com
Thu Nov 2 11:28:15 EST 2006


Hi,

I am getting an arithmetic exception when using Cbc/Clp through OsiClp. The crash happens in
CbcModel.cpp, in gcd (line 84 in the copy I am using):

  while (remainder) {
    remainder = b % a;
    b = a;
    a = remainder;
  }
  return b;

The crash happens  in doing the % operation, I assume because a = -1.

This is within a call to a call to CbcModel's branchAndBound().

I am using Cbc/Clp as an MP solver for the Constraint Logic Programming Language ECLiPSe,
for which I am providing an interface. The original problem occurs in a program of one of our
users, and it happens after repeated solving and modification of the problem.

I have extracted the C/C++ calls to Osi/Cbc that reproduce this problem without ECLiPSe. The
file is quite big, nearly 300K in size, so I am not including it with this message.

I get this error with a copy of the development branch of Cbc I donwloaded on 2006-08-17. I have
just tried to run the same code with the latest development branch which I downloaded 
today (2006-11-02), but the program aborts much earlier. I haven't been able to look at why this
happens yet.

Does this problem look like it might be something that I am doing wrong, or something that
might have been fixed since August? 

I guess John Forrest might be interested in looking at the code that give this problem. Do
please let me know, and I can send the code to you.

Thanks in advance for any information and help!

Kish Shen





More information about the Coin-discuss mailing list