Module Goal

This module, Numerical Quadrature, is designed to be an introduction to parallel computing for students in CS2, with C++ as the programming language, who have taken or are taking Calculus II. This module contains an introduction to MPI.

Upon completion of this module the student should:

  1. understand a parallel computing paradigm based on intuitive ideas,
  2. realize that parallel computing is available now on most computers in some form,
  3. comprehend a simple parallel program written in MPI,
  4. measurably see the advantage offered by parallel computing, and
  5. glimpse some of the challenges presented by parallel computing.

Numerical quadrature

The background required for this module includes basic c++ programming, and introductory integral calculus including Riemann sums. The first section of this module quickly develops the mathematical ideas from an intuitive point of view. From this development a simple algorithm, expressed as a finite sum of trapezoids is given. In the second section, a simple sequential c++ implementation is presented and analyzed. In the third section, a parallel implementation, based on distributed computing, is developed using the MPI (message passing interface) paradigm and library. The distributed computing concepts will be developed and the corresponding MPI functionality will be presented.

Three c++ programming examples are presented in this module, and can be downloaded from here. The first is a (sequential) c++ program that should compile and run using any c++ compiler. The second is a c++ program containing MPI function calls. It is necessary to have the MPI libraries installed to compile this program. In order to run this program it is necessary to use mpirun. The third is a c++ based CUDA program.

For information on downloads and installation of all MPI related software, please visit the openMPI site.

Indices and tables

Table Of Contents

Next topic

Evaluating a definite integral

This Page