As Intel continues to flesh out its multicore processor roadmap, Anwar Ghuloum, principal engineer with the company’s Microprocessor Technology Lab, is already encouraging software developers to begin designing applications for manycore processors — architectures that contain tens, hundreds or thousands of cores. In his latest blog entry titled “Unwelcome Advice,” he makes the case that designing apps for multicore processors is somewhat of a dead end.
If you’re a mainstream programmer, you might think this puzzling. The current crop of IA processors sports 2 to 4 cores and Intel’s next generation Nehalem processors, due out later this year, will support between 2 and 8. Larrabee, Intel’s first manycore processor family, is a couple of years down the road, and its programming guide is still under wraps. So why commit to manycore when you’re struggling to slice up your application into enough threads to give the current cores something to do?
Ghuloum’s point is that manycore architecture will emerge as the enduring model in the industry, implying that the transition from “multi” to “many” will happen rather quickly. “Eventually, developers realize that the end point is on the other side of a mountain of silicon innovations,” he writes. The downside, Ghuloum admits, is that designing an application for manycore is a much bigger undertaking than doing a multicore port.
The latter usually involves just breaking an application into well-defined tasks that can run concurrently. In some cases, this design may naturally be teased out of the existing code framework, where the application’s major functions can be logically mapped to independent threads. A trivial example is a transactional app that inputs a data item, processes it, and outputs the transformed result — and does this over and over. Turning this from a sequential app into one with three threads (Input, Process, Output) that carry out the tasks in parallel is often fairly straightforward. But since the application is now mapped to three cores, taking advantage of a platform with a different core count involves another dive into the application. Not only that, but for most applications there is no clear functional decomposition that can get you to tens or hundreds of cores.
Long-term scalability is easier to achieve with a manycore design mindset up front, since you’re forced to deal with the built-in assumption that the ultimate number of cores is not just large, but variable. Ghuloum admits this “usually requires at least some degree of going back to the algorithmic drawing board and rethinking some of the core methods they implement.” He continues (and here’s the really Unwelcome Advice part): “This also presents the ‘opportunity’ for a major refactoring of their code base, including changes in languages, libraries, and engineering methodologies and conventions they’ve adhered to for (often) most of the their software’s existence.”
Ghuloum kind of glosses over how this might actually be accomplished, but in previous blog entries he has written more extensively about Intel’s adventures in fine-grained parallelism and terascale computing in general. In particular, back in January, he wrote about the company’s new Ct language, a C/C++ derivative, and offered some detail about how it supports manycore architectures. In a nutshell, Ct supports both data and task parallelism and is designed to tackle fine-grained parallelism in a more generalized way than is currently being done with GPGPU environments like NVIDIA’s CUDA or AMD’s Brooks+. The Ct runtime insulates the programmer from the underlying hardware, creating and dispatching threads as needed.
Whether anyone will heed Ghuloum’s Unwelcome Advice remains to be seen. He correctly notes that the HPC crowd is already on board with the idea of automatic application scaling, but the rest of the industry may be a harder sell. It’s hard to imagine that many (non-HPC) legacy codes will migrate to manycore; a lot just don’t contain enough inherent parallelism to make the trip worthwhile.
The real potential for manycore architectures and software environments like Ct is that they will provide a platform for much more intelligent (and thus valuable) types of software than exist today — applications like image-based data miners, personal health agents, and real-time market trade analyzers. (I wrote about how Intel views this application space last year.) If developers see clear monetary opportunities in manycore applications, all advice will be welcomed.