next up previous contents
Next: High Performance Fortran Up: Parallel programming tools Previous: Parallel programming tools

Parallel programming languages

Languages such as C and Fortran have for years been used in parallel environments by using either specialized compilers, or explicit message passing libraries, on either a low level (network) or high level (independent libraries). A problem with both of these methods has been that the algorithms written in this fashion have been either less than optimal, due to their (intended) ignorance of the system, or too specialized because they use special tricks native to the architecture.

In some architectures with shared memory, such as the Alliant FX-2000, and some for distributed memory architectures, the compiler is able to optimize a portion of the code to run in parallel on all the nodes sharing the memory. The main weakness of all such compilers is: How does the compiler understand that a sequence of statements can be converted into a parallel algorithm? It works well for some numerical codes, and for other codes the compiler will need some help. This problem is also present in the optimization of sequential code. In both cases, the code should be written without much customized optimization, or if these optimizations exist, they should be carefully singled out by conditionals in as large blocks as possible to increase efficiency.

The solution to this problem has been either more advanced compilers, adaptions of the language to take hints about optimization in the form of so-called pragma directives, or extensions of the language in an architecture specific fashion, which forces the programmer to implement the application in a nonportable way in order to exploit the parallel hardware.

In this section, a combination between the advanced compiler and a language adaption (High Performance Fortran), a language based on a specific architecture (MPL), and two C++ variants supporting parallel architectures are briefly presented.