- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I thought I start a new thread since it doesn't pertain to the bug anymore. I am getting this:
cute_rj@Cute:~/code/src/sort/build$ make
g++ -std=c++0x -O2 -DHAVE_OPENMP=1 -DHAVE_CILKPLUS=1 -fcilkplus -lcilkrts -I.. ../common/test_sort.cpp -ltbb -lgomp -lrt -o test_sort.x
../common/test_sort.cpp:9:23: fatal error: cilk/cilk.h: No such file or directory
#include <cilk/cilk.h>
^
compilation terminated.
make: *** [test_sort.x] Error 1
and yes my environment variables are set!
cute_rj@Cute:~/code/src/sort/build$ echo $PATH
/home/cute_rj/gcc-cilk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
cute_rj@Cute:~/code/src/sort/build$ echo $LIBRARY_PATH
/home/cute_rj/gcc-cilk/lib
cute_rj@Cute:~/code/src/sort/build$ echo $LD_LIBRARY_PATH
/home/cute_rj/gcc-cilk/lib
What the heck is going on? -.- lol
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You have two options:
- You can add a -I (capital i) option to add to the list of directories that will be searched for include files. For example,
g++ -std=c++0x -O2 -DHAVE_OPENMP=1 -DHAVE_CILKPLUS=1 -fcilkplus -lcilkrts -I.. \
-I/home/cute_rj/gcc-cilk/include../common/test_sort.cpp -ltbb -lgomp -lrt -o test_sort.x - You can define CPATH (or CPLUS_INCLUDE_PATH) to specify the list of directories that will be searched for include files. For example:
export CPATH=/home/cute_rj/gcc-cilk/include:$CPATH
I don't believe that g++ will automatically add the directory to the include file search path when you use the -fcilkplus.
- Barry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Didn't work but i did look at the snapshot provided by cilkplus.org and i see that i'm missing my libcilkrts directory -.- thats where the cilk.h file is
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
aha! found my problem. let me see if that fixes it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I hadn't realized that you were running from the snapshot at http://www.cilkplus.org/node/78#gcc-development-branch . If there is a problem there, of if I should update the "how to build with the Cilk Plus extension", please let me know.
- Barry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i wasn't running from snapshot xD it was more of a guide sir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello guys
I am also having the same problem ' cilk/cilk.h' file not found. I set my environment variables correctly and checked twice. It all seems fine but libcilkrts is missing. Can anyone tell me how to add this libcilkrts runtime library to LLVM's Clang.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You'll need to use the LLVM/Clang from the CilkPlus/LLVM project on GitHub. See http://www.cilkplus.org/which-license#llvm-development .
- Barry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The installation and the downloading gonna take too much time, isn't there any way to fix the libcilrts problem in LLVM's Clang.?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Cilk Plus is not in the mainline version of LLVM/Clang. The only version that supports Cilk Plus is the one from the CilkPlus/LLVM project.
- Barry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi is there any easy way I could download these cilkplus files in a short time from http://gcc.gnu.org/svn/gcc/branches/cilkplus link?please suggest
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The snapshots download in a reasonable time. Follow the links in http://www.cilkplus.org/build-gcc-cilkplus under "Using a snapshot". You'll get a compressed tarball of the latest build in the branch.
- Barry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hey Barry,
Thank you for helping me. But at last stage where building Cilkplus application with GCC compilers requires explicitly enabling the Cilk Plus extension and linking with libcilkrts. For example:
$HOME/cilkplus-install/bin/gcc -fcilkplus -lcilkrts <OTHER_FLAGS> <SRC_FILES>
$HOME/cilkplus-install/bin/g++ -fcilkplus -lcilkrts <OTHER_FLAGS> <SRC_FILES>,What this says and what is the meaning of OTHER_FLAGS here!!!!!
One more thing I am doing my final year project based on this topic. Can you suggest me some problems in which I can show the parallelism.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Other flags are the flags you use when compiling your files. Such as -o and -g
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok
Can you suggest me some standard problems on which I can work on and enjoy this concept.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You might want to look at the problems from "Structured Parallel Programming" by Michael McCool, James Reinders and Arch Robison. The sources are available at http://parallelbook.com/downloads .
You might also look at some of the examples at the http://cilkplus.org website.
- Barry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey everyone I have a very silly doubt.
I am compiling my file using :
/home/aryan/cilkplus-install/bin/gcc -fcilkplus -lcilkrts -o test tes.c
the compilation done succesfully, and runs too. But what is the meaning of -fcilkplus and -lcilkrts here!!!!!!.
And to run a program I am using
CILK_NWORKER=1 time ./test. What this line says? Please reply.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
-fcilkplus enables the Cilk Plus extension.
-lcilkrts tells the compiler to add libcilkrts.so to the list of libraries that are linked against.
The statement "CILK_NWORKER=1 time ./test." is doing 3 things:
- It's setting the environment variable CILK_NWORKERS to "1". This tells the Cilk runtime to only use one worker, so there's only 1 thread to do the work. If you don't do this, the Cilk runtime will use as many workers as your system has logical cores - Assuming you're using Linux, the number of cores in the /proc/cpuinfo file. The environment variable is only set for the duration of the command.
- It's timing the run of your application. When the application completes, you should see output specifying how long your application ran. You can use the command "man time" to see the "time" man page which has all the details.
- It's running the application "test" from the current directory.
- Barry
![](/skins/images/45C6C2D737ED71F4C51F0145C8CB1E9C/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page