Skip to content

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

Merged
gpaulsen merged 2 commits intoopen-mpi:v5.0.xfrom
jsquyres:pr/v5.0.x/opal-clock-gettime
Jan 6, 2022
Merged

v5.0.x: Add opal_clock_gettime() / opal_clock_getres()#9832
gpaulsen merged 2 commits intoopen-mpi:v5.0.xfrom
jsquyres:pr/v5.0.x/opal-clock-gettime

Conversation

@jsquyres
Copy link
Copy Markdown
Member

@jsquyres jsquyres commented Jan 4, 2022

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

See individual commit messages for details.

Jeff Squyres added 2 commits January 4, 2022 15:10
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