[CoinUtils] User and System time in CoinCpuTime

Giacomo Nannicini giacomo.n at gmail.com
Wed Nov 3 17:40:43 EDT 2010


Hi,
when using COIN-OR Couenne, I had a problem with the timer getting
stuck on Linux while solving some instances, and the program not
obeying the time limit. I tracked this problem down through the
dependencies (Bonmin, Cbc and finally CoinUtils). So now I noticed
that CoinCpuTime only considers the user time part of the rusage
struct. What happens is that sometimes, for reasons unknown to me, the
user time does not advance, but the system time (i.e. time spent in
system calls) does normally.

Here is my question. Is there any reason why CoinCpuTime() only
considers user CPU time, instead of adding user CPU time and system
CPU time reported in the rusage struct for the current process? Not
only this would solve my problem, but it would give a more realistic
estimation of the CPU time spent.

Thanks

Giacomo



More information about the CoinUtils mailing list