Things are kind of wild here, so this is both late and shorter than I wanted, but the main points are here at least.

I've talked to the first vendor of multi-core development solutions and wanted to offer you all an update.

The point here is that F5 Products can speed your network access and load balance work across multiple servers, server virtualization products can put the work of multiple servers onto one box, so the missing leg we're looking for is the one that maximizes utilization of the CPU in a multi-core environment. That's what this series is about.

I spoke with Ilya at Cilk Arts last week about their Cilk++ product. Cilk++ is a C++ toolset that allows you to adapt your C++ programs to utilize all of the cores your application needs to get the job done.

It comes in several pieces, we'll take the easiest case first - when you have an algorithm that can easily take advantage of multiple cores.

There are just a few keywords you need to add to your C++ source to get Cilk++ going.

First is the for loop. Instead of for(..;..;..), you can call cilk_for(..;..;..) and it will run all of the iterations of the for loop concurrently. Note that some for loops can't run each iteration concurrently, for logic errors you'll need to think this through yourself, for access errors, Cilk++ can help you out, more on this later.

Next is the cilk_spawn keyword. It tells the compiler that the next line/block is parallelizable (I'm sure it's a word somewhere!). You simply put cilk_spawn before a function call to indicate that the call can run in parallel with the calling application.

Then comes cilk_sync, which tells the cilk subsystem that all spawned children must return before program execution can continue.

Add to these the ability to (with a bit more work) create parallel compatible global variables, and you get a pretty comprehensive solution.

There's also a tool to run race condition detection, a memory manager, a group of libraries, and a performance profiler included in the package.

While Cilk++ is easy to use, an honest review has to point out that it assumes quite a bit of knowledge about parallel programming. In this sense, Cilk Arts has a long way to go - they make doing the development simple, but for the crowd that needs it simple, they'll have to provide a ton more information about where silk_spawn and silk_for are going to provide the biggest impact. They're still in beta, and there is some relevant information out there, but a lot more work will need to be done before the average single-process developer will be able to take advantage of this system without intensive training.

It's an elegant solution, and if you're familiar with parallel programming, it will be quick and easy to maximize the benefits of Cilk++. Just beware if you have a lot of programmers without either coursework or experience in parallel processing that some work will be required to gain benefits from it.

 

Don.

Share this post :