メインコンテンツへスキップ

Transient errors in compute server jobs

回答済み

コメント

3件のコメント

  • 正式なコメント
    Simranjit Kaur
    • Gurobi Staff
    This post is more than two years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support.
  • msx5423
    • Gurobi-versary
    • Conversationalist
    • Curious

    I see this in the compute server documentation, 


    The one scenario you may need to guard against is the situation where you lose the connection to the server while the portion of your program that builds and solves an optimization model is running. Gurobi Compute Server will automatically route queued jobs to another server, but jobs that are running when the server goes down are interrupted (the client will receive a NETWORK error). If you want your program to be able to survive such failures, you will need to architect it in such a way that it will rebuild and resolve the optimization model in response to a NETWORK error. The exact steps for doing so are application dependent, but they generally involve encapsulating the code between the initial Gurobi environment creation and the last Gurobi call into a function that can be reinvoked in case of an error.

    So looks like we will have to actually use the below exception handling ?

    read_in_data

    try:

    generate_model

    solve_model

    except GurobiException as error:

    generate_model

    solve_model

    Is there any way that we can use the model object generated in the first try to start a second job session so that we don't have to spend all the time again to add variables, constraints etc. ? Maybe something like 

    read_in_data

    try:

    generate_model

    solve_model

    except GurobiException as error:

    new_job_session_from_previous_model

    solve_model

    0
  • Dan Steffy
    • Gurobi Staff

    Hello Mohan,

    Thank you for contacting us! Since you have a commercial account with us, you qualify for one-on-one support. We converted your post into a ticket in our Help Center and will be in contact regarding your question shortly. 

    Best regards,

    Dan

    0

投稿コメントは受け付けていません。