| 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 |
- 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.
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
- 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.
Release Notes | Programmer’s Guide (PDF) | Intel® Cilk++ SDK Resource Library
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.
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:
- Multicore Programming Workshop - Lecture 1
- Concepts in Multicore Programming - Lecture 2: Parallelism & Scheduling Theory
- Concepts in Multicore Programming - Lecture 3: Analysis of Multithreaded Algorithms
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.
Comments (3) 
| January 11, 2010 11:47 AM PST
Aaron Tersteeg (Intel)
|
David, I've updated the links on the page to point to the What If software forums. http://software.intel.com/en-us/forums/whatif-alpha-software/ Thank you for your feedback, Aaron |
| March 14, 2010 10:09 PM PDT
Nadeesha Gamhewage | how to write multithreaded program that generates the Fibonacci series using either the Java, Pthreads, or Win32 thread library. This program should work as follows: The user will enter on the command line the number of Fibonacci numbers that the program is to generate. The program will then create a separate thread that will generate the Fibonacci numbers, placing the sequence in data that is shared by the threads (an array is probably the most convenient data structure).When the thread finishes execution, the parent thread will output the sequence generated by the child thread. Because the parent thread cannot begin outputting the Fibonacci sequence until the child thread finishes, this will require having the parent thread wait for the child thread to finish |
Trackbacks (9)
- Tasks or Software Threads? – Intel Software Network Blogs
February 12, 2010 12:34 PM PST - Tasks or Software Threads?
February 12, 2010 2:00 PM PST - Effective Bioinformatics Programming Part 4 | LifeFormulae Blog
March 10, 2010 10:46 AM PST - Intel Cilk++ Software Development Kit
March 17, 2010 3:55 AM PDT - Intel® Cilk++ Software Development Kit – Intel® Software Network « The other side of the firewall
March 17, 2010 5:22 PM PDT - In Barcelona For The Intel Software Conference | Business Computing World
May 4, 2010 3:27 AM PDT - Parallel Programming Talk #77 – Charles Leiserson – Intel Software Network Blogs
May 24, 2010 11:15 AM PDT - Parallel Programming Talk #77 – Charles Leiserson
May 24, 2010 11:40 AM PDT - Multicore programming with different multi-threading approaches – Intel Software Network Blogs
July 9, 2010 5:20 AM PDT
Leave a comment 
English | 中文 | Русский | Français
Aaron Tersteeg (Intel)
| ||
| Stephen Lewin-berlin (Intel) |


David Biesack
75