- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Where did you install this g++? "gcc version 4.2.4 (Cilk Arts Build 8503)".
From what you tell me, it looks like the Cilk Arts Build 8503g++overwrote the original G++ installed in your machine.
Thanks,
Balaji V. Iyer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.7
And cilk using the instructions from the programmers guide.pdf
Do i need to install or do something else?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you trying to use Cilk++? If so, then install them in some directory (e.g. /opt/cilk). After that call the whole path for it without setting the path:
e.g. let's say you have thecilk++ g++ in /opt/cilk/bin/g++ and you want to compile test.cc, then type the following into the command prompt:
/opt/cilk/bin/g++ test.c
This way, you don't have to set the path variable.
Thanks,
Balaji V. Iyer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Cilk++ isan extension of C++ done by Cilk Arts, which was acquired by Intel almost 3 years ago. Cilk++ is unsupported, and most of the developers who worked on it are no longer with Intel.
Intel Cilk Plus is an extension of C and C++ to suport Cilk. It was originally shipped with V12.0 of Intel's C/C++ compiler and is available for Windows, Linux and MacOS. It's also been merged into the "cilkplus" branch of gcc 4.7 and 4.8.
Let me emphasize again that Cilk++ is unsupported.It is purely "as-is" software.
- Barry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
From what you tell me, I believe you are using Intel Cilk Plus which is the current one.
First of all, the following 3 lines that you used a while backis NOT the correct way to install the Cilk Plus GCC.
[bash]I installed gcc-4.7 using these 3 commands sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install gcc-4.7[/bash]
Here is a tutorial that I wrote a while back to install Cilk plus GCC. It is a little different from the one that you found on the web. This one seem to work for several people we gave to.
Before you start this tutorial, please bring your machine state to the way it was before you started whole Cilk work (e.g. remove the usr/local/cilk directory, reinstall the original GCC that your machine came up with, undo anyPATH settings you may have done,etc.)
Please let me know if you have further questions.
=======================================================================
How to Download, Build and Install Cilkplus GCC on Linux.
Prerequisites
You will need the following packages to build GCC:
Source packages. Note that the links below are for the versions needed to build the initial release of the cilkplus GCC branch. Newer versions may need to be used with future versions of the compiler.
GNU Multiprecision Arithmetic Library (GMP) for arbitrary precision arithmetic: (ftp://ftp.gmplib.org/pub/) Download the latest version and unpack the compressed tar file and move the directory to $HOME/gmp .
GNU MPFR Library multiple-precision floating-point computations with correct rounding: (http://www.mpfr.org/mpfr-current) Unpack the compressed tar file and move the directory to $HOME/mpfr .
GNU MPC Library for arithmetic using complex numbers: (http://www.multiprecision.org/mpc/) Download the latest version and unpack the compressed tar file. Move the unpacked directory to $HOME/mpc
In addition to the sources above, you will also need the following tools installed in your machine
flex or lex - Lexical analyzer
bison or Yacc - Parser generator
Make utility (example gmake) to automatically create executables
GCC/G++ Compiler (version 4.4 or above) with the appropriate binary utilities
GNU AutoGen utility - Automatic program generator
SVN or GIT source control packages
Diskspace: You will need approximately 2 GB of diskspace to hold the sources, executables and libraries. Along with this, you will also require ~3 GB of diskspace to hold the temporary files.
Time: This process is a bit time-consuming and so please have ~4-5 hours in-hand to complete the process. The most time consuming of all is step 6. This step is not interactive and so you can let this step run overnight if you wish.
Building the GCC C and C++ compilers
1.Cilkplus GCC is available as a development branch in the GCC source-tree. The development branch is called "cilkplus." They can be downloaded using GIT or SVN source-control systems. If you are a beginner to source-control, I would recommend you use SVN. I am making an assumption that you are currently in your $HOME directory.
To use SVN, please type the following in your command in your command prompt:
svn co http://gcc.gnu.org/svn/gcc/branches/cilkplus cilkplus-gcc
If you are choosing to use GIT, please type the following commands in your command prompt. Please note that this step can take anywhere from 10-30 minutes.
git clone http://gcc.gnu.org/git/gcc.git cilkplus-gcc
cd cilkplus-gcc
git checkout -b my_cilkplus_branch origin/cilkplus
cd ..
2.After step 1, the sources should be saved in a directory called $HOME/cilkplus-gcc. The final compiler executables and the appropriate libraries will be stored in $HOME/cilkplus-install. We will create the cilkplus-install directory later.
3.Move/Copy the gmp, mpc and mpfr directories from $HOME/ to the $HOME/cilkplus-gcc/ directory. This can be done using the following setof commands:
cp -r $HOME/mpc $HOME/cilkplus-gcc/.
cp -r$HOME/mpfr $HOME/cilkplus-gcc/.
cp -r $HOME/gmp $HOME/cilkplus-gcc/.
4.Create a new directory called "b-gcc" under $HOME/ . This directory will hold all the object files. You may delete this directory after the successful completion of all the steps in this tutorial.
5.Go into the b-gcc directory and type the following command:
$HOME/cilkplus-gcc/configure --prefix=$HOME/cilkplus-install --enable-languages="c,c++"
The above command will configure the compiler makefiles to set the install directory to be $HOME/cilkplus-install and build just the C and C++ compilers.
6.Type make in the same directory. This command will build the compiler sources. This will probably take quite a while.
7.Type make install. This command will copy the compiler executables and the required libraries to the install directory.
The compilers (g++ and gcc) should now be in the $HOME/cilkplus-install/bin directory.
Using the GCC compilers with the Intel Cilk Plus extensions
To use the GCC Cilk Plus compiler, it needs to be in your PATH and the libraries need to be in your LIBRARY_PATH and LD_LIBRARY_PATH. The following commands can be used (in a BASH Shell) to accomplish this:
export PATH=$HOME/cilkplus-install/bin:$PATH
export LD_LIBRARY_PATH=$HOME/cilkplus-install/lib
export LIBRARY_PATH=$HOME/cilkplus-install/lib
Building a Cilk Plus application with the GCC compilers requires explicitly linking with libcilkrts, libdl. For example:
$HOME/cilkplus-install/bin/gcc -ldl -lcilkrts
$HOME/cilkplus-install/bin/g++ -ldl -lcilkrts
=======================================================================
Thanks,
Balaji V. Iyer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks,
Balaji V. Iyer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please try it again. I have fixed this bug.
If you are using SVN, just go into the cilkplus-gcc directory and do "svn update"
Then just type "make" and continue with the rest of the steps :-).
Thanks,
-Balaji V. Iyer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
-Balaji V. Iyer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First of all, never put your sources in places like /opt or /usr or in any of those system directory. This almost always leads to disasters. This error probably has to do with permission issues...
Can you copy the source directory to your $HOME directoryand try to build it from there?
Also, where are you putting your build directory (b-gcc directory)? It definitely should not be in /opt. Please try and put it in $HOME if possible.
Thanks,
Balaji V. Iyer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- exportLD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/gmp-4.3.2/lib:/opt/mpfr-2.4.2/lib:/opt/mpc-0.8.1/lib
- exportC_INCLUDE_PATH=/usr/include/i386-linux-gnu&&exportCPLUS_INCLUDE_PATH=$C_INCLUDE_PATH&&exportOBJC_INCLUDE_PATH=$C_INCLUDE_PATH
- exportLIBRARY_PATH=/usr/lib/i386-linux-gnu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
At present, Cilkplus GCC is only supported on Linux.
Thanks,
Balaji V. Iyer.

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