Take advantage of the information given by the
-show hpf option. This option prints useful
information about interprocessor communication generated by the
compiler, statements that are recognized as nearest-neighbor,
statements that are not handled in parallel, and other information.
This is very useful in determining what the compiler is doing with
your program.
For example, consider this test program:
PROGRAM test INTEGER a(100), b(100), c(100) !HPF$ DISTRIBUTE (BLOCK) :: a,c !HPF$ DISTRIBUTE b(CYCLIC) c= a+b END PROGRAM test
When this program is compiled with the -show hpf_comm
option, the following output is generated:
% f90 -wsf -show hpf_comm test.f90 f90: Info: f90: Info: test.f90, line 5: f90: Info: Communication needed because f90: Info: the target is distributed differently than the source. f90: Info: Target: @1(1:100) f90: Info: Source: B f90: Info: Temp @1(1:100) has distribution (block)
This tells you that since A and C are distributed BLOCK, the compiler re-maps B to BLOCK in order to do the statement in parallel. The "at" sign (@) indicates a compiler-generated temporary array. If you see more communication generated than you expect, it indicates that you need to check your program to verify that the HPF directives you have issued are what you intended.
-show hpf option,
see Section 8.1.1.7.