Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.

 View Only
  • 1.  Terminate CPLEX on memory limit

    Posted Fri February 07, 2020 05:21 PM

    Originally posted by: healyp


    I would like to simply terminate CPLEX after a fixed memory usage instead of it dying a death itself.  Here are the parameters I have set:

    CPXPARAM_Threads                                 1
    CPXPARAM_MIP_Strategy_File                       0
    CPXPARAM_TimeLimit                               5400
    CPXPARAM_WorkMem                                 256
    CPXPARAM_MIP_Limits_TreeMemory                   8196

    and I expected that once the tree size reached ~8GB that the run would terminate.  However, before it died of memory exhaustion(?) here's one of the last log entries:

    Elapsed time = 4019.83 sec. (5724101.48 ticks, tree = 14840.41 MB, solutions = 22)
     307917 209273      901.6270   149      892.0000      911.6428 18234551    2.20%

     

    Can anybody please explain what parameters I need to set?

     

    Many thanks.


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Terminate CPLEX on memory limit

    Posted Mon February 10, 2020 01:13 AM

    Unfortunately, the tree memory limit is not checked very frequently. So it may indeed get overshot by a huge amount.

    Would it be an option to set MIP_Strategy_File to 3 instead of 0? That way the excessive memory would be stored on disk rather than RAM and the memory consumption of the whole process would not grow big enough to force abnormal termination of the process.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Terminate CPLEX on memory limit

    Posted Thu February 20, 2020 04:41 AM

    Originally posted by: healyp


    Thank you for the suggestion.

     

    I am running a small number of CPLEX jobs in parallel on the machine in order to speed up an experimental evaluation of some models and parameters. Even with your suggestion one of those processes could still overwhelm available RAM, right?

     

    Many thanks.


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Terminate CPLEX on memory limit

    Posted Thu February 13, 2020 10:03 AM

    Originally posted by: Laci Ladanyi


    While we can see the circumstances that would cause cplex to consume much more memory than specified, we do not have a specific example. Would you be able to share with us the instance you have? You can email it to me to ladanyi at us dot ibm dot com.


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Terminate CPLEX on memory limit

    Posted Thu February 20, 2020 04:42 AM

    Originally posted by: healyp


    Thank you for the offer.

     

    I have just sent it to you in (gzipped) .lp format.

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: Terminate CPLEX on memory limit

    Posted Sun February 23, 2020 11:03 PM

    Originally posted by: Laci Ladanyi


    We have identified and fixed the bug, and the wix will be in the next release. It affects only single threaded runs when tree nodes are all kept in memory, so another workaround (besides setting MIP_Strategy_File to 3 which involves disk access) would be to run cplex with at least 2 threads.


    #CPLEXOptimizers
    #DecisionOptimization