Page 1 of 1

GAMS CPU time

Posted: Thu Feb 07, 2019 9:16 am
by Luca
Dear all,

I know in gams the elapsed time can be retrive by the couple of instructions:

scalar starttime; starttime = jnow;
....
scalar elapsed; elapsed = (jnow - starttime)*24*3600; display elapsed;

but how can i retrive the cpu time spent in gams by my code?

Thanks in advance,
Luca

Re: GAMS CPU time

Posted: Thu Feb 07, 2019 10:32 am
by Renger
Hi Luca

There is an option "profile" to have a closer look at the time used by Gams. You can find more information Profile option and here McCarl.

Hope this helps
Cheers
Renger

Re: GAMS CPU time

Posted: Fri Feb 08, 2019 8:31 am
by bussieck
Luca,

CPU time make little sense in today's multi-threading world, so reporting CPU time has gone out of fashion.

-Michael

Re: GAMS CPU time

Posted: Fri Feb 08, 2019 10:40 am
by Luca
usually I test code with single thread and I report this CPU time.
otherwise what you suggest to do ?

Thanks,
Luca

Re: GAMS CPU time

Posted: Sat Feb 09, 2019 8:04 am
by bussieck
Take an empty/idle machine and give it all the juice/cores it got (I would not do hyperthreading) and report wall time.

-Michael