Cbc icon indicating copy to clipboard operation
Cbc copied to clipboard

Numerical exception on Windows with preprocess=on

Open christoph-cullmann opened this issue 11 months ago • 10 comments

preprocess=on or all other values I tried beside off result in a crash on Windows, works on Linux.

https://github.com/christoph-cullmann/ilp/blob/main/value_110885599.lp

christoph-cullmann avatar Feb 10 '25 12:02 christoph-cullmann

Tried to debug it a bit, runs into error in

[0x0] clpsolve!computeGcd+0x29 (Inline Function) (Inline Function)

If I inspect the code, we use long there, is that a good thing? That will be on most 64 bit systems 64 bit, just not on Windows.

@jjhforrest

christoph-cullmann avatar Feb 13 '25 10:02 christoph-cullmann

Does it get through preprocessing? I am not sure I understand the "clpsolve" bit. I think code should work even with 32 bits - maybe someone else can help.

jjhforrest avatar Feb 13 '25 12:02 jjhforrest

If I use this patch, it passes the preprocessing without crash and with the right end result:

64.diff.txt

christoph-cullmann avatar Feb 13 '25 13:02 christoph-cullmann

I think this and some other gcd copy in gomory are the only places that try to use 'long' for such computations and therefore do very different stuff on Win64 compared to other 64 bit operating systems that have 64 bit longs.

christoph-cullmann avatar Feb 13 '25 13:02 christoph-cullmann

That patch fixes most of my Windows only issues, some timeouts and rounding issues, too.

christoph-cullmann avatar Feb 13 '25 13:02 christoph-cullmann

To be more specific, CglGMI and CglGomory at least have the same issues.

christoph-cullmann avatar Feb 13 '25 13:02 christoph-cullmann

Great! Are you going to update master?

jjhforrest avatar Feb 13 '25 13:02 jjhforrest

I can try to create a pull request. Is int64_t ok or do you want long long?

christoph-cullmann avatar Feb 13 '25 13:02 christoph-cullmann

int64_t is fine.

jjhforrest avatar Feb 13 '25 13:02 jjhforrest

I merged the PR, but should stable branches also be patched? The PR was only for master.

tkralphs avatar Feb 17 '25 03:02 tkralphs