Intel® Advisor Help

Enabling Intel® Cilk™ Plus in your Build Environment

Intel® Cilk™ Plus is supported by the Intel® C++ Compiler, which is part of most Intel® Parallel Studio XE editions). It is also supported by other compilers, such as certain versions of the GNU* gcc compiler with the Intel Cilk Plus branch and other compilers (see http://cilkplus.org/which-license). To use Intel Cilk Plus, you must use one of these compilers so they recognize the Intel Cilk Plus keywords.

On Linux OS systems, use of Intel Cilk Plus is enabled when using the Intel® C++ Compiler (icc) or the gcc compiler with the Intel Cilk Plus branch. With the Intel C++ Compiler, Intel Cilk Plus use is enabled by default. To make sure Intel Cilk Plus use is enabled with the GNU gcc, check the option flag_enable_cilk (for Cilk language keywords).

The use of Intel Cilk Plus is enabled when using the Intel® C++ Compiler. Follow these steps to ensure that your project has Intel Cilk Plus support on a Windows* OS system:

  1. In Solution Explorer, select (click) the name of one or more projects. To select multiple projects, hold down the Ctrl key.
  2. Select Project > Properties or right-click the project name and select Properties from the context menu.
  3. From the context menu, select Intel C++ Compiler XE > Use Intel C++

  4. Specify the following Configuration Property:

    C/C++ > Language

    Under Intel specific, specify Disable all Intel Language Extensions as No.

  5. Click OK to save the specified properties.
  6. Repeat the steps above for other configurations.
  7. You should check your startup project properties before a starting a build.

You can now use the features of Intel C++ Compiler or gcc compiler, including using the Intel Cilk Plus keywords.

Intel Cilk Plus normally uses one worker thread per CPU core or hardware thread on your system. If you want to change the number of worker threads, set the environment variable CILK_NWORKERS to the desired number of worker threads before running your program (see the Intel Cilk Plus help).

See Also