next up previous contents
Next: The LOCAL Model Up: Approved Extensions for HPF Extrinsics Previous: Approved Extensions for HPF Extrinsics

Alternative Extrinsic Models: LOCAL and SERIAL


A global HPF program may be thought of as a set of processors cooperating in a loosely synchronous fashion on a single logical thread of program control. Section 6 defines two additional models that may be invoked from global HPF: LOCAL, where the model is single-processor ``node'' code, in which all active processors participate, but with only the data that is mapped to a given physical processor directly accessible, and SERIAL, where the model is a single-processor operating alone, with all necessary data aggregated by the caller before the serial subprogram is invoked. As examples of use, the LOCAL model is useful for programs that drop down into code with explicit message passing for data communications, while the SERIAL model may be needed for calls to system libraries or specialized I/O routines.

Both the LOCAL and the SERIAL models can be invoked from a global HPF program, but in general these models may not be mixed. Calling global HPF from local or serial procedures is not allowed. Furthermore, calling a serial procedure from a local one is not allowed. Section 6.3.1 gives more detail about how various models can interact with each other.

Some additional restrictions are placed on all local and serial subprograms invoked from global HPF:

The behavior of I/O statements in local and serial subprograms is implementation dependent.