[Openmp-dev] kmp_set_blocktime

Yonghong Yan via Openmp-dev openmp-dev at lists.llvm.org
Fri Jul 1 13:01:57 PDT 2016


I am a bit confused with the usage and purpose of kmp_set_blocktime:

From
https://software.intel.com/en-us/node/522688#4ED418BA-EE4F-4A37-BCB9-88B114D8FA21
and the source code (__kmp_aux_set_blocktime
<http://vm:8080/llvm/s?refs=__kmp_aux_set_blocktime>), the set_block_time
change the block time for the calling thread and the team threads, no body
else.

If the function is called in the sequential region, there is no team during
the region. if it should be called in the parallel region, it should be in
a critical section (or called by one thread only) so do not introduce
traces since the call clearly updates some fields in the team object. I
assume the intention is the latter case, which is for impacting the waiting
behavior of the team thread after a parallel region. It however would not
impact the them after the parallel region since the team is gone by that.
did I miss anything?

Yonghong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20160701/eae1796b/attachment.html>


More information about the Openmp-dev mailing list