Shodor

a national resource for computational science education

HOME UPEP Shodor Blue Waters

Parallel Area Under a Curve Exercises

By Tiago Damasceno and Samuel Leeman-Munk
Shodor, Durham, NC

The materials linked below comprise a set of student exercises on parallelizing a serial code using Shared memory and Distributed memory parallelism. The example problem for this exercise is a Riemann Sum calculation of the area under a curve.

  • Area Under a Curve Module - A PDF document providing background on the problem, insructions for the activities, and rubrics for assessment of student work.
  • Area-Serial - Serial version of the Riemann sum calculator.
  • Area-OMP - Shared memory version of the Riemann sum calculator.
  • Area-MPI - Distributed memory version of the Riemann sum calculator.

Resources:

serial_simple_integration.c : Program that serially finds the area under a curve.

serial_integration.c : Program that serially finds the area under a curve.

omp_simple_integration.c : Program that finds the area under a curve using OpenMP.

mpi_simple_integration.c : Program that finds the area under a curve using MPI.

AUC Module.pdf : A PDF file providing background on Riemann Sum, instructions for student activities, and rubrics for assessment of student work.

Makefile : Makefile for building code