How to calculate the total solver resource usage time

questions about GAMS' tools
Post Reply
jshengdb
User
User
Posts: 10
Joined: 1 year ago

How to calculate the total solver resource usage time

Post by jshengdb » 3 months ago

Hi All,

I am now writing a iteration method to solve a optimization problem and now I have a question about how to calculate the total resource usage time spent by the solver.

I know that when gams ends its execution, it will have a elapsed time to calculate the total time used by the program. But is there a command to calculate the time just by the solver that not include the compilation time, generation time and execution time?

Thanks

User avatar
bussieck
Moderator
Moderator
Posts: 340
Joined: 2 years ago

Re: How to calculate the total solver resource usage time

Post by bussieck » 3 months ago

After the solve mymodel.resLim returns the time (in seconds) the solver reports. The attributes .etSolve and .etSolver report times independently measured by GAMS. etSolver and resLim should be pretty close. etSolve contains the model generation time. Details here: https://www.gams.com/latest/docs/UG_Mod ... ch=etsolve. There is also etAlg but this is not set by many solvers. The Cplex links use this to report deterministic time measure to GAMS (see https://www.gams.com/latest/docs/RN_246 ... arch=etalg).

-Michael

User avatar
bussieck
Moderator
Moderator
Posts: 340
Joined: 2 years ago

Re: How to calculate the total solver resource usage time

Post by bussieck » 3 months ago

Sorry, I meant mymodel.resUsd (not resLim). -Michael

jshengdb
User
User
Posts: 10
Joined: 1 year ago

Re: How to calculate the total solver resource usage time

Post by jshengdb » 3 months ago

bussieck wrote:
3 months ago
Sorry, I meant mymodel.resUsd (not resLim). -Michael
Hi Michael,

Thanks for solving my problem. That's really helpful. I just have one more small question: I think the .resUsd and .etSolve will report the CPU time. Do you know how can I get the wall time from GAMS?

Thanks

Post Reply