Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Reproducible timers

    Posted 07/01/14 06:07 PM

    Originally posted by: AnirudhSubramanyam


    Why isn't the elapsed CPU time as measured by CPXXgettime() reproducible?

    I place timestamps using this function before and after my solve statement and set CPX_PARAM_CLOCKTYPE to CPU time. When I run my CPLEX code (which includes callbacks) multiple times, I am not able to reproduce these times.

    However, CPXXgetdettime() always returns the same number of CPU ticks no matter how many times I run it (under varying CPU load conditions). Also, CPXXgetdettime()  has no way of knowing the amount of time spent inside callbacks. Is there a way to get a hold on the deterministic number of CPU ticks spent inside callbacks and hence, get a (reproducible) number on the amount of time my code takes?

    This question is motivated from the issue of what time to report for the solution time of my code. When running the same problem multiple times, I get a coefficient of variation of about 15%, which is a bit ridiculous.

    Note that my callbacks are completely deterministic and reproducible to the best of my knowledge.

    Any help is appreciated.

    Anirudh


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Reproducible timers

    Posted 08/04/14 12:40 PM

    First of all, deterministic ticks in CPLEX are quite different from CPU ticks! Deterministic ticks count the work CPLEX performs in a way that is independent of the CPU and are therefore deterministic/reproducible.

    CPU time counts the time the CPU spends executing instructions on behalf of the process. This time may vary for example depending on the number of cache misses, context switches and similar stuff.

    There is currently no way to make CPLEX aware of the work spent in callbacks and add that to CPLEX's deterministic clock.

    About what to report: The easiest thing would be to run your code on a dedicated machine that runs nothing else at the same time and then report wallclock timings. If your program is the only (heavy) process running on the machine then wallclock timings should be more or less the same for multiple runs.


    #CPLEXOptimizers
    #DecisionOptimization