“Every language was a new language at one time. Most are not accepted by the mainstream. Some are adopted for niche applications. Very few have a major impact. The thing to remember is that over the next sixty years (the length of all electronic computing to date), we will write many times as much software than already exists today. The true legacy code is our future not our past…” –Thomas Sterling, June 2006.
Software developers are a diverse lot, but they have at least one thing in common. Eventually they all become attached to one programming language or another. Whether it's the language they were trained on, the one they used to write their first real application, or the one that they've been coding in for the past ten years, sooner or later the programmer forms some sort of emotional bond to their language. It's human nature. People get comfortable with the way they interact with the rest of the world. A software developer's relationship to their favorite language elicits a kind of loyalty. And defensiveness. Promoting your programming language — and trashing the other guy's — is what passes for street hockey in the world of computer science.
This kind of attachment also helps to explain why older languages stay around for so long. When a language gains a critical mass of software applications and libraries, more programmers can leverage this software to develop new applications; and pretty soon you have a large investment in legacy code. At that point, the language acquires a momentum of its own. Fortran, COBOL, Basic, C/C++ and Java are all major beneficiaries of software momentum. Newer ones such as Python and Perl are building their legacy code now. Unfortunately, this model has a downside. Applications and application communities can evolve beyond the capabilities of the original language model.
Maybe more than in any other IT community, HPC developers have suffered at the hands of their own legacy code. The more code that accumulates, the harder it is to switch to a new language. Most supercomputing applications are written in Fortran or C, with some MPI (Message Passing Interface) code tacked on to implement the parallelism. Not only is the MPI parallel model too low-level for productive, large-scale development, but also both C and Fortran lack the type of high-level abstraction — object-oriented constructs, generic templates, type checking, etc. — that is considered essential in modern software engineering.
The HPC community has been attacking this problem from different directions. One of the most promising developments is OpenMP, which parallelizes current languages like C and Fortran, via compiler directives, library routines and environment variables. Vendors such as ASPEED, The MathWorks, Interactive Supercomputing and Intel have developed some interesting proprietary solutions. Another approach has been to actually extend current language semantics to include HPC capabilities. Examples include Unified Parallel C (UPC), High Performance Fortran (HPF), Co-Array Fortran (CAF), Titanium (Parallel Java) and Cilk. But the most ambitious dream has been to develop a modern general-purpose HPC language. The latter is one of the goals that has been embraced by DARPA's High Productivity Computing Systems (HPCS) program.
Last month, an HPCS Language Workshop was held at ORNL to get a handle on the state of this language effort — an effort which began in Phase II of the HPCS program. In attendance were Bill Harrod, the HPCS Program Manager, the three vendors (Cray, IBM and Sun), language researchers, and a smattering of people representing government HPC applications. I spoke with Rusty Lusk, principal organizer of the workshop and the Acting Division Director of the Mathematics and Computer Science Division at Argonne National Laboratory, about how this part of the HPCS program will proceed as Phase II comes to a close.
According to him, DARPA is certainly committed to getting a high-level HPC language out of the HPCS program. The program's focus on productivity mandates a more capable software development model. And the stated goal of producing petascale systems will surely require a language model that can scale more easily than the MPI and OpenMP models that are currently available.
Even without the move to petascale systems, the supercomputing community is almost unanimous in its desire to move beyond MPI. Rusty Lusk, the lead driver of the MPICH standard implementation, realizes that a high-level solution is required.
“Nobody loves MPI,” admits Lusk. “When people criticize it, I'll stand up and defend it. But when we developed MPI, the idea was that it would be used to write portable libraries; actual users should never have to confront it. But a user language has never really evolved.”
The languages being developed for HPCS go beyond just an abstraction for MPI. They are designed to incorporate many different kinds of parallelism and should be able to scale from small commodity clusters to petascale supercomputers. The new languages are also being designed to support higher levels of programmability, performance, robustness and portability.
At the HPCS workshop, each of the three companies presented a candid report on the current status of the their language efforts — Chapel (Cray), X10 (IBM) and Fortress (Sun). None of the them have a complete implementation today, or even a finalized language specification. But much to the relief of the vendors, DARPA was willing to continue to fund each of the three language efforts until at least the end of 2007 — regardless of the Phase III selection for the hardware systems. Once the language implementations are completed, and probably even before that, adventurous users will be recruited to start getting some experience with them. However, DARPA would eventually like to see just a single language emerge. In some yet-to-be-defined way, the three solutions will be distilled into one. But not yet.
“It became clear it was premature to try and squeeze them together.” explains Lusk. “Each company had their own take on the problem. And each company was doing very interesting stuff. Bill Harrod along with everyone else thought it would be a shame to curtail this. It would be distracting at best and destructive at worst to make them start muddling their ideas with other peoples'.”
Whatever HPC language emerges, it's bound to run into a fair amount of skepticism. The barrier of legacy code is formidable and the built-in conservatism of many users will slow adoption of any new language. And then there's the problem of getting the support needed from software tools developers — not just for compilers, but also debuggers, libraries and development environments.
But it's not hopeless. Obviously new languages do catch on. Otherwise we'd still be writing all our applications in COBOL and Fortran. The problem is we really don't know how to create a successful language. It's tempting to think that a sort of “technical Darwinism” is at work, where only the most capable software models survive. But plenty of critically acclaimed languages with wonderful features never make it big. Pascal, Ada and LISP come to mind; I'm sure there are others.
Why is this the case?
To answer that it might be useful to think of programming language adoption as a social/business process rather than a technical one. The complexity of how to apply this in the real world is beyond the scope of this article, but a few basic elements should be considered. When designing a language, it is probably worth looking at features such as semantic simplicity (e.g., in Python), backward compatibility to legacy code (e.g., in C++) and interactiveness (e.g., in MATLAB and Python). Beyond the language itself, the support of a powerful, integrated development environment can propel a mediocre language, like Basic, into a widely used one — Visual Basic. Free licensing and open-source models can speed development of compilers and tools, and help spread a language across a large number of platforms, as exemplified by the GNU Compiler Collection (GCC). So successful models do exist.
However, the fact that there is no well-defined formula for introducing a new programming language is probably disconcerting to DARPA and the HPCS language developers. A lot of time and resources are being expended to conceive a useful solution, but broad acceptance into the HPC community is impossible to predict. This doesn't appear to be discouraging DARPA from funding the effort for at least another year and half. Concludes Lusk: “There's a finite possibility that the whole effort will fizzle out. But I hope it doesn't.”
To learn more about the status of the HPCS languages, read the entire interview with Rusty Lusk in this week's issue.
As always, comments about HPCwire are welcomed and encouraged. Write to me, Michael Feldman, at [email protected].