Intel® Cilk++ Software Development Kit

Submit New Article

Published On :   February 22, 2010 8:00 PM PST
Rate
 


What If Home | Product Overview | Technical Requirements | Resource Library
FAQ | Primary Technology Contacts | Discussion Forum | Blog

Intel® Cilk++ SDK is an extension to C++ that offers a quick, easy and reliable way to improve the performance of C++ programs on multi-core processors. The Intel Cilk++ SDK, based on technology acquired from Cilk Arts in August, 2009, offers support for programmers using the GCC compiler for Linux* or the Microsoft C++ compiler for Windows*. The Intel Cilk++ SDK includes compiler support, runtime libraries, and tools for race detection, scalability and performance analysis. The three Cilk++ keywords provide a simple yet surprisingly powerful model for parallel programming, while runtime and template libraries offer a well-tuned environment for building parallel applications.  The Intel Cilk++ SDK allows you to:
  • Write parallel programs using a simple model:  With only three keywords to learn, C++ developers move quickly into the parallel programming domain.
  • Optimize for parallel performance: Hyperobject libraries resolve race conditions without the performance overhead of traditional locking solutions, and the scalability analyzer predicts how performance will scale to systems with many more processors.
  • Leverage existing serial tools: The serial semantics of Cilk++ allows you to debug in a familiar serial debugger.
  • Verify the correctness of parallel programs: The race detector’s strong guarantee of race-free operation eliminates the worry that parallel bugs will compromise applications.
  • Scale for the future: The runtime system operates smoothly on systems with hundreds of cores.
As multi-core systems become prevalent on desktops, servers and even laptop systems, new performance leaps will come as the industry adopts parallel programming techniques. However, many parallel environments consist of confusing, complex and error-prone rules and constructs. The Cilk++ language, built on the Cilk technology developed at M.I.T. over the past two decades, is designed to provide a simple, well-structured model that makes development, verification and analysis easy. Because Cilk++ is an extension to C++, programmers typically do not need to restructure programs significantly in order to add parallelism.




Product Overview

Intel® Cilk++ SDK offers early exposure to the Cilk++ style of parallel development.

Convert a serial program to Cilk++. Here, we indicate a parallel region of a serial quicksort algorithm using the cilk_spawn and cilk_sync keywords:

template <typename T>

void qsort(T begin, T end) {

if (begin != end) {

T middle = partition(

begin,

end,

bind2nd(less<typename iterator_traits<T>::value_type>(), *begin));

cilk_spawn qsort(begin, middle);

qsort(max(begin + 1, middle), end);

cilk_sync;

}

}

 

Compile and link the program with the compiler and runtime library from the command line or within Microsoft Visual Studio*.

 

Test the program on a single processor to ensure serial correctness.

 

Verify that the program is race free using the race detector, and correct any errors found. This sample output shows how the race detector displays the file name, source line, stack trace and variable name for a race in a sample program:


cilkscreen sum

Race condition on location 004367C8

write access at 004268D8: (c:\sum.cilk:8, sum.exe!f+0x1a)

read access at 004268CF: (c:\sum.cilk:8, sum.exe!f+0x11)

called by 004269B4: (c:\sum.cilk:14, sum.exe!cilk_main+0xd0)

called by 0042ABED: (c:\[...]\ostream:786, sum.exe!__cilk_main0+0x3d)

called by 100081D5: (cilk_1_1-x86.dll!__cilkrts_ltq_overflow+0x137)

Variable: 004367C8 - int sum



Correct race conditions using Hyperobjects:
  • Create private views of global variables in different strands running in parallel.
  • Use any data structure or control structure (not just parallel loops).
  • Minimize overhead with lazy view creation.
  • Simplify debugging and testing with deterministic results that are the same as the serial program results.
  • Use built-in support to support parallel operations such as creating linked lists, constructing strings, summing numbers and generating file output.
  • Create custom Hyperobjects modeled after the templates provided.
Analyze that the program will scale well using the scalability analyzer:
qsort.gif




Documentation

Release Notes | Programmer’s Guide (PDF) | Intel® Cilk++ SDK Resource Library

 


Technical Requirements

Technical Requirements (all platforms)

 

1. Intel® Cilk++ SDK requires an IA-32 or Intel 64 processor.

2. In order to see parallel speedup, Cilk++ requires two or more processing cores in either a single or multiple chip configuration.

 

Technical Requirements (Microsoft Windows*)

1. Intel® Cilk++ SDK has been tested on many different versions of Microsoft Windows and should be compatible with Microsoft Windows XP with Service Pack 2 or later, or Microsoft Windows Vista.

2. Intel® Cilk++ SDK requires Microsoft Visual Studio 2008, Microsoft Visual Studio 2008 Express, or Microsoft Visual Studio 2005 with Service Pack 1 installed.

 

Technical Requirements (GNU/Linux*)

1. Intel® Cilk++ SDK has been tested on many different GCC/Linux distributions and should be compatible with and 32-bit or 64-bit GNU/Linux installation.

2. The Cilk++ compiler is based on GCC version 4.2.4 and requires the same software environment as that version of GCC, includes a linker and assembler.

 


Frequently Asked Questions

Q - What is the state of the product on the WhatIf site?

A - Intel® Cilk++ SDK is provided free of charge as a technology preview. We’re interested in your feedback. Since it is only a technology preview, the availability and support for Cilk++ is not long-term. Intel is planning to support Cilk++ technology in a future version of the Intel C++ Compiler.

Q - How do I report problems or send feedback?

A - You are welcome to join our Intel® Cilk++ Software Development Kit Forum to post your questions and issues. The team will keep any eye on the discussion and do our best to answer your questions.

Q - What kind of feedback are you looking for?

A - Please visit the Intel® Cilk++ Software Development Kit Forum and share your thoughts in an existing discussion thread or create a new one.   We appreciate all feedback, in particular feedback on the following:

  • Your thoughts on this methodology for parallelizing your program.
  • How does it compare with other techniques you have used?
  • What features of Cilk++ do you like?  What did you find difficult to use or to understand?
  • What is the biggest obstacle that has stopped you from implementing multi-core support in your application?

Q - How do I download Intel® Cilk++ SDK?

A - Visit the end user agreement and download page for Intel® Cilk++ SDK.

Q - How do I learn more about multi-core programming?

A - Download the free e-book "How to Survive the Multicore Software Revolution (or at Least Survive the Hype)".

Q - What is the best way to learn about Cilk++?

A - The Cilk++ Programmer's Guide (pdf) is a good starting point. In addition, there are three video lectures taped at MIT which you can watch on the following page:

  1. Multicore Programming Workshop - Lecture 1
  2. Concepts in Multicore Programming - Lecture 2: Parallelism & Scheduling Theory
  3. Concepts in Multicore Programming - Lecture 3: Analysis of Multithreaded Algorithms

 


Primary Technology Contacts

Stephen Lewin-Berlin manages the Intel engineering team working on Cilk++ SDK technology. His experience building tools for software developers spans more than 20 years, most recently as VP Engineering at Cilk Arts, where he helped develop Cilk++.

We encourage you to visit our support forums. We’ll be watching for Intel® Cilk++ SDK questions.