Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
5106 Discussions

Why Missing start task error is returned?

luca_l_
Beginner
1,147 Views

I have this code:

   ANNOTATE_SITE_BEGIN(solve);
   for(size_t i=0; i<wrapperIndexes.size(); i++){
       ANNOTATE_ITERATION_TASK(localizeKeypoint);
       const int r = wrapperIndexes.r;
       const int c = wrapperIndexes.c;
       const float val = localWrappers[wrapperIndexes.i].cur.at<float>(wrapperIndexes.r,wrapperIndexes.c);
       if ( (val > positiveThreshold && (isMax(val, localWrappers[wrapperIndexes.i].cur, r, c) && isMax(val, localWrappers[wrapperIndexes.i].low, r, c) && isMax(val, localWrappers[wrapperIndexes.i].high, r, c))) ||
            (val < negativeThreshold && (isMin(val, localWrappers[wrapperIndexes.i].cur, r, c) && isMin(val, localWrappers[wrapperIndexes.i].low, r, c) && isMin(val, localWrappers[wrapperIndexes.i].high, r, c))) )
          // either positive -> local max. or negative -> local min.
            localizeKeypoint(r, c, localCurSigma[wrapperIndexes.i], localPixelDistances[wrapperIndexes.i], localWrappers[wrapperIndexes.i]);
   }
   ANNOTATE_SITE_END();

Which is compiled with icpc 2017 and compiler options:

 
INTEL_OPT=-O3 -simd -xCORE-AVX2 -parallel -qopenmp -fargument-noalias -ansi-alias -no-prec-div -fp-model fast=2
INTEL_PROFILE=-g -qopt-report=5 -Bdynamic -shared-intel -debug inline-debug-info -qopenmp-link dynamic -parallel-source-info=2 -ldl 

However, after running a dependency analysis, a "Missing start task" is returned:

Why this happens? 

I'm sorry, but I don't know how to attach the binary file of the application and the input image as argument, I hope that this is enough (please let me know otherwise).

0 Kudos
9 Replies
Kirill_R_Intel
Employee
1,147 Views

Hi Luca,

Do you run threading analysis or vectorization analysis? For the latter, you don't need the source annotations. You can run Survey, enable checkbox next to the loop name and run Dependencies. It uses difference mechanism and should not have that error.

Regards,
Kirill

0 Kudos
Kirill_R_Intel
Employee
1,147 Views

Read your another post. So, you need the source annotations. Can you try ANNOTATE_TASK_BEGIN/ANNOTATE_TASK_END instead of the iteration task? This explicitly designates start and end of the task (start and end of the loop body).

It looks like analysis finished well, but some of iterations could be missed.

0 Kudos
Alexandra_S_Intel
1,147 Views

For posterity: here is the other thread this user created on the same topic: https://software.intel.com/en-us/forums/intel-advisor-xe/topic/731411

Conversation will proceed here.

First, this may be helpful to you in general: https://software.intel.com/en-us/intel-advisor-2017-user-guide-windows-annotations

Secondly, I agree with Kirill's suggestion. That said, I'm going to speculate here. Your code boils down to this:

for (loop range)
{
 ANNOTATE_ITERATION_TASK(localizeKeypoint);
 const int variabledeclarations = value;
 if (longifstatement)
  localizeKeypoint(parameters);
}

If that if-statement is false, you don't localizeKeypoint. You just declare and then immediately discard variables. Is it possible that on such occasions, the fact that the loop becomes

for (loop range)
{
 ANNOTATE_ITERATION_TASK(localizeKeypoint);
 // Do essentially nothing
}

"confuses" the iteration annotation because it's an iteration of doing nothing? It might even especially be so if the first iteration ends up with the if being false, because then the "start" of the loop is empty. That's just speculation on my part, but I thought it was worth mentioning.

Let me know if changing to ANNOTATE_SITE_BEGIN(localizeKeypoint) and ANNOTATE_SITE_END() helps.

0 Kudos
Alexandra_S_Intel
1,147 Views

Hello, Luca.
I have a follow up. There's been some discussion on our end, and I have some more information for you.

Regarding the sub-question on your other thread (sorry I missed that sub-question when I closed the thread), where you ask why you get horrible gain: this is expected. You're supposed to fiddle with the sliders to simulate different iteration counts and iteration durations - potential ways you could implement your multithreading, and this will change the predictions. You're getting horrible gain on the default settings of 1x and 1x. That's because, with that number of iterations at that iteration duration, you would get horrible gain. Play with the sliders to find a more optimal gain.

Another thing is that, according to your stackoverflow question on this: http://stackoverflow.com/questions/43497893/missing-start-task-in-intel-advisor
You seem to be using both annotations in the code and the checkboxes in the interface. While I'm not 100% sure that it could actually cause problems, that's certainly not a necessary thing (the checkboxes are used in the Vectorization advisor flow). I would advise you to not use the checkboxes if you're using the code annotations, just in case.

But the other thing your stackoverflow question reveals is that your loop may have some kind of exception handling inside it. Notice under the "Why no vectorization?" column, it says "exception handling for a call prevents vectorization". Exceptions, exits, and possibly returns inside an iteration which has been marked with ANNOTATE_ITERATION_TASK can cause problems with data collection.
Again, recommend switching to ANNOTATE_SITE_BEGIN and ANNOTATE_SITE_END.

Please let me know if that fixes your problem. Otherwise, if you would like, you can send a reproducer code for me to investigate.

0 Kudos
Alexandra_S_Intel
1,147 Views

Luca,

Have we been able to answer your question? Please respond by Tuesday, May 2nd, or I'll consider your question answered/abandoned and close this thread.

0 Kudos
luca_l_
Beginner
1,147 Views

Alexandra S. (Intel) wrote:

Luca,

Have we been able to answer your question? Please respond by Tuesday, May 2nd, or I'll consider your question answered/abandoned and close this thread.

Sorry for the late reply, but I don't get notification on my school email account when someone reply to this. Btw, I've already tried the ANNOTATION_TASK_BEGIN and ANNOTATION_TASK_END and nothing changes, unfortunately.

Thanks for clarifiying about the prediction.

0 Kudos
Alexandra_S_Intel
1,147 Views

Luca,

Just to be certain, when you put your task begin and task end in (sorry I said "SITE" instead of "TASK" earlier), it looked like this, yes?

ANNOTATE_SITE_BEGIN(solve);
for (size_t i=0; i<wrapperIndexes.size(); i++){
 ANNOTATE_TASK_BEGIN(localizeKeypoint);
 const int variabledeclarations = values;
 if (ifstatement)
  localizeKeypoint(input);
 ANNOTATE_TASK_END();
}
ANNOTATE_SITE_END();

I'm going to try to reproduce this error. If you could send me a reproducer code, that would save me a lot of time and effort; at the bottom of the gray "Leave a Comment" box, just above the submit button, there's a link "Attach Files to Post". If you click it, it'll drop down a menu that allows you to attach a file. Please send me a simple case that reproduces the problem - I don't need your whole program, just a pared down version that compiles, runs, and causes the same advisor error.

0 Kudos
Alexandra_S_Intel
1,147 Views

Luca, I have not been able to reproduce the problem. I don't think I'll be able to help you without reproducer code.

0 Kudos
Alexandra_S_Intel
1,147 Views

Luca,

I have not been able to reproduce the problem, and without your assistance, there's no more I can do for you. Please respond by Tuesday, May 23rd, or I will consider this thread abandoned.

- Alex

 

EDIT: I never heard back, so I'm going to close this thread. If you have another question please create a new thread.

0 Kudos
Reply