[Openmp-commits] [PATCH] D47709: [OMPT] Fix OMPT callbacks for the taskloop construct and add testcase
Simon Convent via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Jun 6 06:05:05 PDT 2018
sconvent added inline comments.
================
Comment at: runtime/src/kmp_tasking.cpp:3955
ompt_task_info_t *task_info = __ompt_get_task_info_object(0);
+ kmp_uint64 iteration_count = *lb < *ub ? *ub - *lb + 1 : *lb - *ub + 1;
if (ompt_enabled.ompt_callback_work) {
----------------
AndreyChurbanov wrote:
> sconvent wrote:
> > AndreyChurbanov wrote:
> > > protze.joachim wrote:
> > > > Shouldn't there be st(ride) in the formula?
> > > Why not use calculated below iterations count - tc? It is computed at lines 3980 - 3995, including the check against zero.
> > There is a difference between the iteration count and the task count.
> > From the spec (TR6 page 423):
> > > For a taskloop construct, count represents the number of iterations in the iteration space, which may be the result of collapsing several associated loops.
> >
> > `tc` seems to be the task count, not the iteration count. And st(ride) is not needed for the calculation of the iteration count, right?
> No, the tc states for "trace count" which is exactly iterations count. And the stride is important here.
> E.g. for(i=0; i<10; i+=3) causes the iteration count to be 4 not 10, because of stride=3.
> For task count another parameter used - it is grainsize.
You're right, I updated the diff to use `tc`.
https://reviews.llvm.org/D47709
More information about the Openmp-commits
mailing list