Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Memory usage of default search

    Posted 03/25/15 11:12 AM

    Originally posted by: IrvL


    I am using CPLEX Optimization Studio 12.6.1 and the default search in CP Optimizer via OPL.  I find that the default search runs out of memory very quickly when it goes parallel. I have an 8 core machine.   So I wrote a very simple example that just counts solutions to the allDifferent() constraint.  That model is attached.

    The memory usage reported by CP Optimizer seems to grow linearly.  Here are excerpts from the log that show the growth.

     ! Time = 10.07s, Explored branches = 9,636,628, Memory usage = 1.7 GB
     ! Time = 20.03s, Explored branches = 19,444,269, Memory usage = 3.3 GB
     ! Time = 20.19s, Explored branches = 19,602,967, Memory usage = 3.4 GB
     ! Time = 30.07s, Explored branches = 28,943,052, Memory usage = 5.0 GB
     ! Time = 40.10s, Explored branches = 34,125,154, Memory usage = 13.3 GB
     ! Time = 49.01s, Explored branches = 38,203,815, Memory usage = 20.0 GB
     ! Time = 50.19s, Explored branches = 38,793,022, Memory usage = 21.0 GB

    The reported memory size is also reflected when looking at Windows Task Manager.  

    I'd like to use parallel search on my real model, but I'm getting nowhere due to this memory problem.  I wrote the same example in C++ and it shows the same behavior, so how do I control the memory usage of CP Optimizer search when using parallel processors?

            -Irv

     

     

    #DecisionOptimization
    #OPLusingCPOptimizer


  • 2.  Re: Memory usage of default search

    Posted 03/26/15 12:48 PM

    Originally posted by: rdumeur


    Dear Irv,

    It is an issue related to the use of log and Workers > 1 when enumerating a lot of solutions. A huge amount of solutions and log events are quickly produced by workers that overload the master thread.

    If your problem is to enumerate solutions, I would advise to use Workers=1 SearchType=DepthFirst parameter settings,

    I hope this helps,

    Renaud


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 3.  Re: Memory usage of default search

    Posted 03/26/15 06:04 PM

    Originally posted by: IrvL


    Renaud:

    The problem is that I'm seeing this behavior on a difficult model that is not finding a feasible solution.  So it is not an enumeration question.  I think it is because I've written a custom value selector in Java, and there might be a memory leak in CPO when iterating through a domain.  I need to write a C++ program of my example to see if the same thing happens with C++.

    -Irv

     


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 4.  Re: Memory usage of default search

    Posted 03/27/15 03:44 AM

    Originally posted by: rdumeur


    Dear Irv,

    In that case, the problem origin is  very likely to be completement different from the one we have here.

    Please let us know the outcome of your C++ experiment.

    Cheers,

     

            Renaud


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 5.  Re: Memory usage of default search

    Posted 03/27/15 11:01 AM

    Originally posted by: IrvL


    Renaud:

    Well, now I'm confused.  I can't replicate the problem with a simple example.  Even my big example is now running OK, just barely fitting in the 16GB I have in my machine, but the memory usage is constant.

    I did write a simple example using a very simple value chooser in Java and C++, and the Java version takes 2.2GB of memory, while the C++ version takes 750MB.  So that's a bit disturbing, but maybe that is Java overhead that I just can't avoid.

        -Irv


    #DecisionOptimization
    #OPLusingCPOptimizer