A Hybrid OpenMP/MPI Parallel Computing Model Design on the SMP
Cluster
Ying Xu
1
,
2
*, Tie Zhang
2
1
Department of Mechatronics and Control Engineering, Shenzhen University, PRChina
* E-mail: yxu@szu.edu.cn
2
Department of Mechanical and Automotive Engineering, South China University of Technology, PRChina
E-mail: merobot@scut.edu.cn
Abstract–In the integrated power system, the traditional
parallel algorithm is difficult to achieve system
electromagnetic transient simulation, so a hybrid parallel
computing model was proposed. Two kinds of parallel
programming models (OpenMP shared-memory and MPI
message-passing) are widely used on the SMP (Symmetric
Multi-Processors) cluster. By comparing different
programming paradigms for parallelization on the nodes of a
SMP cluster, we obtain a parallel computing model that
shows high performance. When parallel communication is
low, using MPI programming purely will be more efficient.
Otherwise, the hybrid MPI/OpenMP parallel programming
model can be used to achieve better results. The main
characteristic of the hybrid programming model is that the
whole project is divided into segments according to the
hierarchical structure of the task being executed, and this
division is based on the principle of system load balance. Task
level process adopts MPI for inter-SMP nodes
communication, and uses OpenMP for intra-SMP node
parallelization inside each processor. Experimental results
show that this hybrid parallel computing model yields high
performance and works very effectively.
Key word– MPI, OpenMP, HPC, SMP Cluster, Hybrid
MPI/OpenMP Programming, Parallel computing
I. INTRODUCTION
Parallel computing has been widely used in electric power
system simulation and analysis. The basic idea of parallel
computing is to decompose the large scale of the original
problem into several smaller sub-problems, and each sub
problem can be calculated by coordinating mutual
information. With the fast development of computer
processor techniques and their related hardware facilities,
high performance parallel computing becomes more and
more simple. Although great progress has been achieved
in hardware development, little improvement has been
made to the parallel computing in software. Generally,
parallel computing mainly includes two models: the
Message-Passing (MPI) model
[1]
and the Shared- Memory
(OpenMP) model
[2]
. Both of them have advantages and
disadvantages. Programming by using the application
interface in Message- Passing model has high performance
in parallel computing, but it is difficult to make a detailed
analysis of the relationship in data, and the cost in data
communication is always high. OpenMP represents the
mainstream in Shared-Memory model, with its good
performance of simple programming and high parallel
performance. However, it required that all the OpenMP
threads derived from the same process be based on
Shared-Memory model.
Currently, Symmetric Multi-Processors (SMP) cluster has
been widely used in the field of avigation, petroleum
prospecting, weather forecasting, medical treatment and so
on. Therefore, under the current parallel programming
model, it is vital to enhance furthest the high capacity of
parallel computing of SMP cluster
[3]
. In this paper, we
make full use of the advantages of the two kinds of the
models by using them on SMP cluster. On one hand, when
the communication among processes is heavy, we use
hybrid hierarchical programming model, while the
Message-Passing model is used for programming among
the nodes and the Shared-Memory model is applied for
programming in the nodes, in this way, advantages of both
these two parallel programming methods are furthest
embodied. On the other hand, when the communication
among processes is lower, higher efficiency can be
obtained by purely using Message-Passing model. This
programming approach plays a very important role in the
high performance parallel computing on clusters.
II.
CHARACTERISTICS OF DIFFERENT
PROGRAMMING MODELS
The advantages and disadvantages of different parallel
programming models on a SMP cluster will be discussed
as follows
[4,5]
.
1. MPI mode
MPI belongs to the distributed memory programming
mode. It provides a complete set of API standard
interfaces
[6,7]
. In the Message-Passing model, an
application consists of many parallel tasks, and every task
has its data that are need to be deal with. The data
exchange among tasks is achieved by the apparent
Message-Passing messages. MPI can realize complete
asynchronous communication efficiently, it is independent
on hardware facility and has well transplantable
characteristic. Moreover, it can provide all kinds of
flexible parallel ports of C and Fortran for users.
MPI can provide us a well solution to parallel
programming in cluster, however, it also has quite a few
drawbacks. For example, long delay time in MPI
communication causes a problem, although data
transformation among processors that have Shared-
Memory in the same node is equal to data transformation
happens in different nodes, this problem still exists.
Furthermore, in order to achieve high parallel computing
performance, we should divide the core logic of the
program into several pieces properly, and project them to
distributed process set, it is really a big challenge.
2. OpenMp mode