next up previous contents index
Next: Bibliography Up: ADAPTOR HPF Programmers Guide Previous: 11 Pitfalls   Contents   Index


12 Compiling Subprograms for Processor Subsets

With the introduction of task parallelism, every subprogram in HPF must be compiled in such a way that it can be executed on any processor subset. The compiler cannot make any assumptions on which processors the code is executed at runtime. It might also be possible that the code will be executed several times on completely different processor subsets.

      subroutine TASK (A, B, N)
      real, dimension (N) :: A, B
!hpf$ distribute (block) :: A, B
      real, dimension (N) :: C
!hpf$ distribute (block) :: C
      ...
      end subroutine TASK

This implies the following strategies for the HPF compiler:

The access to global arrays causes serious problems for HPF compilers generating SPMD code based on message passing. Data can be on processors that are not in the active processor subset and these processors cannot send or receive the accessed data. The correct implementation would require one-sided communication.

ADAPTOR always assumes that access to global data is resident. Unfortunately, this implies a certain responsibility for the user.


next up previous contents index
Next: Bibliography Up: ADAPTOR HPF Programmers Guide Previous: 11 Pitfalls   Contents   Index
Thomas Brandes 2004-03-18