Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  CPLEX influences cluster clock?

    Posted 06/20/13 05:56 AM

    Originally posted by: cynnudt


    Hi,

    I am using c++ to code with CPLEX.  Part of my code is to invoke CPLEX to help me solve an Integer programming problem, where I impose a time limit of 10 seconds. After each invoke, I need to check how much time left to run the follwing procedure. This is done by using clock() function of time.h in C++.

    I run my code both in  my personal computer and in cluster. It works well in my personal computer. But when I run in cluster, after each time of 10s' invoke, the clock() returns a value significantly larger than 10s, which is absolutely wrong. I use CPLEX 12.2 in my personal computer, and CPLEX 12.4 in cluster.

    I doubt whether CPLEX  has some influence on cluster's time synchronization. I don't know. Anyone who can help me?

    Thank you!

    Chen


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: CPLEX influences cluster clock?

    Posted 06/20/13 06:47 AM

    Does the problem persist if you explicit set CPX_PARAM_THREADS to 1?

    The clock() function measures elapsed CPU time (and not wallclock time). On some systems this may include time for child processes and/or threads. That may explain why the time measured by clock() does not match wallclock time.

    A better way to measure time would to use gettimeofday() or CPXgettime() (provided you did not set the CPLEX time to CPU time).


    #CPLEXOptimizers
    #DecisionOptimization