mpi/c: Force wtick/wtime to use gettimeofday
* See https://github.com/open-mpi/ompi/issues/3003 for a discussion about this patch. Once we get a better version in place we can revert this change. Signed-off-by: Joshua Hursey <jhursey@us.ibm.com>
Этот коммит содержится в:
родитель
616f20c52c
Коммит
48d13aa8ef
@ -12,6 +12,7 @@
|
||||
* Copyright (c) 2007-2014 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2016 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -40,6 +41,12 @@ double MPI_Wtick(void)
|
||||
{
|
||||
OPAL_CR_NOOP_PROGRESS();
|
||||
|
||||
/*
|
||||
* See https://github.com/open-mpi/ompi/issues/3003
|
||||
* For now we are forcing the use of gettimeofday() until we find a
|
||||
* more portable solution.
|
||||
*/
|
||||
#if 0
|
||||
#if OPAL_TIMER_CYCLE_NATIVE
|
||||
{
|
||||
opal_timer_t freq = opal_timer_base_get_freq();
|
||||
@ -52,6 +59,7 @@ double MPI_Wtick(void)
|
||||
}
|
||||
#elif OPAL_TIMER_USEC_NATIVE
|
||||
return 0.000001;
|
||||
#endif
|
||||
#else
|
||||
/* Otherwise, we already return usec precision. */
|
||||
return 0.000001;
|
||||
|
@ -12,6 +12,7 @@
|
||||
* Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2015 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -40,10 +41,17 @@ double MPI_Wtime(void)
|
||||
{
|
||||
double wtime;
|
||||
|
||||
/*
|
||||
* See https://github.com/open-mpi/ompi/issues/3003
|
||||
* For now we are forcing the use of gettimeofday() until we find a
|
||||
* more portable solution.
|
||||
*/
|
||||
#if 0
|
||||
#if OPAL_TIMER_CYCLE_NATIVE
|
||||
wtime = ((double) opal_timer_base_get_cycles()) / opal_timer_base_get_freq();
|
||||
#elif OPAL_TIMER_USEC_NATIVE
|
||||
wtime = ((double) opal_timer_base_get_usec()) / 1000000.0;
|
||||
#endif
|
||||
#else
|
||||
/* Fall back to gettimeofday() if we have nothing else */
|
||||
struct timeval tv;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user