mpi/c: Force wtick/wtime to use gettimeofday#3184
Conversation
This variable is only used in one file, so make it static. Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
Several component-specific functions were named with a prefix of "opal_timer_base", which was quite confusing. Rename them to have a prefix "opal_timer_linux" to make it clear that they are here in this component (and different than *actual* opal_timer_base symbols). Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
* See open-mpi#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>
|
@hppritcha @bosilca @hjelmn Please comment / review. There are 2 trivial cleanup commits for the Linux timer component; the 3rd commit does the temporary fix of nailing WTICK/WTIME down to always use |
|
I think the main question here is: (@bosilca @bwbarrett @hjelmn) How much do we want the |
| wtime = ((double) opal_timer_base_get_usec()) / 1000000.0; | ||
| #endif | ||
| #else | ||
| /* Fall back to gettimeofday() if we have nothing else */ |
There was a problem hiding this comment.
@hjelmn + me suggest putting something like:
#if _LINUX_ && OPAL_HAVE_CLOCK_GETTIME
// ... use clock_gettime(..) ...
#else
// ... use gettimeofday(..) ...
#endifThat way, we don't need a new configure test -- we only use clock_gettime if a) we're on Linux, and b) our existing configure test says that we have clock_gettime (i.e., we sidestep the whole OS X problem).
Workaround for Issue #3003
wtick/wtimeto usegettimeofdayinstead of the high precision timers until we figure out a portable way to calibrate them.