how to get started with cilk++ - cilk-plus

I want to use cilk++ for writing parallel code. I want to know the the simplest way to get started either in windows or ubuntu 10.04.What should I istall to get started with cilk++.
Thanx.

cilk++ is an earlier implementation of the Cilk extension to C++. It is no longer supported.
Cilk has been implemented in the Intel Composer XE C++ compiler, as well as the "cilkplus" branch of GCC.
I'd start with the article http://www.cilkplus.org/which-license at the Cilk Plus website. Be aware that the "cilkplus" branch of GCC is off of the GCC 4.8 stream, which is under active development.
Barry Tannenbaum -
Intel Cilk Plus Runtime Development

Go here.
Cilk Plus OSS Website

Related

how to use OpenMP library in xcode 5.1?

I want to use openMP library in my project but it seems as if there is no option for openMP in xcode 5.1. if someone knows then please help me
There is clang with OpenMP 3.1/4.0 support (though not official). You can take it here http://clang-omp.github.io/
OpenMP is not a library but a language extension to C, C++ and Fortran. It requires support built into the compiler. Xcode uses compilers based on the LLVM infrastructure. It used to provide two different compiler front-ends - Clang and GCC. Of those two, the former does not have support for OpenMP (yet). The GCC front-end provided some support for old OpenMP features but is no longer part of Xcode. It used to be based on a very old GCC version (4.2.1) and not actively updated since Apple started throwing all their resources into improving Clang.
In other words - no OpenMP support in Xcode 5.1. You can build your own modern (but non-LLVM) GCC from source and use it on the command line, but it's hard to integrate it with Xcode.

How to get Cuda to use gcc 4.6

I am trying to install Cuda on my machine and as usual it causes problem with gcc 4.7 when trying to run the installer.
I have now installed gcc 4-6 which should work and I am now thinking about the best way to install CUDA.
I have thought about creating a symlink to gcc-4.6 so that the installer uses version 4.6 instead of 4.7.
Do you have any suggestions to do that or is there a better solution? It feels a bit stupid erase 4.7 from the machine in order to use cuda.
Thanks in advance!
/ Erik
Another solution to your problem is to download CUDA 5.5, which works with gcc 4.7. It is currently only available to CUDA registered developers: link to forum announcement
Create alternatives so that you can switch between versions at any time check out this helpful page:
How to change the default GCC compiler in Ubuntu?

install and use GCC in windows 7 x64

I am new to GCC, don't know much about it. I want to install it on my Windows 7 64bit PC and use it for C, C++ and Java. The latest version is GCC-4.8.0. In their mirror links, I am getting option to download gcc 4.8.0.tar.bz2 and gcc 4.8.0.tar.gz and md5.sum. Please guide me, how should i proceed, to use GCC
On Windows, easiest way to get gcc is to install MinGW.
Most recent MinGW release has support for gcc 4.8 as well - but it may be not very stable at the moment.
These files are source archive files of the latest released GCC compiler.
As a newbie, you probably want a binary distribution, e.g. mingw or cygwin on Windows. (Then you might get an earlier version of GCC. 4.8 has just been released)
Alternatively, consider switching to Linux and install it on your machine. It will teach you a big lot (and almost all of Linux is free software so you can get its source code and study it).
Using Linux and GCC also gives you a significant advantage: you could use GCC plugins, e.g. develop your own MELT extension (MELT is a domain specific language to extend GCC, implemented as a [meta-]plugin). Neither Mingw nor Cygwin support GCC plugins.
PS. compiling GCC from source code is not easy for a newbie.
this is an older question but this was harder to search for than it should have been so I will post it here, http://gcc.gnu.org/wiki/WindowsBuilding is a quick guide to getting gcc4.8 running on windows. I am about to dive in to building it on my old windows-xp box. wish me luck.
I use codeblocks . You can follow this Youtube video for instructions:). Hope it helps!
http://www.youtube.com/watch?v=nNeySMSW8qU
You should really check out Code::Blocks (http://codeblocks.org/).
It's a good IDE which is easily set up to get you started.
To support Windows 64-bit though you should not use the MinGW compiler that comes with it. Instead get a separate binary of MinGW-w64 with 64-bit support.
You can get it from http://winlibs.com where you can also find tips on how to configure both Windows 32-bit and 64-bit compilers.

Can/should libiomp5 and libgomp mix?

We are compiling an application that uses OpenMP. We are using gcc 4.4, with -fopenmp. The app also uses IPP, which includes its own version of OpenMP (libiomp5). (Note: we are disabling IPP's internal threading by calling ippSetNumThread(1). According to Intel's documentation, this should avoid conflicts with other threading libraries. However, linking with IPP still links in libiomp5.so.)
Since libiomp5.so is already linked in, we have not been linking with libgomp.so (gcc's version of OpenMP). For a long time this has worked, but after a seemingly inconsequential change we started seeing very odd OpenMP-related crashes on one of four platforms we support (the other three platforms still work fine).
I can make the crashes go away if I link in libgomp.so as well as libiomp5.so.
I have a couple questions about this:
Is linking with both these libraries safe? It seems like they would both define the same symbols.
Is there a way to tell what version of OpenMP libiomp5.so supports? With gcc 4.4, libgomp.so should be at OpenMP v3.0. I can't find any information in Intel's documentation about the OpenMP version of libiomp5.so.
Since no one has answered for a few days, I'll just report what I've found out independently:
Is linking with both these libraries safe?
No. Here's the most useful page I found on this topic:
http://software.intel.com/sites/products/documentation/studio/composer/en-us/2011/compiler_c/optaps/common/optaps_par_openmp_multiple_compilers.htm
Intel recommends that if you are going to be mixing IPP's internal OpenMP threading with your own OpenMP threading, you link to libiomp5 instead of your compiler's OpenMP library. The current version of libiomp5 provides "source compatibility and object-level interoperability" with gcc's OpenMP, but only if you are using gcc "4.42" (sic; I assume they mean 4.4.2) or later.
Is there a way to tell what version of OpenMP libiomp5.so supports?
Yes. Set the environment variable KMP_VERSION=1, then run your application. You'll get some debugging output printed by libiomp5 to your console. If you are using IPP v7 or later, one line will be something like
Intel(R) OMP API version: 3.0 (200805)
If you are using IPP 6, it won't tell you the API version, but it will tell you when it was built and with which version of the Intel compiler. Then you can check and see what version of OpenMP that compiler supported. (11.0 was the first version of the Intel compiler to support OpenMP v3.0.)

gcc for MIPS, 3.4.4 or 4.3.2?

We've made a number of changes to gcc 3.3.2 (for MIPS) to support the vagaries of an embedded system we're working on. gcc 3.4 and later appear to have substantially improved the MIPS code generation, so I'm planning to port our changes forward. The question is which gcc version should I target: 3.4.4 or straight to 4.3.2? Its a substantial amount of work to port the changes, I don't want to do it twice and pick the better result.
The Linux-MIPS project still recommends gcc 3.4.4, and MIPS Technologies maintains a modified SDE toolchain based on gcc 3.4.4. Though my embedded system is not running Linux, I respect their expertise.
From what I've read the MIPS backend does not benefit from the higher level optimizations in 4.x, and actually produces slower code than 3.4.4. Can anyone confirm or deny this?
I haven't used MIPS since the classroom so I can't directly answer your question.
I would suggest sending an e-mail to someone on the Linux-MIPS project, and ask when they plan to upgrade. Assuming it is not soon. It looks like 3.4.4 is a worthy upgrade.

Resources