next up previous contents
Next: Information Available to the Up: The LOCAL Model Previous: Conventions for Calling LOCAL

LOCAL Calling Sequence

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.

  1. The processors are synchronized. In other words, all actions that logically precede the call are completed.
  2. 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.
  3. 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.

  1. 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.
  2. The original distribution of arguments (and of the result of an extrinsic function) is restored, if necessary.


next up previous contents
Next: Information Available to the Up: The LOCAL Model Previous: Conventions for Calling LOCAL