Skip to main content

Deterministic behaviour in different machines

Answered

Comments

3 comments

  • Dan Steffy
    Gurobi Staff Gurobi Staff

    Hello Marilena,

    If your LP model has multiple optimal solutions, running Gurobi on different hardware may lead to different optimal solutions being returned. Deterministic behavior is only guaranteed when repeating runs on an identical setup (same hardware, parameters, etc..). More discussion on this topic can be found in the following articles:

    -Dan

    1
  • Marilena Zambara
    First Comment
    First Question

    Thank you Dan for your reply,

    In this case I have a follow-up question related to distributed applications. I solve a number of those LPs in a distributed manner. In my local computer (therefore, the same machine every time) I ask for a number of workers equal to the number of the LPs and solve each LP in a separate worker. In this case, is it possible that I observe different results in identical runs? Is it possible that the distribution of LPs to different workers affects the deterministic behavior of Gurobi, as it would if I was running on different machines? 

    0
  • Dan Steffy
    Gurobi Staff Gurobi Staff

    Hello Marilena. If you are creating an application that solves multiple LPs in parallel in a distributed way, another source of non-determinism could be a race condition created by using multiple worker processes. Depending on the conditions under which your application is run, the order in which workers finish their tasks may not be deterministic (and would depend on the scheduling done by the operating system). If your algorithm is sensitive to the order in which the workers finish, this could result in non-determinism in the application, even in cases when the individual worker processes solve their respective LP in a predictable and deterministic way. This could be the case even if you are running the workers on the same machine.

    However, if your application does not depend on the order in which the workers finish solving their LPs, and each of the workers is run on the same machine, I would expect the result to be deterministic. I hope this helps.

    0

Please sign in to leave a comment.