"Daniels, Marcus G" <mdani...@lanl.gov> writes: > On Mon, 2014-11-17 at 17:31 +0000, Dave Love wrote: >> I discovered from looking at the mpiP profiler that OMPI always uses >> gettimeofday rather than clock_gettime to implement mpi_wtime on >> GNU/Linux, and that looks sub-optimal. > > It can be very expensive in practice, especially for codes that have > fine-grained instrumentation.
OK, but I assumed VT would take that sort of thing into account for platforms I don't have. clock_gettime(CLOCK_MONOTONIC,) is as fast as gettimeofday on our mainstream sort of system (RHEL6, sandybridge); CLOCK_MONOTONIC_COARSE is about three times faster. [I can't find that sort of information in Linux doc.] Perhaps there should be a choice via an MCA parameter, but it looks as though it should default to clock_gettime on x86_64 Linux. I suppose one can argue what "high resolution" means in the mpi_wtime doc, but I'd rather not.