Closed madeken closed 1 year ago
It's helpful to provide the command line and the full output.
This appears to be an issue with the LP format file reader in CoinUtils, so I transferred the issue here. The reason there is no errror message and the code eventually just aborts seems to be because it gets caught in an infinite loop that repeatedly allocates more memory and probably runs out eventually.
I'm not 100 percent sure yet, but it seems to be some kind of buffer overflow. There are some hard-coded buffer lengths in the reader code, which is unfortunate. If I put a line break in the file after every +
and also between all the variable names in the binaries section, it works fine. Maybe @jjhforrest can take a look?
I don't understand much of the coding in CoinLpIO.cpp - but still try to fix bugs. In August last year a change was made to fix some problem with long lines, but I can't find case that caused problem. A different approach was taken in master, which reads this problem file without any problems. Anyway, I have taken out that change - which fixes problem with regression.lp.
I was wondering about the abs(bufferLength_)
there, but I assumed a negative value in bufferlength_
must be legitimate and have some interpretation. Anyway, sounds like this is fixed up in master, so probably not worth digging into what's going on too much.
Fixed by 4ef80671.
@tkralphs @jjhforrest If you guys want to add my .lp file to the test suite, I have no problems with it by the way!
I've previously been using cbc with 2.9.9 and upgraded to 2.10.10 but I am struggling to load models. Here's an example problem:
https://gist.github.com/madeken/cf6d0733cf6e8ff7c854722085d09c1b
The problem seems to be due to long-lines in the .lp file. I realize the
.lp
spec says"The maximum length of any line of input is 560"
but as far as I can tell cbc 2.10.? is the only solver that actually cares and it's kind of annoying to have to have to pre-process files to insert line breaks.