Page 1 of 1

How to calculate the total solver resource usage time

Posted: Tue Apr 30, 2019 5:20 pm
by jshengdb
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

Re: How to calculate the total solver resource usage time

Posted: Wed May 01, 2019 7:59 am
by bussieck
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

Re: How to calculate the total solver resource usage time

Posted: Thu May 02, 2019 12:21 pm
by bussieck
Sorry, I meant mymodel.resUsd (not resLim). -Michael

Re: How to calculate the total solver resource usage time

Posted: Mon May 13, 2019 6:29 pm
by jshengdb
bussieck wrote: 4 years 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