Next: Information Available to
Up: Conventions for Local
Previous: Conventions for Calling
The actions detailed below have to occur prior to the invocation of the
local procedure on each processor. These actions are enforced by the
compiler of the calling routine, and are not the responsibility of the
programmer, nor do they impact the local procedure. (The next section
discusses restrictions on the local procedure.)
- The processors are synchronized. In other words, all actions
that logically precede the call are completed.
- Each actual argument is remapped, if necessary, according to the
directives (explicit or implicit) in the declared interface for the
extrinsic procedure. Thus, HPF mapping directives appearing in the
interface are binding-the compiler must obey these directives in
calling local extrinsic procedures. (The reason for this rule is that data
mapping is explicitly visible in local routines). Actual
arguments corresponding to scalar dummy arguments are replicated (by
broadcasting, for example) in all processors.
- If a variable accessible to the called routine has a replicated
representation, then all copies are updated prior to the call to
contain the correct current value according to the sequential semantics
of the source program.
After these actions have occurred, the local procedure is invoked on
each processor. The information available to the local invocation is
described below in Section .
The following actions must occur before control is transferred back to
the caller.
- All processors are synchronized after the call. In other words,
execution of every copy of the local routine is completed before
execution in the caller is resumed.
- The original distribution of arguments (and of the result of an
extrinsic function) is restored, if necessary.
- []Advice
to implementors.
An implementation might check, before returning from
the local subprogram, to make sure that replicated variables
have been updated consistently by the subprogram. However,
there is certainly no requirement-perhaps not even any
encouragement-to do so. This is merely a tradeoff
between speed and, for instance, debuggability.
(End of advice to implementors.)
Next: Information Available to
Up: Conventions for Local
Previous: Conventions for Calling
paula@erc.msstate.edu
Thu Dec 8 16:17:11 CST 1994