I wrote a serial program code for recursion. I've compiled it with ICC and GCC with different output file names. When used Intel Advisor XE 2013, for detecting hotspot, GCC compiled code passed all tests but in correctness, it came up with warning Warning: Advisor does not support the GNU OpenMP Runtime module and may report false positives.
so to avoid issues in data sharing I compiled annotated code with ICC (then tested out file on terminal) and imported it to new project with source directory and out file. But its producing issue (as per stack) Collection has stopped. Application exit code: 127
resulting NO DATA error.
Code is :
#include<stdio.h>
#include "/opt/intel/include/omp.h" //just for the sake of testing include directory
#include "/opt/intel/advisor_xe_2013/include/advisor-annotate.h"
long Fibonacci(long);
int main(int argc, char *argv[])
{
double toc,tic=omp_get_wtime();
int n, i = 0, c;
n=45;
printf("Fibonacci series\n");
ANNOTATE_SITE_BEGIN(SITE1);
for ( c = 1 ; c <= n ; c++ )
{
ANNOTATE_ITERATION_TASK( MyTask1 ); // This annotation identifies an entire body as a task.
printf("%ld\n", Fibonacci(i));
i++;
}ANNOTATE_SITE_END(); // End the parallel code region, after task execution completes
return 0;
}
long Fibonacci(long n)
{
long x,y;
if ( n == 0 )
return 0;
else if ( n == 1 )
return 1;
else
{
x=Fibonacci(n-1);
y=Fibonacci(n-2);
return ( x+y );
}
}
Run : icc serFib.c -o F123ICC2 -openmp -O2 -ldl -g -I $(ADV_DIR)
ADV_DIR
is /opt/intel/advisor_xe_2013/include/
-OpenMP
is to include Intel's library
NOTE 1 I've set up paths for /opt/intel/composerxe/bin
and Library Path for /opt/intel/lib/intel64
Note 2 I've set up ptrace variable in yama already to 0
Note 3 ICC compiled code(F123ICC2, here) is executing and showing proper result on terminal.
Note 4 I know that 127 code (in linux) is for path/command not found.