Foundations of Multithreaded, Parallel, and Distributed Programming

by Gregory R. Andrews

Book Cover

Currently this page contains only a few worked example programs written mostly to develop my programming skills. Here you will find programs written using both using PTHREADS and the MPI. Check back often for more examples since in the near future I will be aggressively working on developing my parallel programming ability. Note: These codes are for learning various API's and don't include all of the error checking that would be included in production code.

Code For Various Problems:
    Chapter 1 Chapter 11
    • Problem 11.7 (The Gravitational N-Body Problem)
      • Part (a) (the 2-d problem):
        • An O(N^2) serial version: sequential.c
        • A shared-variable version (using PTHREADS):
        • A manager/worker version (using MPI):
        • A heartbeat version
        • A pipeline version
        • A Makefile for everything
        • A MATLAB visualization script: plotNBody.m
      • Part (b) (performance characterizations):
      • Part (c) (extensions to the full 3-d problem):
    • Problem 11.8 (The Barnes-Hut algorithm for the Gravitational N-Body Problem)

John Weatherwax
Last modified: Sat May 20 12:30:30 EDT 2006