GAMS CPU time

Problems with syntax of GAMS
Post Reply
Luca
User
User
Posts: 23
Joined: 6 years ago

GAMS CPU time

Post 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
User avatar
Renger
Posts: 639
Joined: 7 years ago

Re: GAMS CPU time

Post 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
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
User avatar
bussieck
Moderator
Moderator
Posts: 1033
Joined: 7 years ago

Re: GAMS CPU time

Post by bussieck »

Luca,

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

-Michael
Luca
User
User
Posts: 23
Joined: 6 years ago

Re: GAMS CPU time

Post by Luca »

usually I test code with single thread and I report this CPU time.
otherwise what you suggest to do ?

Thanks,
Luca
User avatar
bussieck
Moderator
Moderator
Posts: 1033
Joined: 7 years ago

Re: GAMS CPU time

Post 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
Post Reply