Elsevier

Parallel Computing

Volume 29, Issue 6, June 2003, Pages 743-766
Parallel Computing

Developing SPMD applications with load balancing

https://doi.org/10.1016/S0167-8191(03)00060-7Get rights and content

Abstract

The central contribution of this work is SAMBA (Single Application, Multiple Load Balancing), a framework for the development of parallel SPMD (single program, multiple data) applications with load balancing. This framework models the structure and the characteristics common to different SPMD applications and supports their development. SAMBA also contains a library of load balancing algorithms. This environment allows the developer to focus on the specific problem at hand. Special emphasis is given to the identification of appropriate load balancing strategies for each application. Three different case studies were used to validate the functionality of the framework: matrix multiplication, numerical integration, and a genetic algorithm. These applications illustrate its ease of use and the relevance of load balancing. Their choice was oriented by the different load imbalance factors they present and by their different task creation mechanisms. The computational experiments reported for these case studies made possible the validation of SAMBA and the comparison, without additional reprogramming costs, of different load balancing strategies for each of them. The numerical results and the elapsed times measurements show the importance of using an appropriate load balancing algorithm and the associated reductions that can be achieved in the elapsed times. They also illustrate that the most suitable load balancing strategy may vary with the type of application and with the number of available processors. Besides the support to the development of SPMD applications, the facilities offered by SAMBA in terms of load balancing play also an important role in terms of the development of efficient parallel implementations.

Introduction

Parallel algorithms are designed exploring either functional or data parallelism. Associated with MIMD (multiple instruction, multiple data) architectures, data parallelism originated the single program, multiple data (SPMD) programming model [36]: the same program is executed on different processors, over distinct data sets. Under this model, each task is characterized by the data over which the common code is executed. The SPMD programming model has been widely used in parallel programming. Coding and debugging is usually simpler under this model than in arbitrary MIMD programs. Moreover, data decomposition is a natural approach for the design of parallel algorithms for many problems [26].

The performance of SPMD programs is strongly affected by dynamic load imbalance factors, which may include the lack of information about the processing requirements of each task, the dynamic creation of new tasks, or the variation of processor load external to the application. The use of suitable strategies is essential in overcoming these imbalance factors. It is hard to determine the most appropriate load balancing technique for each application, partly because of the large variety of load balancing algorithms that has been proposed in the literature [1], [13], [16], [25], [40], [41]. Effective load balancing strategies are essential for overcoming dynamic imbalance factors.

The main contribution of this work is SAMBA (Single Application, Multiple Load Balancing), a framework which models the structure and the characteristics common to different SPMD applications and supports their development [31], [32], [33]. Special emphasis is given to the identification of appropriate load balancing strategies. The following tasks are made easier by this framework:

  • Coding new SPMD applications with load balancing: given the routines for task creation and execution, an SPMD application with a load balancing strategy is automatically generated. This allows the programmer to focus on the specific problem at hand, reducing the programming effort.

  • Identification of the most appropriate load balancing strategy for a specific application: the designer can easily generate different versions of the application for each of the load balancing strategies offered in SAMBA’s library. This allows different strategies to be tested and compared without additional programming cost.

  • Design and evaluation of new load balancing algorithms: SAMBA offers a set of functions used in many load balancing algorithms. Also, the strategies offered by the load balancing library can be used as the basis for the development of new algorithms.

We also discuss a set of classification criteria for load balancing algorithms designed for SPMD applications. These criteria provide a basic terminology for describing different algorithms and establish a background for their comparison and classification, helping the programmer to understand the differences between them. The design of the load balancing library offered by SAMBA was guided by these classification criteria. By implementing algorithms with different structures, we have been able to check that the framework effectively represents the functionality of a wide range of load balancing algorithms.

The effectiveness of SAMBA as a development tool offering load balancing strategies was assessed in the context of three parallel applications. The first application computes the multiplication of two square matrices. The second is the numerical integration of a function using a method of quadrature. The third one is a parallel genetic algorithm for the optimization of oil fields. These applications were chosen due to the different imbalance factors which affect each of them.

SAMBA was implemented in C using the MPI library [27]. Preliminary experiments with SAMBA were reported in [32] on three different environments: an IBM SP2 system, a heterogeneous network of Sun workstations, and a cluster of IBM PCs. The computational experiments described in this paper were carried out on a cluster of 32 IBM PCs.

This paper is organized as follows. Related work is presented in the next section. Classification criteria for load balancing algorithms are described in Section 3. The SAMBA framework is presented in Section 4. Its load balancing library is described in Section 5. The computational experiments performed to validate the framework are reported in Section 6. Concluding remarks are made in Section 7.

Section snippets

Related work

