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
98
votes
5 answers

libstdc++.so.6: cannot open shared object file: No such file or directory

I want to run Cilkscreen command with a cilk++ program but I'v got this error /usr/local/cilk/bin/../lib32/pinbin: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory Can you help me…
ammouna
  • 981
  • 1
  • 6
  • 4
12
votes
1 answer

Multithreading in LLVM

I need to generate LLVM code that will serve a lot of threads/tasks (hundreds of thousands). These threads should be lightweight like Intel TBB's tasks, golang gorutines or other. Of course they can be implemented with external C++ libraries like…
Wojciech Danilo
  • 11,573
  • 17
  • 66
  • 132
5
votes
1 answer

A curious case in parallel programming

I have a parallel program which sometimes runs and sometimes just gives segmentation fault. The executable when forced to run with 3 threads runs fine (basically it also run with single thread which is just serial) but it gives segmentation fault…
Aman Deep Gautam
  • 8,091
  • 21
  • 74
  • 130
5
votes
2 answers

Cilk or Cilk++ or OpenMP

I'm creating a multi-threaded application in Linux. here is the scenario: Suppose I am having x instance of a class BloomFilter and I have some y GB of data(greater than memory available). I need to test membership for this y GB of data in each of…
Aman Deep Gautam
  • 8,091
  • 21
  • 74
  • 130
3
votes
1 answer

Cannot compile code using Intel Cilk

I use Intel Parallel Studio XE 2011 .It says it supports Cilk.When I include a cilk_for statement in the code it does not compile.It says symbol undefined.I have included the cilk.h at the beginning of my code and also under include directories I…
Manish
  • 1,729
  • 5
  • 32
  • 47
3
votes
1 answer

Is Cilk's approach to shared memory parallel programming a panacea?

What challenges in shared memory parallel programming (particularly multicore) cannot be solved or cannot be solved efficiently using a Cilk-style solution (i.e. nested data parallelism with per-core work stealing task deques)?
J D
  • 48,105
  • 13
  • 171
  • 274
3
votes
2 answers

How to print in a thread-safe manner in C/Cilk?

I am playing around with Cilk and I am having an issue with printing synchronously. Printing is slow, so it's hard to keep the prints synchronous. For example... void ftn(int x) { if (x % 2 == 0) { std::cout << "printing.. " << x…
cilk
  • 231
  • 1
  • 2
  • 5
3
votes
2 answers

Reading files to shared memory

I am reading a binary file that I want to offload directly to the Xeon Phi through Cilk and shared memory. As we are reading fairly much data at once each time and binary data the preferred option is to use fread. So if I make a very simple example…
Asthor
  • 598
  • 4
  • 17
3
votes
2 answers

error: expected primary-expression before ‘int’

I'm using: gcc --version gcc (Ubuntu 4.9.2-0ubuntu1~14.04) 4.9.2 I'm trying to compiler the following program: #include #include using namespace std; int main(){ cout << "\nStart\n"; cilk_for (int i = 0; i < 10;…
user3668129
  • 4,318
  • 6
  • 45
  • 87
3
votes
3 answers

Why does this code lead to deadlock?

I am surprised to see from pstack that this code leads to deadlock! I don't see a reason for the same. pthread_mutex_t lock; _Cilk_for (int i = 0; i < N; ++i) { int ai = A[i]; if (ai < pivot) { pthread_mutex_lock(&lock); A[ia++] = ai; …
Lazer
  • 90,700
  • 113
  • 281
  • 364
2
votes
2 answers

Paralellized execution in nested for using Cilk

I'm trying to implement a 2D-stencil algorithm that manipulates a matrix. For each field in the matrix, the fields above, below, left and right of it are to be added and divided by 4 in order to calculate the new value. This process may be iterated…
nitowa
  • 1,079
  • 2
  • 9
  • 21
2
votes
1 answer

How Should I Implement Cilk Parallelism with a Recursive Scan Algorithm?

I implemented a recursive scan (prefix sum) algorithm, which I've included below. Here, I simply generate random lists of size powers of two up to the twenty-seventh power, checking against a simple sequential scan for accuracy. It works. #include…
xiii1408
  • 361
  • 2
  • 11
2
votes
2 answers

Grand Central Dispatch versus Cilk++

Anybody have any thoughts on Grand Central Dispatch (which has now been open-sourced by Apple) and Cilk++? Comparisons/contrasts? Is Cilk more Windows-only?
2
votes
3 answers

Why does my quicksort crash on large inputs?

I have created a median-of-3 standard Quick-sort implementation which sorts a large array of random integers. I would like to go up to at least a 100 million elements but preferably a billion. To increase speed, I am attempting to parallelize the…
Steinin
  • 541
  • 7
  • 20
1
vote
1 answer

Cilk++ cilkexample.c = 200 lines in stderr

I installed Cilk successfully on my home computer, a 32-bit machine running Ubuntu. I replicated the process to the best of my knowledge on my 64-bit Ubuntu netbook, excepting, of course, that I downloaded the 64-bit version instead of the 32-bit…
Frank Harris
  • 305
  • 1
  • 6
  • 16
1
2 3 4 5