Skip to content

v5.0.x: Add opal_clock_gettime() / opal_clock_getres() #9832

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 6, 2022

Conversation

jsquyres
Copy link
Member

@jsquyres jsquyres commented Jan 4, 2022

This is the v5.0.x PR for master PR #9798.

See individual commit messages for details.

As of Dec 2021, it turns out that CLOCK_MONOTONIC can actually go
backwards on macOS (!).  Add two simple portable wrappers that use
CLOCK_MONOTONIC_RAW on Darwin (which doesn't go backwards) and
CLOCK_MONOTONIC everywhere else.

Additionally, if the underlying OS does not have clock_gettime(), use
gettimeofday() instead.

Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
(cherry picked from commit c74f80a)
Update MPI_Wtick and MPI_Wtime to use the portable wrappers
opal_clock_gettime() and opal_clock_getres().

Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
(cherry picked from commit e72b4e6)
@jsquyres jsquyres added this to the v5.0.0 milestone Jan 4, 2022
@jsquyres jsquyres requested review from bosilca and bwbarrett January 4, 2022 23:12
@gpaulsen gpaulsen merged commit 918bc12 into open-mpi:v5.0.x Jan 6, 2022
@jsquyres jsquyres deleted the pr/v5.0.x/opal-clock-gettime branch January 6, 2022 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants