# Adjacent Zero Communication Parallel Cloud Computing Method and Its System forN-Body Problem with Short-Range Interaction Domain Decomposition

Authors: Dingju Zhu
Journal: Advances in Astronomy
 (2016)

---

## Abstract

Although parallel computing is used in the existing numerical solutions ofN-body problem, tons of communications between N particles render the parallel efficiency extremely low. Despite the fact that domain decomposition based on short-range interaction is used, when N is exceedingly large and lots of communications exist between particles in adjacent areas, the parallel efficiency remains terribly low. This paper puts forward adjacent zero communication parallel cloud computing method for N-body problem with short-range interaction domain decomposition. According to this method, the adjacent subblock data are exchanged and redundantly stored without acquiring data from other subblocks in the parallel processing, so the waiting time for data transmission can be saved and hence the parallel processing efficiency can be enhanced substantially.


---

## Body

## 1. Introduction

N-body problem [1] means N particles between which there is universal gravitation are given in three-dimensional space and solving the space time state of motion of these N particles under the conditions of given initial position and velocity. If the planets in the universe are regarded as particles, then we can consider the motion of the N planets under the universal gravitation to be an N-body problem. When N
≥
3, it is greatly difficult or even unable to adopt analytical method (its basic principle is to present the coordinate and velocity of the celestial bodies as approximate analytical expressions in the form of series in time or other small parameters in order to discuss the changes in the celestial bodies’ coordinate or orbit along with time) or qualitative method (using the qualitative theories of differential equation to study the macrolaws and global nature of N-body in the long term) to obtain solutions. The most feasible method is to adopt numerical method [2] (directly obtaining the specific position and time of the celestial bodies at a certain time via the computing methods of differential equation [3]). In the N-body problem [4], the velocity and position of N particles under the universal gravitation need to be recalculated at a certain time step. Therefore, the calculation of the updated velocity and displacement of each particle at each time step needs to add other N
-
1 particles’ interaction results on this particle, but this causes the calculation amount complexity of each time step to be O
(
N
2
). The larger the time step is, the greater the error is; the smaller the time step is, the closer it is to the reality. When N is very large and the time step (TS) is very small, serial computing cannot work, since the serial computing always cannot complete the calculation whose complexity is O
(
N
2
) within TS. As a result, when N is very large and TS is very small, parallel computing must be used to accelerate the numerical solutions of N-body problem [5, 6].In the traditional parallel computing [7–9] and cloud computing [10, 11], large numbers of adjacent data blocks in complex network [12] of N-body need to be exchanged, so inaccessibility of the needed data in the communications of adjacent data blocks will result in the waiting of parallel process and lower the efficiency of parallel processing. In case of using parallel computing to solve the N-body problem, the calculation of the updated velocity and displacement of each particle at each time step needs to add other N
-
1 particles’ interaction results on this particle, so each particle needs to communicate with the remaining N
-
1 particles in each TS. Therefore, N
(
N
-
1
) times of communications need to be carried out in each TS. Such frequent and large numbers of communications will greatly lower the efficiency of parallel computing, thereby depriving the advantages of parallel computing. That is why we need to find a method to reduce the amount of communication. Hence, we need to simplify the N-body problem as the N-body problem under the short-range interaction. Such simplification is effective, since the applied force between distant particles is weak, the long-distant effect can be neglected, and only the short-range effect is considered. Therefore, each particle only needs to communicate with the short-range particles without communicating with other particles, which significantly cuts the communication traffic. Domain decomposition is to divide the physical domain into subdomains of the same number as the processors. In each TS, each processor calculates the force, velocity, and displacement of all particles within its domain, and when the particle moves to a new subdomain, it will be distributed to a new processor. In order to calculate the force of particles within its domain, the processor only needs to know the information about the particles of the adjacent subdomains. Domain decomposition parallel algorithm is highly suitable to solve this N-body problem of short-range interaction, because it leads only the adjacent domains to need mutual communication to acquire the interaction between the particles in adjacent domains.If the quantity of the particles in each domain is still very considerable, then even if only the communications in adjacent domains are needed, the communication traffic remains heavy and still greatly affects the parallel efficiency. Therefore, this paper proposes adjacent zero communication parallel cloud computing method for adjacent data which can almost completely eliminate all communications in solving theN-body problem with short-range interaction domain decomposition.


## 2. Adjacent Zero Communication Parallel Cloud Computing Method

