<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Advisor error messages with annotations in Analyzers</title>
    <link>https://community.intel.com/t5/Analyzers/Advisor-error-messages-with-annotations/m-p/1199298#M19263</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I see message "&lt;SPAN&gt;advixe: Warning: The application returned a non-zero exit value.". This message is shown when application finished with errors. Could you please check that application is not crashed without analysis?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regarding annotations - if you want to analyze outer loop (for (i = 0; i &amp;lt; in_len; i++)), please put&amp;nbsp;ANNOTATE_ITERATION_TASK under the loop statement, like this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;ANNOTATE_SITE_BEGIN(Complex_If);
for (i = 0; i &amp;lt; in_len; i++)
{
    ANNOTATE_ITERATION_TASK(Complex_If_task);
    data_num = data[i];
    ...
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ANNOTATE_ITERATION_TASK should be the first operation the loop do on each iteration.&lt;/P&gt;</description>
    <pubDate>Tue, 11 Aug 2020 09:39:10 GMT</pubDate>
    <dc:creator>SergeyK</dc:creator>
    <dc:date>2020-08-11T09:39:10Z</dc:date>
    <item>
      <title>Advisor error messages with annotations</title>
      <link>https://community.intel.com/t5/Analyzers/Advisor-error-messages-with-annotations/m-p/1196976#M19192</link>
      <description>&lt;P&gt;I ran Advisor on the C code shown below (two versions shown) with annotations. Yet the Map (Memory Access Patterns) report returns the following error messages:&lt;/P&gt;
&lt;P&gt;MAP: no SITE annotations were encountered&lt;/P&gt;
&lt;P&gt;advixe: Warning: No site annotations were executed, so no Dependencies issues (problems and messages) can be found.&lt;/P&gt;
&lt;P&gt;The Suitability report shows the following error message:&lt;/P&gt;
&lt;P&gt;advixe: Warning: In location 0xb05 - Double_Round.c:54: A TASK_END occurred following a SITE_BEGIN. Suitability data may be unreliable.&lt;/P&gt;
&lt;P&gt;I suspect the placement of my annotations is not correct. The following C code shows the two ways I placed the annotations.&lt;/P&gt;
&lt;P&gt;None of the pages I read on the Intel Advisor website shows a full program (e.g. &lt;A href="https://software.intel.com/content/www/us/en/develop/documentation/advisor-user-guide/top/suitability-analysis/annotations/annotation-types/site-and-task-annotations-for-simple-loops-with-one-task.html" target="_blank"&gt;https://software.intel.com/content/www/us/en/develop/documentation/advisor-user-guide/top/suitability-analysis/annotations/annotation-types/site-and-task-annotations-for-simple-loops-with-one-task.html&lt;/A&gt;); the code samples below look like the examples I saw, but there's still something wrong.&lt;/P&gt;
&lt;PRE class="western"&gt;int64_t * Double_Round(double *n, double *input_lengths, char * file_name)
{
ANNOTATE_SITE_BEGIN(Double_Round);

	// VARIABLE DEFINITIONS HERE

	ANNOTATE_TASK_BEGIN(for_taskA);
	for( collect_ctr = 0; collect_ctr &amp;lt; in_len; collect_ctr++ )
	{

		// BODY OF CODE HERE

	ANNOTATE_TASK_END(); 
	}

ANNOTATE_SITE_END();

__________

int64_t * Double_Round(double *n, double *input_lengths, char * file_name)
{
	// VARIABLE DEFINITIONS HERE

	ANNOTATE_SITE_BEGIN(Double_Round);
	ANNOTATE_TASK_BEGIN(for_taskA);
	for( collect_ctr = 0; collect_ctr &amp;lt; in_len; collect_ctr++ )
	{
		// BODY OF CODE HERE

ANNOTATE_TASK_END(); 
	}

ANNOTATE_SITE_END();
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This code is a shared object called from a wrapper written in C. I ran this on a Xeon under Ubuntu 18.04.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Aug 2020 17:26:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Advisor-error-messages-with-annotations/m-p/1196976#M19192</guid>
      <dc:creator>Jones__Brian</dc:creator>
      <dc:date>2020-08-03T17:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: Advisor error messages with annotations</title>
      <link>https://community.intel.com/t5/Analyzers/Advisor-error-messages-with-annotations/m-p/1197618#M19222</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To collect MAP collection with source annotations you need:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;int64_t * Double_Round(double *n, double *input_lengths, char * file_name)
{
    // VARIABLE DEFINITIONS HERE

    ANNOTATE_SITE_BEGIN(Double_Round);
    for( collect_ctr = 0; collect_ctr &amp;lt; in_len; collect_ctr++ )
    {
        ANNOTATE_ITERATION_TASK(Double_round_task);
        // BODY OF CODE HERE
    }
    ANNOTATE_SITE_END();
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also select loops for analysis using --mark-up-list option from CLI (&lt;A href="https://software.intel.com/content/www/us/en/develop/documentation/advisor-user-guide/top/minimizing-analysis-overhead/loop-markup-to-minimize-analysis-overhead.html" target="_blank" rel="noopener"&gt;Loop Markup&lt;/A&gt;&amp;nbsp;) or select loops using checkbox in Survey grid in GUI. For approaches mentioned above you don't need to modify source code.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 13:09:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Advisor-error-messages-with-annotations/m-p/1197618#M19222</guid>
      <dc:creator>SergeyK</dc:creator>
      <dc:date>2020-08-05T13:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Advisor error messages with annotations</title>
      <link>https://community.intel.com/t5/Analyzers/Advisor-error-messages-with-annotations/m-p/1199166#M19262</link>
      <description>&lt;P&gt;I inserted annotations in the attached C program following the reply above by SergeyK, but I still get "Warning: No SITE annotations were encountered."&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;P&gt;advixe-cl --collect=map --enable-cache-simulation --project-dir=/usr/test/Complex_If/081020 ./C_Wrapper_for_C_64_Complex_If.exe&lt;/P&gt;
&lt;P&gt;Here is the report output:&lt;/P&gt;
&lt;P&gt;dlopen success: handle 0x141e8d0&lt;BR /&gt;Calling the shared object&lt;BR /&gt;advixe: Warning: No SITE annotations were encountered, so no stride/alignment data can be reported.&lt;BR /&gt;advixe: Warning: The application returned a non-zero exit value.&lt;BR /&gt;advixe: Loading result... 25 % done&lt;/P&gt;
&lt;P&gt;The full source code is in the .txt file I have attached.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your help.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 20:38:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Advisor-error-messages-with-annotations/m-p/1199166#M19262</guid>
      <dc:creator>Jones__Brian</dc:creator>
      <dc:date>2020-08-10T20:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: Advisor error messages with annotations</title>
      <link>https://community.intel.com/t5/Analyzers/Advisor-error-messages-with-annotations/m-p/1199298#M19263</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I see message "&lt;SPAN&gt;advixe: Warning: The application returned a non-zero exit value.". This message is shown when application finished with errors. Could you please check that application is not crashed without analysis?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regarding annotations - if you want to analyze outer loop (for (i = 0; i &amp;lt; in_len; i++)), please put&amp;nbsp;ANNOTATE_ITERATION_TASK under the loop statement, like this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;ANNOTATE_SITE_BEGIN(Complex_If);
for (i = 0; i &amp;lt; in_len; i++)
{
    ANNOTATE_ITERATION_TASK(Complex_If_task);
    data_num = data[i];
    ...
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ANNOTATE_ITERATION_TASK should be the first operation the loop do on each iteration.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 09:39:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Advisor-error-messages-with-annotations/m-p/1199298#M19263</guid>
      <dc:creator>SergeyK</dc:creator>
      <dc:date>2020-08-11T09:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: Advisor error messages with annotations</title>
      <link>https://community.intel.com/t5/Analyzers/Advisor-error-messages-with-annotations/m-p/1199537#M19270</link>
      <description>&lt;P&gt;I have again attached the source code, altered as you show on your reply above, but I still get "advixe: Warning: No SITE annotations were encountered, so no stride/alignment data can be reported."&lt;/P&gt;
&lt;P&gt;You asked about the non-zero return value.&amp;nbsp; This is a shared object called from a wrapper (also written in C).&amp;nbsp; Previously it returned a pointer to an array, but I have changed that so it now returns a zero value, so that message is gone.&amp;nbsp; For your other question, the code does run completely to the end with or without Advisor.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The command string is:&amp;nbsp; advixe-cl --collect=map --enable-cache-simulation --project-dir=/usr/test/Complex_If/081120 ./C_Wrapper_for_C_64-Complex_If.exe.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have re-read the pages I found on the Intel site re annotations, but it looks correct, and it now matches what you show in your reply above.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Would the fact that the annotations are in a shared object be an issue here?&lt;/P&gt;
&lt;P&gt;Thanks for your help.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 22:51:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Advisor-error-messages-with-annotations/m-p/1199537#M19270</guid>
      <dc:creator>Jones__Brian</dc:creator>
      <dc:date>2020-08-11T22:51:55Z</dc:date>
    </item>
  </channel>
</rss>