As a tool for developing SPMD applications with load balancing, the work described in this paper is related to conceptual and experimental studies of load balancing and to libraries and environments that support data-parallel programming.

A conceptual analysis of seven load balancing algorithms was presented in [14]. The goal of this analysis was to provide criteria for evaluating and comparing these algorithms. A cost and quality estimation model was derived for each algorithm. This analysis

Classification criteria

This section describes classification criteria for load balancing algorithms for SPMD applications. These criteria provide a terminology and background for describing and classifying existing load balancing algorithms, making their understanding easier.

A well established taxonomy for scheduling in distributed systems is described in [8]. However, it deals with the scheduling of jobs in distributed operating systems and with the scheduling of tasks in parallel applications based on functional

Framework

The code of an SPMD application can typically be structured into three major components: (a) the single code which is replicated for the execution of a task; (b) the load balancing strategy; and (c) a skeleton (which initializes and terminates the application, manages the tasks, and controls the execution of the other parts). The first component is specific to each application, but the other two usually are not. SPMD applications can thus be modeled by a framework [17], [34], [35], [37]. A

Load balancing within SAMBA

The design of the load balancing library offered by SAMBA was guided by the classification criteria described in Section 3. The currently implemented algorithms cover a broad range of classes, with a wide variety of characteristics. In this section, we describe seven of these algorithms. They are all isolated strategies, do not taking the external load into consideration. Two derived integrated algorithms are discussed later in Section 6. The implemented algorithms are the following:

  • 1.

    Static: A

Validation and experimental results

The computational experiments reported in this section have been carried out on a cluster of 32 IBM Pentium II-400 machines connected by a 10 Mbits IBM switch and running under Linux 2.0.36. All nodes have a local 6 Gbytes hard disk and 32 Mbytes of RAM, except one which has 64 Mbytes. We have used the Lam 6.3-b3 implementation of MPI [5]. The gcc version 2.7.2.3 of the C compiler was used in the implementation of SAMBA.

Three well known SPMD parallel applications were developed under SAMBA: (i)

Concluding remarks

The central contribution of this work is the SAMBA framework, which models the structure and characteristics common to different SPMD applications and supports their development. The following tasks are made easier by the features offered by this framework: (i) automatic generation of SPMD applications with different load balancing strategies from routines for task creation and execution, allowing the programmer to focus on the specific problem at hand and reducing the programming effort; (ii)

Acknowledgements

The work of A. Plastino was sponsored by FAPERJ research grant 171352/2000 and by CNPq under research grant 680123/01-6. Research of C.C. Ribeiro was sponsored by FAPERJ grant 150966/1999 and by CNPq grants 302281/85-1, 202005/89-5, and 910062/99-4. The work of N. Rodriguez was sponsored by CNPq under research grant 300803/93-1.

References (41)

  • A.C.B. de Andrade Filho, Optimizing hydrocarbon field development using a genetic algorithm based approach, Ph.D....
  • G. Booch

    Object-Oriented Analysis and Design with Applications

    (1994)
  • G. Booch et al.

    Unified Method

    (1996)
  • G. Burns, R. Daoud, Robust MPI message delivery through guaranteed resources, in: MPI Developers Conference, University...
  • M. Colajanni et al.

    DAME: an environment for preserving the efficiency of data-parallel computations on distributed systems

    IEEE Concurrency

    (1997)
  • T.L. Casavant et al.

    A taxonomy of scheduling in general-purpose distributed computing systems

    IEEE Transactions on Software Engineering

    (1988)
  • V.-D. Cung et al.

    Strategies for the parallel implementation of metaheuristics

  • T. Decker

    Virtual data space––a universal load balancing scheme

    Lecture Notes in Computer Science

    (1997)
  • D.L. Eager et al.

    Adaptive load sharing in homogeneous distributed systems

    IEEE Transactions on Software Engineering

    (1986)
  • I. Foster et al.

    The anatomy of the grid: enabling scalable virtual organizations

    International Journal of Supercomputer Applications

    (2001)
  • Cited by (10)

    • Colorectal tumour simulation using agent based modelling and high performance computing

      2017, Future Generation Computer Systems
      Citation Excerpt :

      an agent-based analogue of in vitro tumour growth was presented using in silico axioms whereby simulation results were in close agreement with experimental data. According to the execution of the tuning decisions, the load balancing strategies for HPC applications can be developed using centralised/hierarchical and decentralised approaches [12]. However, the centralised/hierarchical approaches report a high computational cost and scalability problems.

    • Graph-based automatic dynamic load balancing for HPC agent-based simulations

      2015, Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
    • Juggle: Proactive load balancing on multicore computers

      2011, Proceedings of the IEEE International Symposium on High Performance Distributed Computing
    View all citing articles on Scopus
    View full text