11.3 An Object-Oriented Framework for Easy Parallel Programing

Fig. 11-5 Comparison of conventional programing and object-oriented programing
In conventional programing the program is constructed by putting emphasis on the "computational procedure" rather than the "data structure relating to the computation." In object-oriented programing, on the other hand, "classes" are created by incorporating the divided data set as a processing object with the computational procedures concerned, and the necessary process is executed within the class.

Fig. 11-6 A simulation result of a shock wave obtained using the object-oriented simulation framework
A shock wave generated in front of a cylinder by uniform flow from the left was calculated by the finite volume method. To develop a simulation program one is required only to prepare a differential equation solver for a data set within each subdomain. Division into subdomains and connection of the solutions in adjacent subdomains are automatically carried out by the framework, and it is not necessary for the user to be aware of the parallelization of the program.


It is often necessary to change a model or algorithm of a program for the sake of correction or improvement during the development or execution of a large-scale, complicated program for a parallel distributed computer system. In order to facilitate development, improvement, and correction of a parallel computer program we developed a simulation framework according to the "object-oriented programing method" and confirmed the effectivity of the framework.
Within the framework of conventional programing, a program is usually constructed by putting the emphasis on the "computational procedure" rather than the "data structure concerned with computation." If we parallelize a computation program on the basis of the conventional framework, therefore, the parts of the program dependent on the overall data structure necessary for data assignment to each parallel processor are not clearly distinguished from the parts dependent on the computational procedure, which makes the parallelization rather complicated. According to the object-oriented programing method, on the other hand, we make a "class" consisting of a part of the divided objective data and related computational procedure. The whole program is constructed so that the necessary process is carried out within each class independently (Fig. 11-5). When we solve a partial differential equation by the domain decomposition method (DDM), for example, functions to decompose the computational domain and to connect the solutions obtained in each subdomain are allotted to the framework and it is not necessary for users to be clearly aware of the parallel structure of the program. As a result "reuse" of program elements is facilitated and "portability" of the program among parallel computers is advanced.
Figure 11-6 shows the computational result of a shock wave in front of a cylinder which was solved by the finite volume method in which the whole domain was divided into 15 subdomains in the object-oriented programing framework.

Reference
T. Ohta et al., An Object-Oriented Programming Paradigm for Parallel Computational Fluid Dynamics on Memory Distributed Parallel Computers, Proc. Parallel Computational Fluid Dynamics, May 19-21, 1997, Manchester, 561 (1998).

Select a topic in left column
 


Persistent Quest-Research Activities 1998
Copyright(c)Japan Atomic Energy Research Institute