Clearly, the overhead of remapping one or more objects varies from system to system. Remapping across a procedure boundary on a shared memory multiprocessing system would take less time than remapping over a wide-area-network of distributed workstations, however, a rule of thumb should be that remapping should not take place unless absolutely essential. Consider,
INTEGER, DIMENSION(512,512) :: ia, ib !HPF$ DISTRIBUTE (BLOCK,BLOCK) :: ia, ib DO icnt = 1, 10 CALL ReMapSub(ia,ib) END DO END SUBROUTINE ReMapSub(iarg1, iarg2) INTEGER, DIMENSION(512,512):: iarg1, iarg2 !HPF directive goes here iarg2 = 2*iarg1 END SUBROUTINE ReMapSub
An experiment was made with one of the commercial tools, the NA Software HPF Compiler v1.0. Two versions of the code given here were compiled and executed on a Sun Multiprocessing system (using Unix sockets for communication). The version which involved remapping (from (BLOCK,BLOCK) to (CYCLIC,CYCLIC) and then back again) took 100 times longer to execute than the version which involved no remapping. If iarg1 and iarg2 are distributed as,
Note how the procedure does not specify the INTENT of the dummy arguments. This will be seen to also have a bearing on the overhead of remapping.
Return to corresponding overview page