Orphaned Task

Occurs when a task-begin annotation is executed that is not within an active parallel site.

Problem type: Orphaned task


Code Location



Task start

Represents the location and associated call stack when the task began execution.


void main()
    ANNOTATE_TASK_BEGIN(name_task1); // Begin task

This example does not execute a ANNOTATE_SITE_BEGIN(sitename)/ANNOTATE_SITE_END() annotation pair required to wrap the execution of a task ANNOTATE_TASK_BEGIN(taskname)/ANNOTATE_TASK_END() annotation pair.

Possible Correction Strategies

Always execute an ANNOTATE_SITE_BEGIN(sitename) annotation before executing an ANNOTATE_TASK_BEGIN(taskname) annotation. You may need to add an ANNOTATE_SITE_BEGIN(sitename) /ANNOTATE_SITE_END() annotation pair in the same function, or in some calling function.

An orphaned task is effectively ignored by the Suitability and Dependencies tool analysis, so you should fix the orphaned task code and run the Suitability and Dependencies tools again.

For more complete information about compiler optimizations, see our Optimization Notice.