[SCIP] use of SCIPgetTotalTime() function

Veronica Dal Sasso veronica.dalsasso at gmail.com
Thu Feb 11 17:37:56 CET 2016


Hi Gerald,
Thank you for the reply.
It is true, the time() function gives me the wallclock time. So I changed
and used the clock() function instead, but the difference (even if smaller)
is still there.
>From what I've seen, saving my model as an lp file and solving it with
CPLEX afterwards, it seems that SCIPgetTotalTime() does not take into
account the time spent to build the model (that is, the time spent to
create the variables and the constraints). Is it possible?

Best regards,
Veronica

2016-02-03 23:29 GMT+01:00 Gerald Gamrath <gamrath at zib.de>:

> Hi Veronica,
>
> you are right, SCIPgetTotalTime() returns the time passed since the
> creation of your SCIP instance.
>
> However, the default clock type in SCIP is measuring CPU time. There is a
> parameter "timing/clocktype" to change it to wallclock time (which is what
> time() from time.h measures, if I am not mistaken). However, since this
> clock is started as soon as SCIP is built, there is unfortunately no chance
> to change its type, unless you change the define
> #define SCIP_DEFAULT_TIME_CLOCKTYPE  SCIP_CLOCKTYPE_CPU
> to
> #define SCIP_DEFAULT_TIME_CLOCKTYPE  SCIP_CLOCKTYPE_WALL
> in set.c
>
> CPU and Wallclock time can return quite different values, for example if
> you have other jobs running on your computer with which SCIP needs to share
> the CPU.
>
> Best,
> Gerald
>
>
> On 01.02.2016 15:26, Veronica Dal Sasso wrote:
>
> Hello everybody!
> I am implementing my LP and column generation algorithm in C++ and I would
> like to ask some further explanation on how the function SCIPgetTotalTime()
> works. In the documentation it is written that it returns "the current
> total SCIP time in seconds, ie. the total time since the SCIP instance has
> been created".
> Now, my program is made of, more or less, the following steps:
>
> 1) read data from file & store useful info
> 2) initialize the solver class - in here, there is an initScip() function
> where the SCIP problem is created (SCIPcreate())
> 3) setup the problem and configure the pricer
> 4) solve the problem
>
> I was pretty sure the time given by SCIPgetTotalTime() would include the
> computational time for steps 2,3 and 4, but if I use the C++ function
> time() from the time.h library to compute the time passed just for steps 3
> and 4, it is already larger.
>
> Am I missing something?
> Thanks you all in advance,
> Veronica
>
>
> _______________________________________________
> Scip mailing listScip at zib.dehttp://listserv.zib.de/mailman/listinfo/scip
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20160211/30fd8581/attachment.html>


More information about the Scip mailing list