next up previous
Next: Structuring the parallel program Up: Parallelization strategy (distributed memory) Previous: Computing new values for

Performing I/O

If the computation requires reading a whole grid-based array from a sequential file, this can be done by using a separate host process to read the data into an undistributed copy of the array and then distributing the data from the host process to the grid processes. Writing a whole grid-based array is analogous. (Alternatively, each grid process can read/write its own local section from/to its own file, which is often more efficient but not as straightforward.)

Reading or writing non-grid-based variables (global constants, reduction variables, etc.) can also be accomplished using the host process: Global constants are read into the host process and then broadcast to the grid process, while reduction variables are computed by all processes acting together and then written by the host process.



Berna L Massingill
Mon Jun 8 19:35:58 PDT 1998