Parallel Scientific Computing in C++ and MPI
Chapter 2 Overview



Book Chapter Introduction

    In this chapter we introduce the main themes that we will cover in this book and provide an introduction for each of them.  We begin with a brief overview of C++ and define the two basic concepts of functions and classes as well as other syntactic elements of the language.  We then introduce basic mathematical concepts that include elements of linear algebra, vector orthogonalization, and corresponding codes and software.  Finally, we introduce parallel programming and review some generic parallel architectures as well as standard parallel algorithms for basic operations, e.g., the fan-in algorithm for recursive doubling.  We also provide a brief overview of the main MPI commands.

SCchapter2 Introduction and Chapter 2 Driver Programs

    Within the text, there are several places where the software suite is referenced.  In some cases the code is explicitly placed within the text, and at other times within the text we merely alert you that the software is available on this CD.  As you read through Chapter 2, you will find that the following function/classes were discussed.


    The declarations and definitions of these functions/classes can be found in the following files:

Go to the file SCchapter2.h for function/class declarations
Go to the file SCchapter2.cpp for function/class definitions
    In the case that an entire program (meaning that a main() function is provided) is presented in the text, we classify this as a driver program.  Unlike the functions/classes above, driver programs are complete C++ programs which can be compiled and executed.  As you read through the book, you will see that driver programs are often times created by using functions/classes which are in the SCchapter files.  We denote driver programs which are explicitly given in the text of the book in red.  In some chapters, we present very few driver programs explicitly in the text, however we provide some example driver programs which demonstrate how to use the functions/classes with in SCchapter files.  Such driver programs are denoted in black.

 
Section 2.1: The simplest C++ code chapter2c0.cpp
Section 2.1.1: First non-trivial C++ program ("Hello World'') chapter2c1.cpp
Section 2.1.1: Using functions in C++ chapter2c2.cpp
Section 2.1.2: Examination of the boolean expression `<' chapter2c3.cpp
Section 2.1.2: Examination of the boolean expression `&&' chapter2c4.cpp
Section 2.1.2: Algorithm Collatz-A chapter2c5.cpp
Section 2.1.2: Algorithm Collatz-B chapter2c6.cpp
Section 2.2.2: Program to determine machine precision chapter2c7.cpp
Section 2.3.4: MPI - "HELLO!!'' program chapter2c8P.cpp
Section 2.3.4: MPI - Modified ``Hello world'' type program chapter2c9P.cpp
Section 2.3.4: Serial Summation chapter2c10.cpp
Section 2.3.4: MPI - Parallel Summation chapter2c11P.cpp