This repository contains solutions to some of the programming exercises found in the textbook Parallel Programming in C with MPI and OpenMP by Michael Quinn.
The following programs are included in the repository.
-
Motivations and History
-
Parallel Architectures
-
Parallel Algorithm Design
-
Message-Passing Progamming
-
exer04_06.c
: hello, world program -
exer04_07.c
: compute the sum1 + 2 + ... + p
-
exer04_08.c
: find the number of times that two consecutive odd numbers are both prime in the set of integers from2
ton
-
exer04_09.c
: find the largest gap between prime numbers in the set of integers from2
ton
-
exer04_10.c
: number of 6-digit ID combinations subject to some restrictions -
exer04_11.c
: calculate an integral using the rectangle method -
exer04_12.c
: calculate an integral using Simpson's rule
-
-
The Sieve of Eratosthenes
-
sieve_quinn
: Quinn's version of the Sieve of Eratosthenes -
exer05_06.c
: Modify Sieve algorithm so as to not set aside memory for even numbers -
exer05_07.c
: Modify Sieve algorithm so that each process finds prime numbers between2
andfloor( sqrt(n) )
, rather than waiting for a broadcast from the0
-th process -
exer05_08.c
: Modify Sieve algorithm to improve the cache hit rate by decomposing the section of numbers each process is responsible for into further sub-blocks -
exer05_09.c
: Functional decomposition of Sieve algorithm -
exer05_11.c
: Compute1/1 + 1/2 + ... + 1/n
for some choice ofn
-