Next: Definition and Invocation
Up: Extrinsic Procedures
Previous: Extrinsic Procedures
It may be desirable for an HPF program to call a procedure written in a
language other than HPF. Such a procedure might be written in any of a
number of languages:
- A single-thread-of-control language not unlike HPF, where
one copy of the procedure is conceptually executing and there is a
single locus of control within the program text.
- A multiple-thread-of-control language, perhaps with dynamic
assignment of loop iterations to processors or explicit dynamic process
forking, where again there is, at least initially (upon invocation)
one copy of the procedure that is conceptually executing but
which may spawn multiple loci of control, possibly changing in number
over time, within the program text.
- Any programming language targeted to a single processor, with the
understanding that many copies of the procedure will be executed, one
on each processor; this is frequently referred to as SPMD (Single
Program, Multiple Data) style. We refer to a procedure written in
this fashion as a local procedure.
A local procedure might be written in Fortran 77, Fortran
90, C, Ada, or Pascal, for example. A particularly interesting
possibility is that a local procedure might be written in HPF! Not all
HPF facilities may be used in writing local code, because some
facilities address the question of executing on multiple processors and
local code by definition runs on a single processor.
See Annex .
A called procedure that is written in a language other than HPF,
whether or not it uses the local procedure execution model
should be declared EXTRINSIC within an HPF program that calls it.
The EXTRINSIC prefix declares what sort of interface should be used
when calling indicated subprograms.
paula@erc.msstate.edu
Thu Dec 8 16:17:11 CST 1994