The flowchart of the adjacent zero communication parallel cloud computing method is presented in Figure1. This adjacent zero communication parallel cloud computing method includes the following steps.Figure 1
Flowchart of adjacent zero communication parallel cloud computing method.S100. The input data to be processed are divided into lots of subblock data. Lots of subblock data divided from the input data redundantly store the data included in the adjacent subblock data, wherein the input data refer to the data which need relatively long processing time in a single data parallel processing, while the subblock data mean the data whose single processing is relatively simple and hence less time-consuming.The time of the subblock data divided from the input data needed by processing via parallel processing unit shall be basically the same so that, after the parallel processing, the final results can be obtained at the fastest velocity and the wait for parallel processing unit can be avoided.The schematic diagram of traditional data division is presented in Figure2. The input data 10 are divided into lots of subblock data 20, each of which has adjacent data 30, wherein, when the adjacent subblock data 20 undergo parallel processing, it is necessary to obtain adjacent data 30.Figure 2
Schematic diagram of traditional data division.The division schematic diagram of adjacent zero communication parallel cloud computing method is presented in Figure3. Two units of adjacent subblock data (202 and 204) are used to explain redundant storage. In the traditional division ways, the subblock data 202 has adjacent data (a) and the subblock data 204 has adjacent data (b). The subblock data 202 redundantly stores the adjacent data (b) and the subblock data 204 in adjacent data (a). That is, both the subblock data 202 and the subblock data 204 include the adjacent data units (a) and (b). The adjacent data units (a) and (b) are used in their respective parallel processing in the subblock data units 202 and 204.Figure 3
Division schematic diagram of adjacent zero communication parallel cloud computing method.The ways of realizing the redundant storage include data exchange after redundant segmentation and nonredundant segmentation.The redundant segmentation means that, in data segmentation, the segmented boundary is extended to the preset width so that the data included in other subblock data can be included. Data segmentation adopts the ways such as file segmentation, datasheet segmentation, and data matrix segmentation.Nonredundant segmentation means that the master data are segmented in accordance with the traditional data segmentation ways and that there is no data redundancy between the segmented subblock data. Similarly, the nonredundant segmentation can adopt the ways such as file segmentation, datasheet segmentation, and data matrix segmentation. Subsequently, each subblock data unit transmits and exchanges the adjacent data and integrates such data into its own data, wherein data exchange can adopt message passing technology and file transfer technology.S200. Lots of subblock data undergo parallel processing. After obtaining their respective redundantly stored subblock data, the parallel processing units carry out parallel processing.In the parallel data processing method, since the subblock data redundantly store the data needed by other subblock data in the parallel processing, they need not obtain data from other subblock data in the parallel processing and thus the waiting time for data transmission can be saved and hence the parallel processing efficiency can be enhanced.


## 3. Adjacent Zero Communication Parallel Cloud Computing System forN-Body Problem with Short-Range Interaction Domain Decomposition

Although the particles in domains in theN-body problem with short-range interaction domain decomposition will transfer from one domain to another at different time steps, the majority of particles in each domain experience no significant changes at adjacent time steps, so the communication traffic caused by the transfer of particles in different domains is relatively light. The current time step only needs to update in the current domain the changed particles and their status in the current domain and its adjacent domains, so the communication traffic needed by the current time step is only the communication traffic consumed by the particle transfer and its redundant backup communication in its adjacent domains. Since this kind of communication traffic is extremely light, it is negligible compared with the communication traffic produced by solution of N-body problem with short-range interaction domain decomposition before adopting the adjacent zero communication parallel cloud computing method.The parallel processing system is indicated in Figure4. This system includes data segmentation module 100 and parallel processing unit 200.Figure 4
Model of adjacent zero communication parallel cloud computing system.The data segmentation module 100 conducts redundant segmentation of the input data, allowing each subblock data unit to redundantly store the data included in its adjacent subblock data, wherein redundant segmentation means extending the segmented boundary to the preset width in data segmentation. Data segmentation adopts the ways such as file segmentation, datasheet segmentation, and data matrix segmentation.The parallel processing unit 200 accepts scheduling and conducts parallel processing of the subblock data. The parallel processing unit 300 is used to conduct parallel computing, distributed computing, network computing, grid computing, cloud computing, or sea computing.The parallel processing system is indicated in Figure5. This system includes data segmentation module 100′, data exchange module 200′, and parallel processing unit 300. The data segmentation module 100′ conducts nonredundant segmentation of the master data, and the nonredundant segmentation means that the master data are segmented in accordance with the traditional data segmentation ways and that there is no data redundancy between the segmented subblock data. The segmentation ways can adopt file segmentation, datasheet segmentation, and data matrix segmentation.Figure 5
Model of adjacent zero communication parallel cloud computing system.The data exchange module 200′ exchanges and redundantly stores the adjacent subblock data. Each subblock data unit transmits and exchanges the adjacent data and integrates such data into its own data, where data exchange can adopt message passing technology and file transfer technology.The parallel processing unit 300 accepts scheduling and conducts parallel processing of the subblock data. The parallel processing unit 300 is used to conduct parallel computing, distributed computing, network computing, grid computing, cloud computing, or sea computing.


