- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Thanks!
Lawrence
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
/cilkplus/boehm-gc/doc
/cilkplus/zlib/doc
/cilkplus/x86_64-unknown-linux-gnu/libstdc++-v3/doc
/cilkplus/libstdc++-v3/doc
/cilkplus/gcc/doc
/cilkplus/prev-x86_64-unknown-linux-gnu/libstdc++-v3/doc
/cilkplus/stage1-x86_64-unknown-linux-gnu/libstdc++-v3/doc
/cilkplus/host-x86_64-unknown-linux-gnu/prev-gcc/doc
/cilkplus/host-x86_64-unknown-linux-gnu/gcc/doc
/cilkplus/host-x86_64-unknown-linux-gnu/stage1-gcc/doc
/cilkplus/libffi/doc
/cilkplus/libgo/go/go/doc
/cilkplus/libjava/classpath/doc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes. The Cilk Tools are available from the Download page of the Cilk Plus website: http://www.cilkplus.org/download
You'll find them referred to as the "Intel Cilk Plus SDK."
- Barry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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: libstdc++.so.6: cannot open shared object file: No such file or directory
Currently I have the cilk tools on my root directory:
/root/cilktools-linux
/root/cilktools-linux/bin/cilkview
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 libstdc++.so
$ find / -name libstdc++.so /usr/lib/gcc/x86_64-redhat-linux/4.4.4/32/libstdc++.so /usr/lib/gcc/x86_64-redhat-linux/4.4.4/libstdc++.so /opt/centos/devtoolset-1.1/root/usr/lib/gcc/x86_64-redhat-linux/4.7.2/32/libstdc++.so /opt/centos/devtoolset-1.1/root/usr/lib/gcc/x86_64-redhat-linux/4.7.2/libstdc++.so /cilkplus/cilkplus-install/lib64/libstdc++.so /cilkplus/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so /cilkplus/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so /cilkplus/stage1-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so
How can I resolve this issue?
Thanks for all the help you guys have shown over the last couple of days!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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); cilk_sync; 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah! Cilk Plus/LLVM is known to not be generating metadata.
I recommend that you post a bug about it. At the bottom of http://cilkplus.github.io/ there are directions to report bugs or make feature requests at https://github.com/cilkplus/clang/issues .
- Barry

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page