NHSE ReviewTM 1996 Volume Second Issue

Comparison of 3 HPF Compilers

| <- HREF="chap2.html" Prev | Index | Next -> |
NHSE ReviewTM: Comments · Archive · Search


Chapter 3 -- Architectural Overviews

The APR xHPF and PGI pghpf products operate by translating from HPF source code to FORTRAN 77 source code. Generated intermediate FORTRAN 77 source invokes Fortran 90 and HPF vendor-supplied support routines via CALL statements or function invocations. The final executable is produced by a Fortran compilation and linking step. Note that without the burden of creating a machine-code generator, APR and PGI can concentrate on language feature handling (particularly as the HPF Standard evolves) or other value-added aspects of their product. But there is a tradeoff against reliance on the within-processor performance result from the optimizations generated by the native IBM xlf Fortran compiler: some of the generated FORTRAN 77 may inhibit these optimizations because of heavy reliance on procedure invocations, a known inhibitor to some code optimizations.

The IBM XL HPF product is a true compiler in that it has an internal intermediate representation for the program, but this is not rendered into complete Fortran source code. The tight integration of language-understanding in the compiler front-end and the detailed machine-code generation of a true compiler opens an opportunity for better optimizations both of the high-level strategies for handling HPF constructs and the low-level single-processor machine-code. The tradeoff for this product is a more laborious development and release process and potentially lower ability to accomodate evolution of the language standard.

3.1 APR xHPF

xHPF is a source-to-source translator from Fortran 90 or FORTRAN 77, with or without HPF directives, to FORTRAN 77.

HPF source through xhpf becomes F77 source<br compiled/linked by xlf becomes executable
with APR and Comm support libraries also linked" src="xhpf-arch.gif">

The inserted APR support routines can engage any convenient message-passing library on the target. On the SP, the choices are MPI, MPL, and PVM. (CTC users find the best performance with the IBM native MPI underlying the APR libraries.) The user compiles and links the generated FORTRAN 77 code with the APR library that has been built for the particular message-passing library.

Details of single-node optimization are left to the IBM xlf Fortran compiler that the user engages as a separate step after processing their HPF source code with xHPF. Other support libraries can be loaded with an application as desired.


3.2 PGI pghpf

The PGI pghpf compiler is also a source-to-source translator, but it is "stealthy" about that behavior: the user employs a single command to do the entire set of translations, compilation and linking.

HPF source through pghpf translator becomes F77 source<br compiled/linked by xlf becomes executable
with PGI and Comm support libraries also linked
but only the pghpf command is visible to user" src="pghpf-arch.gif">

It is possible to preserve the FORTRAN 77 source file generated by the pghpf compiler, but one has to be a bit more cautious about file naming conventions than with the other compilers because .f is the preferred file name extension for that file. (This is more a nuisance than a danger in that pghpf refuses to overwrite its input file: note the .hpf extension in the diagram, above.) The pghpf command will pass most arguments that it does not recognize directly to the underlying IBM xlf compiler or linker.

The inserted PGI support routines can engage either MPI or MPL message-passing libraries on the SP: the choice is made with a command-line argument to the pghpf command, MPI being the default.

Again, details of single-node optimization are left to the IBM xlf Fortran compiler, but the user does not need to engage that as a separate step unless they wish to. Again, other support libraries can be loaded with an application as desired.


3.3 IBM XL HPF

Of the three HPF products, only IBM XL HPF is a true compiler: it does not generate an intermediate source form from its Fortran 90 source input.

HPF source through xlhpf compiler becomes object code<br linked by ld becomes executable
with XL HPF support and IBM Parallel Environment support
also linked; separate use of ld command is optional" src="xlhpf-arch.gif">

The xlhpf command can be used to directly perform the compile and link, or can be used to create only an object module to be linked later (perhaps by another invocation of xlhpf -- the usual Unix compiler conventions apply, triggered off the file-name extension). Again, any other desired support libraries can be linked with the application. In particular, the application can access MPI calls directly, for instance from within EXTRINSIC(HPF_LOCAL) code.

This compiler uses an extensive set of internal optimizations for parallel execution coordination, communication optimization, and single-node execution optimization. A pseudo-Fortran listing file is available, but it is not complete, legal FORTRAN 77. The listing is quite indicative of the machine-language code that is generated by the compiler. This compiler also uses a set of HPF support routines for parallel allocation of distributed arrays, communication, and various run time system data structure manipulations. The message-passing layer is the IBM native MPI on the SP: none of the actual MPI calls can be seen in the pseudo-Fortran listing, but the HPF support routines that perform communication are named such that one can understand what is going on.

Copyright © 1996


| <- HREF="chap2.html" Prev | Index | Next -> |
NHSE ReviewTM: Comments · Archive · Search


presberg@tc.cornell.edu
Last modified: Fri Jan 31, 1997