Skip to content

Derivative Test uses different random numbers on Windows and Linux #823

@bradbell

Description

@bradbell

I have a case where IpRandom01 is returning different results on windows than on linux. It is actually aborting on windows because the function cannot be evaluated at the trial point, This results in a test case failing on windows and passing in linux, due to the random point being chosen on window being different. It is hard (for me) to debug on windows, so it took me a while to track this down.

I think it would be better to have a random number generator that is the same for all machines. It appears that std::rand is not such a generator; see
https://stackoverflow.com/questions/7115459/c-rand-and-srand-gets-different-output-on-different-machines

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