Intel® Cilk™ Plus

Why does Cilk Plus __sec_reduce_add differ from a sequential addition?

I'm finding a significant error for certain input values when I use a particular offset to add values. Due to the nature of the algorithm I'm considering (not relevant to the question), I need to start a sum value with the first element of an array. I was able to extract a minimal working example, which is appended below.

Even though there are less than 50 floating point additions involved, I'm seeing error far beyond that order of magnitude of ulps, and I don't understand what I am doing wrong. See the following code snippet, along with the invocation and what my results are:

_Cilk_spawn is undefined

Hello, I have installed Visual Studio 2013 and Intel Parallel Studio and when i write a cilk plus program (fibonacci to be accurate) it compiles it just fine, but it doesn't recognize the commands cilk_spawn and cilk_sync (if i move the cusror to these commands it says "_Cilk_spawn is undefined","_Cilk_sync is undefined" ). Also when i run the fibonacci program the serial version executes in almost the same amount of time as the parallel version (weird ah?). 

I researched on the internet for this problem but no-one seems to give a solution. 

Any help would be appreciated

status of cilkplus in gcc?

What's going on with cilkplus in gcc? Is it still being actively used and developed? 

This link says it's been "supported" for some time:

​Yet it doesn't seem to work with some of the simplest code like below which gives an ICE with gcc.

Простая методика оптимизации с использованием Intel System Studio (VTune, компилятор C++, Cilk Plus)


В этой статье мы описываем простую методику оптимизации с использованием Intel® Cilk™ Plus и компилятора Intel® C++ на основе результатов анализа производительности, проведенного с помощью Intel® VTune Amplifier. Intel® System Studio 2015 содержит упомянутые компоненты, использованные для этой статьи.

  • Partners
  • Professors
  • Students
  • Microsoft Windows* 8.x
  • Business Client
  • Game Development
  • Internet of Things
  • Windows*
  • C/C++
  • Advanced
  • Beginner
  • Intermediate
  • Intel® System Studio
  • Intel® VTune™ Amplifier
  • Intel® Cilk™ Plus
  • Intel® Advanced Vector Extensions
  • Intel® Streaming SIMD Extensions
  • Academic
  • Development Tools
  • Intel® Core™ Processor
  • Optimization
  • Parallel Computing
  • Platform Analysis
  • Threading
  • Vectorization
  • Q about fibonacci example

    //From the examples website:
    int fib(int n)
        if (n < 2)
            return n;
        int x = cilk_spawn fib(n-1);
        int y = fib(n-2);
        return x + y;

    This leads to much recalculation of old fib values. A better implementation would store the value, and return it if it has already been computed. However, that also requires critical sections or locks to serialize access to "has_already_been_computed" variable. Does cilk have a mechanism for that?

    Subscribe to Intel® Cilk™ Plus