CoinUtils icon indicating copy to clipboard operation
CoinUtils copied to clipboard

Issues with random generator (Windows MSVC vs. Linux)

Open christoph-cullmann opened this issue 3 years ago • 0 comments

At work, we generate "a lot" of ILP based on large graphs.

We always ran into the issue that some solve perfectly well on Linux but not at all on Windows.

(with exactly the same solver code & 64-bit machines for both systems)

I investigated this a bit more and found out the biggest impact has the random generator.

With the default seed of 1234567, e.g.

value_24093348.lp.gz

our solver driver with some

CbcMain1 call with the parameters

"-strong=0", "-probing=on", "-feas=off", "-cuts=on", "-PassCuts=100" "-solve"

isn't able to handle this at all on Windows.

With small seeds this seems to work more reasonable.

Given the random generator is hand-written, I tried to use one that a C++11 compiler library provides.

This seems to at least bring more "consistent" results on Linux & Windows (and macOS)

A difference is that the generated numbers are in [0.0, 1.0[ but that seems to work for our stuff, but perhaps that is an issue in general.

See below attached rng path as proof of concept.

rng.txt

christoph-cullmann avatar Jan 26 '21 12:01 christoph-cullmann