Information Available to Up: Conventions for Local Previous: Conventions for Calling

Calling Sequence

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.)

  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 scalar dummy arguments are replicated (by broadcasting, for example) in all processors.
  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 .

The following actions must occur before control is transferred back to the caller.

  1. 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.

  2. The original distribution of arguments (and of the result of an extrinsic function) is restored, if necessary.