Questions tagged [cilk]

Cilk is a general-purpose programming language designed for multithreaded parallel computing.

Cilk is a general-purpose programming language designed for multithreaded parallel computing. It is based on ANSI C, with the addition of just a few Cilk-specific keywords. Its run-time system uses a provably good algorithm for scheduling.

Originally Cilk was developed at the MIT Laboratory for Computer Science. A commercial instantiation of the technology is Intel Cilk Plus which has been deprecated and the opencilk is the live branch of the cilk nowadays opencilk.

72 questions
0
votes
2 answers

Cilk error expected ‘)’ before ‘;’ token

I try to compile a programme using cilk but it don't works g++ -std=c++11 -fcilkplus -lcilkrts -ldl -O2 src/cpp/* -o bin/exe src/cpp/sous_monoide.cpp: Dans la fonction src/cpp/sous_monoide.cpp:269:19: erreur : expected ‘)’ before ‘;’…
Picot
  • 75
  • 2
  • 10
0
votes
1 answer

Error while installing Cilk Plus on Mac OS X (El Capitan)

I have encountered issues while installing the CilkPlus on my Mac OS X.Following the installation page, I have executed the following commands in the following order: $mkdir Cilk $cd Cilk $git clone -b cilkplus https://github.com/cilkplus/llvm…
letsBeePolite
  • 2,183
  • 1
  • 22
  • 37
0
votes
1 answer

Compile Cilk plus in GCC5.2.0

Does anybody know how to compile the following code with Cilk plus in gcc5.2.0 correctly? With gcc -fcilkplus * or g++, I always get errors. #include #include int fib(int n) { if (n < 2) return n; int a =…
Lucas Hu
  • 159
  • 1
  • 1
  • 7
0
votes
1 answer

Array elements changing seemingly arbitrarily [parallel quicksort/prefix sum]

So I'm working on an implementation of parallel quicksort in C using Cilk, and I'm running into an odd problem. The relevant portions of my code, for reference (and apologies in advance for length): #include #include #include…
demrao
  • 3
  • 2
0
votes
1 answer

How to make eclipse error parser accept cilk_for

I am trying to make eclipse work with cilk. I want to define a macro as cilk_for = for for the eclipse CDT parser. Someone in another post recommended that I go to Project=>Properties=>Paths and Symbols and then define the symbol there so that…
chasep255
  • 11,745
  • 8
  • 58
  • 115
0
votes
1 answer

I'm getting symbol _cilk_spawn could not be resolved when compiling with icpc

Im using Ubuntu 14.04 & eclipse & intel compiler v 15 I have 2 same programs (which use cilk commands) (one with as c program and the other as cpp program). I can compile it with icc (without any problem) But when I'm using icpc (cpp program) I'm…
user3668129
  • 4,318
  • 6
  • 45
  • 87
0
votes
2 answers

What is the right way to compute Fibonacci using cilk?

While I'm learning cilk, I countered with 2 opposite examples: From intel from wiki (or other examples in the net): The oppposite lies on those 2 lines: x = spawn fib (n-1); y = spawn fib (n-2); The first site says: You do not need to add a…
user3668129
  • 4,318
  • 6
  • 45
  • 87
0
votes
0 answers

Cilk Program has different speeds

I have a cilk program that is using the libpuzzle library. My task is to parallelize the sorting of images based on their resemblance and I am using a parallel cilk for loop to compare all the images with a reference image. What I noticed was that…
0
votes
1 answer

Compiling Cilkplus-GCC on CentOS

I got an Error while comiling Intel CilkPlus on CentOS 7. I can post my config.log (was just a bit too big for this post - if it is usefull I will post it) And here the last lines of the console output: checking for C++ compiler default output file…
0
votes
1 answer

Why does CILK_NWORKERS affect program with only one cilk_spawn?

I am trying to paralellize a matrix processing program. After using OpenMP I decided to also check out CilkPlus and I noticed the following: In my C code, I only apply parallelism in one part i.e.: //(test_function declarations) cilk_spawn…
koukouviou
  • 820
  • 13
  • 23
0
votes
2 answers

Is Intel Xeon Phi used intrinsics get good performance than Auto-Vectorization?

Intel Xeon Phi provides using the "IMCI" instruction set , I used it to do "c = a*b" , like this: float* x = (float*) _mm_malloc(N*sizeof(float), ALIGNMENT) ; float* y = (float*) _mm_malloc(N*sizeof(float), ALIGNMENT) ; float z[N]; _Cilk_for(size_t…
Marcus Wu
  • 47
  • 7
0
votes
1 answer

Does array notation in Cilk run in parallel?

ie. for int A[100] A[:] = 1; does that try to create a 100 threads? or is it the same as doing a for loop? I thought it was parallelized but I just tested it and it doesn't look like it. Is there a way to make it use multiple threads or is Array…
d0m1n1c
  • 157
  • 4
  • 16
0
votes
1 answer

The strange copy behavior of Intel Cilk Plus array notation

I'm using Intel Cilk Plus array notation to practice vector programming. However, I met strange copy behaviors of array assignments. The problem to solve is parallel prefix. D is input, and P is output. //Wrong result code. Tested on Intel icc…
hwang
  • 53
  • 7
0
votes
1 answer

Polynomial multiplication CilkPlus

I'm trying to make a parallel cilk code of this code using cilk_for: c[0:2*n-1] = 0; for (size_t i=0; i
ccarmona
  • 45
  • 5
0
votes
1 answer

Is it possible to use `__sec_implicit_index` inside an `if` block statement using Cilk Plus Array Notation?

My goal is to conditionally assign values to an array based on the implicit index value, using Cilk Plus Array Notation with Intel's icc compiler, version 13.1.3 20130607. Consider the following code: T test[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8,…
naitsirhc
  • 5,274
  • 2
  • 23
  • 16