next up previous contents
Next: Replicated computations Up: Implementation Previous: Implementation

Localized computation and communication

It is of central importance that computation and communication inside an executing task should not involve any processors other than those directed to execute the task in the relevant ON clause.

On entry to a lexical task, the compiler has to insert checks so that the inactive processors jump to the code following the task. Since an execution task cannot access data outside of the active processor set, no communication needs to be generated between the relevant active processors and other processors. In a message passing model, a communication generation algorithm that only generates necessary messages will naturally achieve the desired results. However, some communication schemes can involve generation of empty messages between processors that do not communicate and it is important to ensure that empty messages are not generated between active processors of an executing task and other processors.

A communication model that uses barriers for synchronization (in shared or distributed memory machines) must ensure that all barriers inside an executing task are subset barriers that only span the active processors. An implementation may also need to include a subset barrier, on entry to and on exit from, an executing task for consistency of data accesses inside and outside an executing task. In general, the compilation framework has to ensure the consistency of data accesses inside and and outside an executing task and this can be done in the context of virtually any synchronization scheme in a shared or distributed memory environment.