Cilk Plus Installation Guide

From SuperTech Wiki

Intel provides a suite of tools for programming Cilk-based programs. The tool set contains the Intel compiler ICC, the parallelism checker Cilkview, the race condition reporter Cilkscreen, the binary-level instrumentation gadget Pintool, the fine-level instrumentation tool Cilkprof. Here is a guide to install them on a 64-bit Linux.

Installation

Install ICC or GCC: You need a license from Intel® in order to install ICC. A free, open-source version is available in the cilkplus branch of GCC.

Unpack the downloaded file and run $ /path/to/unpacked/file/install.sh. To allow all users to access ICC on the system, run this install script as root.

Follow the on-screen instructions to install ICC.

To set up your environment variables to use ICC, run $ source /path/to/intel/bin/compilervars.sh intel64.

Installing GCC: These instructions walk you through checking out and building the cilkplus branch of GCC. Complete instructions for building GCC from source can be found at http://gcc.gnu.org/install/index.html. These instructions will install GCC into a custom directory, gcc-cilk, so as not to overwrite the existing version of GCC on your system. As a warning, this process takes a while and uses a couple gigabytes of space.

Note: I encountered problems with my connection timing out when I tried to check out the repository from http://gcc.gnu.org/svn/gcc/branches/cilkplus instead of svn://gcc.gnu.org/svn/gcc/branches/cilkplus. If you encounter similar problems, make sure you are using the "svn" protocol, instead of the "http" protocol. If you have previously checked out the gcc cilkplus source using "http," you can switch your checkout to use "svn" by running

This command generates two csv output files, cilkprogram.bb.csv and cilkprogram.cc.csv, containing work and span profiling data for your Cilk program. At this time, the data in these files are most easily perused using your favorite spreadsheet program. For more information on configuring the output of Cilkprof, run $ cilkprof -h.