Next: Conventions for Local Up: High Performance Fortran Language Previous: Discussion of the
This annex defines a mechanism for coding single-processor ``node'' code in single-processor Fortran 90 or in a single-processor subset of HPF; the idea is that only data that is mapped to a given physical processor is accessible to it. This allows the programming of MIMD multiprocessor machines in a single-program multiple-data (SPMD) style. Implementation-specific libraries may be provided to facilitate communication between the physical processors that are independently executing this code, but the specification of such libraries is outside the scope of HPF and outside the scope of this annex.
The EXTRINSIC mechanism, which allows an HPF programmer to declare a calling interface to a non-HPF subprogram, is described in Section of the HPF specification.
From the caller's standpoint, an invocation of an extrinsic procedure from a ``global'' HPF program has the same semantics as an invocation of a regular procedure. The callee may see a different picture. This annex describes a particular set of conventions for coding callees in the ``local'' style in which a copy of the subprogram executes on each processor (of which there may be one or many).
An extrinsic procedure can be defined as explicit SPMD code by specifying the local procedure code that is to execute on each processor. HPF provides a mechanism for defining local procedures in a subset of HPF that excludes only data mapping directives, which are not relevant to local code. If a subprogram definition or interface uses the extrinsic-kind-keyword HPF_LOCAL, then an HPF compiler should assume that the subprogram is coded as a local procedure. Because local procedures written in HPF are thus syntactically distinguished, they may be intermixed unambiguously with global HPF code if the implementor of an HPF language processor chooses to support such intermixing.
This annex is divided into three parts: