Page MenuHomePhabricator

[OPENMP] omp_get_proc_id uses sched_getcpu fallback on FreeBSD 13.1 and above
ClosedPublic

Authored by devnexen on May 25 2022, 12:41 PM.

Details

Diff Detail

Event Timeline

devnexen created this revision.May 25 2022, 12:41 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 25 2022, 12:41 PM
devnexen requested review of this revision.May 25 2022, 12:41 PM
Herald added a project: Restricted Project. · View Herald Transcript

Instead of a KMP_OS_FREEBSD_SCHED guard in kmp_platform.h, can you make a KMP_HAVE_SCHED_GETCPU guard defined as:

#define KMP_HAVE_SCHED_GETCPU (KMP_OS_LINUX || (KMP_OS_FREEBSD && __FreeBSD_version >= 1301000))

And put this somewhere in kmp_os.h where some of the other features are defined (like attributes, KMP_HAVE_MWAIT, etc.). You can then use it in ompt-general.cpp

sure why not will do it.

devnexen updated this revision to Diff 433712.Jun 2 2022, 4:01 AM

changes from feedback

jlpeyton accepted this revision.Jun 2 2022, 7:13 AM

LGTM

This revision is now accepted and ready to land.Jun 2 2022, 7:13 AM
devnexen closed this revision.Jun 5 2022, 2:17 AM