Dave,
i checked again, and yes, v1.10 uses gettimeofday() in MPI_Wtime() on linux.
native timers are only used in aix and solaris
$ grep -R OPAL_TIMER_USEC_NATIVE opal/mca/timer
opal/mca/timer/aix/timer_aix.h:#define OPAL_TIMER_USEC_NATIVE 1
opal/mca/timer/altix/timer_altix.h:#define OPAL_TIMER_USEC_NATIVE 0
opal/mca/timer/base/timer_base_null.h:#define OPAL_TIMER_USEC_NATIVE 0
opal/mca/timer/catamount/timer_catamount.h:#define OPAL_TIMER_USEC_NATIVE 0
opal/mca/timer/darwin/timer_darwin.h:#define OPAL_TIMER_USEC_NATIVE 0
opal/mca/timer/linux/timer_linux.h:#define OPAL_TIMER_USEC_NATIVE 0
opal/mca/timer/solaris/timer_solaris.h:#define OPAL_TIMER_USEC_NATIVE 1
clock_gettime() has a higher precision than gettimeofday(), though it
likely has
a lower precision and higher overhead than opal_sys_timer_get_cycles()
my point was, and iirc, opal_sys_timer_get_cycles() on linux is local to
a given core,
and hence not suitable for MPI since a task might migrate from one core
to an other,
or it might be multithreaded with threads running on different cores.
Cheers,
Gilles
On 4/6/2016 11:15 PM, Dave Love wrote:
Gilles Gouaillardet <gilles.gouaillar...@gmail.com> writes:
Dave,
fwiw, on v1.10, we likely use the number of cycles / cpu freq.
That would be a horribly broken means of timing. gettimeofday is
actually called under mpi_wtime, as ompi_info claims.
see opal_sys_timer_get_cycles in
https://github.com/open-mpi/ompi-release/blob/v1.10/opal/include/opal/sys/amd64/timer.h
I cannot remember whether this is a monotonic timer.
(e.g. MPI_Wtime() invoked on a given cpu is always lower or equal to
MPI_Wtime() invoked later and on *any* cpu)
That's global, not monotonic. MPI_Wtime(1) says it isn't necessarily
global in OMPI, but it has to be monotonic as I understand it.
that could be the reason why we moved to clock_gettime() in master.
The reason to use clock_gettime is higher precision. (I looked into
this after numbers from a test didn't make much sense.)
_______________________________________________
users mailing list
us...@open-mpi.org
Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/users
Link to this post:
http://www.open-mpi.org/community/lists/users/2016/04/28900.php