2

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.

Vector Sigma
  • 194
  • 1
  • 4
  • 16
  • 1
    Have you tried [downloading](https://www.cilkplus.org/download#block-views-cilk-tools-block-1) the Windows installer and running it? – ForceBru Nov 15 '18 at 21:43
  • 2
    @ForceBru thank you for your comment. Please correct me if I am wrong but, in case you are referring to the Intel Cilk Plus SDK, it merely provides tools which facilitate the debugging/code improvement, not the actual silk libraries, headers etc for C/C++. – Vector Sigma Nov 15 '18 at 22:24

2 Answers2

3

(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).

bobbib
  • 158
  • 7
  • 1
    (*A few months later...*) I know it's been a while and I apologize for neglecting to mention it here but... Cygwin did the trick! Thanks! – Vector Sigma Jul 12 '19 at 01:43
3

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

Kevin Hernández
  • 704
  • 10
  • 25