Next: Information Available to the
Up: The LOCAL Model
Previous: Conventions for Calling LOCAL
Execution of an extrinsic local procedure must be performed as if the
actions detailed below occur prior to the invocation of the local
procedure on each processor (see Section 6.3.2 for a
related list of conditions and for the meaning of as if). Any
actions thus required 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 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 sequential arrays and scalar dummy
arguments are replicated (by broadcasting, for example) in all
processors. Scalars of derived types with explicitly mapped
structure components or of an explicitly mapped derived type cannot
be passed from global HPF to an extrinsic local procedure.
- 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 11.1.1.3.
When control is transferred back to the caller at the conclusion
of the extrinsic local procedure, execution must resume as if
the following actions have already been performed.
- All processors are synchronized after the call.
In other words, global computation procedes as if the 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 the responsibilty of the local subprogram, and any checks in the
caller are a tradeoff between speed and, for instance,
debuggability.
(End of advice to implementors.)
Next: Information Available to the
Up: The LOCAL Model
Previous: Conventions for Calling LOCAL