How can I install intel Cilk for C/C++ parallel programming on windows 10?

2.4k views Asked by At

I would like to experiment with intel's Cilk extension for C/C++ parallel programming but I am having a hard time figuring out how to install it on Windows. I tried consulting the official site but I couldn't find any Windows oriented guide. Switching to Linux is not convenient right now and I would prefer to leave it as a last resort.

I also tried to get a free trial version of Parallel Studio, but apparently it does not support CILK anymore.

If someone could guide me step-by-step, I would be very grateful.

I use Code Blocks, which includes the gnu gcc compiler.

2

There are 2 answers

1
bobbib On BEST ANSWER

(To start with, excuse me, I've never used Cilk personally).

First of all, it's deprecated:

If you want to try it with GCC, you need to get GCC (perhaps, versions from 4.9 to 8.0; support deprecated in 7.1 and removed in 8.1) compiled with Cilk support. And then it should work in a very simple way, e.g.:

$ gcc -fcilkplus -lcilkrts <OTHER_FLAGS> mycode1.c
$ g++ -fcilkplus -lcilkrts <OTHER_FLAGS> mycode2.cpp

(I've tried to add these flags when compiling a non-Cilk C source on my Debian 9 GNU/Linux (amd64) system, and it seems to work; libcilkrts5 package seems to get installed there along with GCC 6.3.0, by default).

Here is a list of popular binary GCC builds:

Unfortunately, most GCC binaries for MS Windows I can find come without Cilk enabled;
e.g., I didn't find it in the following packages:

At least, it can be found in Cygwin (it has gcc-cilkplus & libcilkrts5 in its package list):

Alternatively, you can probably try Intel C++ Compiler (no experience with that, sorry).

0
zafar hussain On

Cilk is alive and kicking at MIT as OpenCilk

You can either build it or even download a binary, but only linux, Mac or source is offered