Tackling Parallel Programming
New tools can help developers gain proficiency
By Peggy Albright
Parallel programming isn’t a new field, but until recently, only programmers who worked on high-end or supercomputing machines understood it. Today, however, it’s commanding widespread interest.
Home computers and gaming consoles are already equipped with dual- and quad-core CPUs capable of running parallel programs. And with 6- and 8-core systems for mainstream applications on the horizon, and even more cores-per-chip appearing on vendor roadmaps, developers who have spent their careers writing serial code are realizing the importance of becoming proficient in parallel programming.
Prominent software developers and programmers are urging colleagues to learn parallel programming sooner rather than later. While not a trivial process, many new software tools are available to help developers learn the discipline and work on actual projects.
“I think every programmer should be playing with it a little bit to get some experience,” said James Reinders, chief product evangelist and director of marketing for Intel’s software developer products division. “You’ll be seeing, increasingly, a lot of applications coming out that are taking advantage of it and evolving over time. We’re at a very interesting point in history now as far as computing goes and parallelism is clearly the future of hardware and software.”
The nudge to embrace parallel programming stems, in part, from the availability of new tools to harness the power of multicore machines. There’s also a desire for exciting applications to showcase these new architectures’ performance and help drive the market for the new technologies. Additionally, there’s a real concern that software’s failure to properly utilize the cores—particularly when 8-16 core chips become the norm—could impede performance and undermine these new devices’ value.
“If the software can’t take advantage of the cores, it is all for naught,” said Ilya Mirman, vice president of marketing at Cilk Arts.
Recently announced tools
Fortunately, hardware and software vendors and startups are lining up to offer developers tools for multicore applications and solutions. Herb Sutter, a software development consultant and a software architect at Microsoft, said future programmers will someday look back on current tools as version 1.0 of parallel programming. He likens this turning point to the era that began when the industry adopted GUIs, evolving that specialty out of the realm of experts so mainstream programmers could participate.
“We’re at the beginning of that now in concurrency and parallelism,” Sutter said.
Intel and Microsoft both recently introduced long-awaited parallel programming products designed to open up this field to non-experts. Intel began shipping the Intel Parallel Studio, a suite of development tools for C/C++ developers who use Microsoft Visual Studio, which enables Windows developers to create, debug, and optimize applications for multicore processors. And Microsoft published the beta version of Visual Studio 2010, which provides tools to help developers write parallel code, including the Parallel Pattern Library and the Asynchronous Agents Library for C++, and the Task Parallel Library and Parallel LINQ extensions for.NET Framework applications. It also incorporates Microsoft’s Concurrency Runtime, which manages a program’s tasks and use of resources to ensure applications can exploit multi-core technologies.
A few vendor platforms to help software developers parallelize their applications have also gained attention. These include the Cilk++ programming platform released earlier this year by Cilk Arts, as well as the Multicore Development Platform from RapidMind. Sweden’s Nema Labs is on the verge of introducing tools to help developers design software for multicore processors.
Previously, developers seeking parallel programming tools would select from discrete programming resources such as Intel’s Threading Building Blocks, a library-based approach to constructing parallel programs that is also now included in the Intel Parallel Studio. Advanced Micro Devices offers the AMD Performance Library, which developers can use to increase parallelism in software that runs on AMD processors. The consortium-sponsored OpenMP API, a specification of extensions for current programming languages to facilitate developing parallel applications for platforms ranging from the desktop to the supercomputer, is another established resource, among others.
Advice from the experts
While new tools and languages should help generate excitement in developing parallel programs, developers will still face the challenge of making programs correctly perform and scale and controlling problems such as race conditions that occur when two parallel instructions access the same resources in a system. While the industry will come up with a variety of new solutions to address these types of issues, those who work in parallel programming must understand these pivotal concepts.
Developers will also need to learn to “think parallel,” although some will be better at it than others, Reinders said. “Every team is going to need or want a few people who are good at it,” he said.
Ilya Mirman at Cilk Arts urges programmers to jump in. “There’s nothing like doing. Take a project, take a piece of your algorithm that you expect lends itself to parallel performance, and try it,” he said.
Microsoft’s Sutter recommends that developers work in a system that they’re familiar with, whether it is Windows, Apple, or Linux, for example, and make it a point to learn how to use concurrency platforms. Then look ahead in the market to determine how many cores will be used on mainstream products when you expect your product to come to market and “design on a box with as many cores as you can get,” he said.
Mike Moore, director of ISV enablement engineering at AMD, urges programmers to go directly to companies such as AMD for support. “Go to the source,” he suggests. “We work very closely with partners in our software ecosystem so they’ll be successful.” CW (4 June, 2009)