Portability of PCG is achieved by use of various software tools which allow the coding of the algorithms to take place at a high level. In the present work, the Gnu m4 macro preprocessor is employed. By use of macros which expand differently for different machine versions, a substantial portion of the source code can be kept machine-independent. Other components which may require machine-specific code optimizations may be accommodated in this setting as well.
The m4 macro preprocessing utility provides a convenient framework for managing such machine dependencies as language variations, different message passing libraries, and so forth. This approach also makes it possible to preserve high performance by making such decisions at compile time rather than at run time.
The flexibility provided by a macro preprocessor such as m4 allows the incorporation of machine-specific languages and libraries for the computation- and communication-intensive sections of the code. These can be interfaced to the machine-independent sections of the package to provide high performance. The present software for example utilizes such utilities as Mathlib routines (Ncube 2), BLAS routines or as860 assembler (Intel iPSC860), the Paris library (CM-2 fieldwise), or the CM Runtime System library (CM-2 slicewise, CM-5).