Parallelization of Shallow Water Model with HPF


Yukio Masumoto (Graduate School of Science, University of Tokyo)
and
Hitoshi Murai (1st Computer Software division, NEC Solutions)

A simple shallow water model is parallelized by use of High Performance Fortran (HPF) language, and a performance of the parallelized model is investigated on the NEC SX5. The model is a standard finite difference model for the geophysical fluids, with only three variables to be determined every time step, and it consists of an initialization part and an iteration part, in which the time integration is carried out.

A test run with 1440 iterations is performed with one, two, four, and eight processors. With a single processor, the total elapsed time and the time taken for the iteration part for this run is 52.20 sec and 47.98 sec, respectively. Preliminary results show that, as the number of processor increases, the elapsed time for the iteration part decreases to 16.18 sec with eight processors, while the total elapsed time increases to 71.01 sec. This inefficiency comes from a loop that is not parallelized appropriately and generates scalar ommunications among processors during the initialization process. However, in the usual geophysical applications, the length of the time integration would be hundreds to thousands times longer than that of the test run. In such a case, the relative importance of the contribution from the initialization part to the total time would be greatly reduced.

Further modification on the code that generated by the HPF compiler leads to a significant improvement in the elapsed time for the modified part. In the particular case, the ratio of the time with one processor to that with eight processors reaches 5.6, which should be compared with the value of 3.0 for the standard test run.

The above results suggest that we still need both the accumulation of the HPF examples and the associated programming techniques and the further improvements of the compiler ability to generate efficient parallelized codes.