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:
MAP: no SITE annotations were encountered
advixe: Warning: No site annotations were executed, so no Dependencies issues (problems and messages) can be found.
The Suitability report shows the following error message:
advixe: Warning: In location 0xb05 - Double_Round.c:54: A TASK_END occurred following a SITE_BEGIN. Suitability data may be unreliable.
I suspect the placement of my annotations is not correct. The following C code shows the two ways I placed the annotations.
None of the pages I read on the Intel Advisor website shows a full program (e.g. 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); the code samples below look like the examples I saw, but there's still something wrong.
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 < 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 < in_len; collect_ctr++ )
{
// BODY OF CODE HERE
ANNOTATE_TASK_END();
}
ANNOTATE_SITE_END();
This code is a shared object called from a wrapper written in C. I ran this on a Xeon under Ubuntu 18.04.
Hi,
To collect MAP collection with source annotations you need:
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 < in_len; collect_ctr++ )
{
ANNOTATE_ITERATION_TASK(Double_round_task);
// BODY OF CODE HERE
}
ANNOTATE_SITE_END();
}
You can also select loops for analysis using --mark-up-list option from CLI (Loop Markup ) or select loops using checkbox in Survey grid in GUI. For approaches mentioned above you don't need to modify source code.
連結已複製
Hi,
To collect MAP collection with source annotations you need:
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 < in_len; collect_ctr++ )
{
ANNOTATE_ITERATION_TASK(Double_round_task);
// BODY OF CODE HERE
}
ANNOTATE_SITE_END();
}
You can also select loops for analysis using --mark-up-list option from CLI (Loop Markup ) or select loops using checkbox in Survey grid in GUI. For approaches mentioned above you don't need to modify source code.
I inserted annotations in the attached C program following the reply above by SergeyK, but I still get "Warning: No SITE annotations were encountered."
For example:
advixe-cl --collect=map --enable-cache-simulation --project-dir=/usr/test/Complex_If/081020 ./C_Wrapper_for_C_64_Complex_If.exe
Here is the report output:
dlopen success: handle 0x141e8d0
Calling the shared object
advixe: Warning: No SITE annotations were encountered, so no stride/alignment data can be reported.
advixe: Warning: The application returned a non-zero exit value.
advixe: Loading result... 25 % done
The full source code is in the .txt file I have attached.
Thanks for your help.
Hi,
I see message "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?
Regarding annotations - if you want to analyze outer loop (for (i = 0; i < in_len; i++)), please put ANNOTATE_ITERATION_TASK under the loop statement, like this:
ANNOTATE_SITE_BEGIN(Complex_If);
for (i = 0; i < in_len; i++)
{
ANNOTATE_ITERATION_TASK(Complex_If_task);
data_num = data[i];
...
}
ANNOTATE_ITERATION_TASK should be the first operation the loop do on each iteration.
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."
You asked about the non-zero return value. This is a shared object called from a wrapper (also written in C). 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. For your other question, the code does run completely to the end with or without Advisor.
The command string is: advixe-cl --collect=map --enable-cache-simulation --project-dir=/usr/test/Complex_If/081120 ./C_Wrapper_for_C_64-Complex_If.exe.
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.
Would the fact that the annotations are in a shared object be an issue here?
Thanks for your help.