[Openmp-commits] [PATCH] D157646: [OpenMP] Add option to use different units for blocktime
Terry Wilmarth via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Aug 10 12:49:55 PDT 2023
tlwilmar created this revision.
tlwilmar added reviewers: hbae, Nawrin.
tlwilmar added a project: OpenMP.
Herald added subscribers: guansong, yaxunl.
Herald added a project: All.
tlwilmar requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: jplehr, sstefan1.
This change adds the option of using different units for blocktimes specified via the KMP_BLOCKTIME environment variable. The parsing of the environment now recognizes units suffixes: ms and us. If a units suffix is not specified, the default unit is ms. Thus default behavior is still the same, and any previous usage still works the same. Internally, blocktime is now converted to microseconds everywhere, so settings that exceed INT_MAX in microseconds are considered "infinite".
kmp_set/get_blocktime are updated to use the units the user specified with KMP_BLOCKTIME, and if not specified, ms are used.
Added better range checking and inform messages for the two time units. Large values of blocktime for default (ms) case (beyond INT_MAX/1000) are no longer allowed, but will autocorrect with an INFORM message.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D157646
Files:
openmp/runtime/src/kmp.h
openmp/runtime/src/kmp_csupport.cpp
openmp/runtime/src/kmp_ftn_entry.h
openmp/runtime/src/kmp_global.cpp
openmp/runtime/src/kmp_runtime.cpp
openmp/runtime/src/kmp_settings.cpp
openmp/runtime/src/kmp_settings.h
openmp/runtime/src/kmp_str.cpp
openmp/runtime/src/kmp_str.h
openmp/runtime/src/z_Linux_util.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157646.549142.patch
Type: text/x-patch
Size: 16268 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20230810/de97c7ab/attachment.bin>
More information about the Openmp-commits
mailing list