Closed kibaekkim closed 4 years ago
It looks like the implementation of AlpsWallClock
should be a true wall clock time for Windows, but for any other OS, it should be the CPU time of the process. I guess the naming is a bit misleading, but CPU time is what you really want in most cases when the program is sequential. The difference between wall clock and CPU on Linux should be minimal unless something else is running on the machine that slows down the process.
When you say it's not returning the correct time on Mac, is it way off? What is happening specifically? I haven't really tested on Mac, although I have a Mac available.
The time is way off. For example, I called my solver that uses Alps in Julia. Alps measured 627 seconds, whereas Julia did 117 seconds. My solver processes each node in parallel with multiple cores (using OpenMP).
Alps0278I Search wall-clock time: 627.12 seconds
117.298107 seconds (7.95 M allocations: 812.961 MB, 0.23% gc time)
I got the right wall-clock time when I use CoinGetTimeOfDay() as in my fork. And the timing results were
Alps0278I Search wall-clock time: 109.84 seconds
114.173550 seconds (7.98 M allocations: 814.823 MB, 0.22% gc time)
I can make a pull request for this with my fork.
Right, yes, that's because in shared memory parallel, it's reporting the sum of the CPU of all cores. You can submit a pull request, although the project is still being managed in SVN (this will hopefully change soon), so I'll have to just turn the pull request into a patch and commit it to SVN.
This should be fixed by 2c2bc54a3bc5472931d1760d236cfda33a553302.
AlpsWallClock() does not return the correct wall clock time (without MPI) on Mac. I do not understand the implementation of the function. Is there any reason for this implementation, not using CoinGetTimeOfDay()?