Timing possibly inaccurate in tricensus-mpi
Software for 3-manifold topology and normal surface theory
Brought to you by:
bab
When running tricensus-mpi, the time taken to enumerate the triangulations on each graph is measured on the master and only takes into account actual time passed. In instances where a task is not allowed to utilise 100% of a CPU/core (i.e. overloaded clusters/nodes) this results in inaccurate timing.
The plan here is to get CPU-time from the kernel. This should give more accurate results on a 64-bit machine, but on 32-bit machines timing can overflow (approx. every 72 minutes but depends on architecture). I'm welcome to suggestions on what to do in the 32-bit case. Options include:
Whatever approach is used, probably best to throw out a warning for 32-bit users who enable MPI anyway.
I've pushed a fix to the mpi-timing branch. It currently uses clock_t and clock() for all timing of mpi-tricensus (32bit and 64bit machines). This will overflow on 32bit machines after either 36 or 72 minutes (depends on whether clock_t is signed) on a single task. I've added a warning to CMake when compiling on 32-bit machines to warn about this, just in case.
Btw, I ran a test of tricensus-mpi with 16 nodes (on my 4 core machine), which means each task only gets a portion of a core.
Before the patch:
Fri Jun 12 22:02:59 2015 Farmed pairing 1629 --> slave 7 ...
Fri Jun 12 22:03:12 2015 Task [1629 @ slave 7]: 8 found, time 13s (13 sec)
After the patch:
Fri Jun 12 21:30:21 2015 Farmed pairing 1629 --> slave 3 ...
Fri Jun 12 21:30:33 2015 Task [1629 @ slave 3]: 8 found, time 3s (3 sec)