Software Archive
Read-only legacy content
17061 Discussions

Problem in Cilkview and Cilkscreen 4225

ashiqur_r_
Beginner
504 Views

Hello,

I am new in Cilk plus. I am facing problem in Cilkview and Cilkscreen 4225. Please help/ guide me ...

I am working on Ubuntu 14.04 LTS with GCC 4.9.2. I install Intel Cilk Plus SDK by synaptic manager.

=> libcilkrts5, libcilkrts5-dbg, libx32cilkrts5, libx32cilkrts5-dbg

I wrote the following code

/**********************/

#include <iostream>
#include <cilk/cilk.h>

using namespace std;

int fibo(int n)
{
    int x, y;
    if(n < 2) return n;
    x = cilk_spawn fibo(n - 1);
    y = cilk_spawn fibo(n - 2);
    cilk_sync;
    return x + y;
}

int main()
{
    int i, f;
    cout << "Enter nth position : ";
    cin >> i;
    f = fibo(i);
    cout << i <<"th Fibo is : " << f << endl;
    return 0;
}

/***********************/

I mentioned PATH and LD_LIBRARY_PATH correctly in environment both for Cilkview and Cilkscreen 4225.

I compile the above code using following command from terminal

=>g++ -pg -g fibo.cpp -fcilkplus -lcilkrts -lpthread -ldl -o fibo

if I execute 'fibo" it works fine but for Cilkscreen

=> cilkscreen -- ./fibo

Cilkscreen Race Detector V2.0.0, Build 4225
Enter nth position : 7
7th Fibo is : 13

Warning: Instrumentation never enabled - no Cilk Plus code found
1 error found by Cilkscreen
Profiling timer expired

=> cilkview ./fibo

Cilkview: Generating scalability data
Cilkview Scalability Analyzer V2.0.0, Build 4225
Enter nth position : 7
7th Fibo is : 13
Error: No Cilk code found in program

Where i did error? Please guide me as I am new in this arena ...

Thanks

Ashiq

 

0 Kudos
1 Reply
Hansang_B_Intel
Employee
504 Views

Hi,

GCC does not support intrinsic functions that are required to instrument the code as of 4.9, so you will have to use the "cilkplus-4_8" branch if you want use the tools with GCC.

0 Kudos
Reply