multithreadingcodeblockscilk-plus

How to use Intel (c) Cilk Plus with CodeBlocks


I have been recently learning multi-threaded algorithms from Introduction to Algorithms (by Cormen, Rivest), third edition. And the preface of the book inspired me to use Cilk Plus extension for the same developed by MIT. However, I have not been able to get any article online to integrate it with my CodeBlocks IDE for utilization. Is there any set of commands to declare linker settings for the same?

Contents of the Folder C:\Programs(x86)\Intel\CilkTools

  1. bin : contains ia32, intel64 folders (containing dlls) + other dlls and exe
  2. doc : an html page and a jpg document
  3. include : has CilkTools which has four .h files : cilkscreen.h, cilkveiw.h, fake_mutex.h, and lock_guard.h
  4. opensrc : has a zip file (ZedGraph, open source graphing package)
  5. visual studio and example files

Solution

  • You're confusing the compiler with the Cilk tools. First you'll need to install Intel C++ Composer and integrate that into your IDE. The Wikipedia article I found on Code Blocks claims that should work, but I don't know the details.

    Then you'll want to install the Intel Cilk Plus SDK which provides you the Cilkscreen race detector and the Cilkview scalability analyzer. The Cilk tools come with an addin to integrate into Visual Studio, but you'll have to use the command line with other IDEs. The major benefit of the addin is being able to click on a callstack entry and go to that line in the Visual Studio editor. But the text version of the report is easy enough to read.

    Don't ask why the names are so confusing. We (the development team) were not allowed to choose the names.

        - Barry Tannenbaum
          Intel Cilk Plus Development