## 4. Results

The time step of the numerical solutions ofN-body problem is TS. N-body is divided into m domains, each of which has k fields; the number of particles transferred in each TS is about P
%; the space time status of the N-body at t is solved, wherein P
% is generally small, such as 0.01%, and k is also generally small, such as 4 or 6.The parallel cloud computing method not using the domain decomposition method (NDPC) is as follows:(1)
The communication traffic of each TS for computing: EV
=
N
×
N
-
1
;
Total communication traffic for computing: TV
=
EV
×
t
TS
.The parallel cloud computing method not using the adjacent zero communication but using the domain decomposition method (NZDPC) is as follows:(2)
The communication traffic of each TS for computing: EV
=
m
×
N
m
×
k
=
N
×
k
;
Total communication traffic for computing: TV
=
EV
×
t
TS
.Parallel cloud computing method using the adjacent zero communication and using the domain decomposition method (ZDPC) is as follows:(3)
The communication traffic of each TS for computing: EV
=
m
×
N
m
×
P
%
×
k
=
N
×
k
×
P
%
;
Total communication traffic for computing:  TV
=
EV
×
t
TS
.It can be observed from Table1 that NDPC-EV > NZDPC-EV > ZDPC-EV, NDPC-TV > NZDPC-TV > ZDPC-TV, and when N is extremely large and P
% is extremely small, the gap is larger so that the enormous advantage of parallel cloud computing ZDPC using the adjacent zero communication and the domain decomposition method can be demonstrated.Table 1
Communication traffic comparison of numerical solutions ofN-body problem.
Numerical solutions ofN-body problem
NDPC
NZDPC
ZDPC
EV
N
×
(
N
-
1
)
N
×
k
N
×
k
×
P
%
TV
N
×
(
N
-
1
)
×
t
/
T
S
N
×
k
×
t
/
T
S
N
×
k
×
P
%
×
t
/
T
SFor example,N = 10
5, TS = 1 ms, m
=
10
2, k = 6, P
% = 10
(
-
4
), and t = 10
10 ms.NDPC is as follows:⁡
EV
=
N
×
(
N
-
1
)
=
10
5
×
(
10
5
-
1
)
≈
0.9
×
10
10;
TV
=
EV
×
t
/
TS
=
0.9
×
10
10
×
10
10
=
0.9
×
10
20;NZDPC is as follows:EV
=
N
×
k
=
10
5
×
6
=
0.6
×
10
6;
TV
=
EV
×
t
/
TS
=
6
×
10
5
×
10
10
=
0.6
×
10
16;ZDPC is as follows:EV
=
N
×
k
×
P
%
=
10
5
×
6
×
10
(
-
4
)
=
0.6
×
10
6
×
10
(
-
4
)
=
0.6
×
10
2;
TV
=
EV
×
t
/
TS
=
0.6
×
10
2
×
10
10
=
0.6
×
10
12.According to Figure6, the communication traffic of the parallel cloud computing method using the adjacent zero communication (ZDPC) and the domain decomposition method is the least, significantly more advantageous than the parallel cloud computing method not using the domain decomposition method (NDPC) and the parallel cloud computing method not using the adjacent zero communication but using the domain decomposition method (NZDPC).Figure 6
Comparison of communication traffic in the examples of numerical solutions ofN-body problem.


## 5. Conclusions

The adjacent zero communication parallel cloud computing method proposed in this paper segments the input data to be processed into lots of subblock data, each of which redundantly stores the data in its adjacent subblock data, and conducts parallel processing of lots of subblock data. This paper puts forward adjacent zero communication parallel cloud computing method forN-body problem with short-range interaction domain decomposition. According to this method, the adjacent subblock data are exchanged and redundantly stored without acquiring data from other subblocks in the parallel processing, so the waiting time for data transmission can be saved and hence the parallel processing efficiency can be enhanced substantially, especially considerably boosting the parallel processing efficiency of N-body problem with short-range interaction domain decomposition.



---

*Source: 9049828-2016-03-21.xml*