How to use the cilkview?

How to use the cilkview?

I have a C search application  on a centos 6.x 64 bit linux server that I just installed the cilkplus compiler on to take advantage of more cpu/cores. I've added the cilk_spawn function to some recursive scanning functions in my program.  After re-compiling the search application with the cilkplus gcc compiler, the search program is working as intended without any seg faults or any other errors.

My question is how do I use the cilkview analyzer? I want to if cilkplus/spawning is helping my search application and if so by how much?







12 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

When you installed the Cilk Tools, there should have been a "doc" directory containing cilktools.html.  It should explain how to run Cilkview and how to interpret the output. Is this documentation insufficient?

   - Barry

Hi Barry,

Thanks for the quick reply!  Is the cilk tools a separate item to install outside of the gcc compiler?  I did a search for the doc directory and this is all I have on the server:



Yes. The Cilk Tools are available from the Download page of the Cilk Plus website:

You'll find them referred to as the "Intel Cilk Plus SDK."

   - Barry

Hi so I downloaded the cilk tools and perused the cilktools.html#CilkviewAssumptions and when I try and run the cilkview on my system I get the following error:

$ cilkview ./search
cilkview: error while loading shared libraries: cannot open shared object file: No such file or directory

Currently I have the cilk tools on my root directory:




So I understand that the error is related to some kind of missing path or not seeing the correct location of the file needed.  Currently I have the following locations for


$ find / -name


How can I resolve this issue?


Thanks for all the help you guys have shown over the last couple of days!






in my bashrc file I have the following:


export PATH=/cilkplus/cilkplus-install/bin:$PATH
export CPATH=/cilkplus/cilkplus-install/include:$CPATH
export LIBRARY_PATH=/cilkplus/x86_64-unknown-linux-gnu/libcilkrts/.libs/:/cilkplus/cilkplus-install/lib:/cilkplus/cilkplus-install/lib/../lib64:$LIBRARY_PATH
export LD_LIBRARY_PATH=/cilkplus/x86_64-unknown-linux-gnu/libcilkrts/.libs/:/cilkplus/cilkplus-install/lib:$/cilkplus/cilkplus-install/lib/../lib64:$LD_LIBRARY_PATH
export PATH=/root/cilktools-linux/bin:$PATH

Also I have previously installed the clikplus on my mac.  I tried to test out the cilkview there and got a curious error:



/Users/cilkm2search/dev/app/cilktools/bin/cilkview  test
root_dir: /Users/cilkm2search/dev/app/cilktools/

Cilkview: Generating scalability data
Cilkview Scalability Analyzer V2.0.0, Build 3566
Error: No Cilk code found in program

However the test program is just the basic fib example with cilk_spawn and cilk_sync:

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

int fib(int n) {
  if (n < 2)
    return n;
  int a = cilk_spawn fib(n-1);
  int b = fib(n-2);
  return a + b;

int main() {
  int result = fib(30);
  assert(result == 832040);
  return 0;

Also cilk is working though in the program:


unknown68a86d1de446:test lawrence$ CILK_NWORKERS=4 time ./test
        0.04 real         0.15 user         0.00 sys
unknown68a86d1de446:test lawrence$ CILK_NWORKERS=1 time ./test
        0.10 real         0.10 user         0.00 sys


I believe I fixed the issue for linux install of cilk tools. I was on centos6 64 bit OS and I need the 32 bit libs:

I believe I fixed the issue for linux install of cilk tools. I was on centos6 64 bit OS and I need the 32 bit libs:

Hi Lawrence.

I'm glad to hear that you've resolved your problems on CentOS.

The message "Error: No Cilk code found in program" means that Cilkview (and Cilkscreen) didn't see any metadata. Which compiler are you using?

   - Barry

For my mac which was getting the error message about not finding the cilk meta data, I followed these instructions here:

"An implementation of the Intel® Cilk™ Plus C/C++ language extensions in LLVM"



Ah! Cilk Plus/LLVM is known to not be generating metadata.

I recommend that you post a bug about it. At the bottom of there are directions to report bugs or make feature requests at .

    - Barry

Login to leave a comment.