Example: Data Distribution
To avoid the bottle neck resulting from memory allocation on a single node:
- Perform initialization in parallel, such that each processor initializes data that it is likely to access later for calculation
- Use explicit data placement compiler directives (e.g. C$ distribute )
-
-
-
-
-
-
-
-
- Enable environment variable for data placement (setenv _DSM_PLACEMENT)
- Use dplace command (with appropriate options) to start the program execution
REAL*8 A(N),B(N),C(N),D(N)
C$DISTRIBUTE A(BLOCK),B(BLOCK),C(BLOCK),D(BLOCK)
A(I) = B(I) + C(I) + D(I)