Skip to content

Issues with random generator (Windows MSVC vs. Linux) #141

@christoph-cullmann

Description

@christoph-cullmann

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions