diff --git a/opal/runtime/opal_progress.c b/opal/runtime/opal_progress.c index 2af67c8ad8..3a7f5a9842 100644 --- a/opal/runtime/opal_progress.c +++ b/opal/runtime/opal_progress.c @@ -37,6 +37,7 @@ #include "opal/runtime/opal_params.h" #define OPAL_PROGRESS_USE_TIMERS (OPAL_TIMER_CYCLE_SUPPORTED || OPAL_TIMER_USEC_SUPPORTED) +#define OPAL_PROGRESS_ONLY_USEC_NATIVE (OPAL_TIMER_USEC_NATIVE && !OPAL_TIMER_CYCLE_NATIVE) #if OPAL_ENABLE_DEBUG bool opal_progress_debug = false; @@ -189,11 +190,11 @@ opal_progress(void) if( opal_progress_event_flag != 0 ) { #if OPAL_HAVE_WORKING_EVENTOPS #if OPAL_PROGRESS_USE_TIMERS -#if OPAL_TIMER_USEC_NATIVE +#if OPAL_PROGRESS_ONLY_USEC_NATIVE opal_timer_t now = opal_timer_base_get_usec(); #else opal_timer_t now = opal_timer_base_get_cycles(); -#endif /* OPAL_TIMER_USEC_NATIVE */ +#endif /* OPAL_PROGRESS_ONLY_USEC_NATIVE */ /* trip the event library if we've reached our tick rate and we are enabled */ if (now - event_progress_last_time > event_progress_delta ) { @@ -316,7 +317,7 @@ opal_progress_set_event_poll_rate(int polltime) #if OPAL_PROGRESS_USE_TIMERS event_progress_delta = 0; -# if OPAL_TIMER_USEC_NATIVE +# if OPAL_PROGRESS_ONLY_USEC_NATIVE event_progress_last_time = opal_timer_base_get_usec(); # else event_progress_last_time = opal_timer_base_get_cycles(); @@ -343,7 +344,7 @@ opal_progress_set_event_poll_rate(int polltime) #endif } -#if OPAL_PROGRESS_USE_TIMERS && !OPAL_TIMER_USEC_NATIVE +#if OPAL_PROGRESS_USE_TIMERS && !OPAL_PROGRESS_ONLY_USEC_NATIVE /* going to use cycles for counter. Adjust specified usec into cycles */ event_progress_delta = event_progress_delta * opal_timer_base_get_freq() / 1000000; #endif