[SCIP] use of SCIPgetTotalTime() function

Gerald Gamrath gamrath at zib.de
Wed Feb 3 23:29:27 CET 2016


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 list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20160203/077bb631/attachment.html>


More information about the Scip mailing list