Parallel Computing

Assignments

Assignment 1 (Due date: 10/12/2018)
Matrix product source code
Assignment 2 (Due date: 17/12/2018)
Sieve sequential base code

Lectures

Introduction (8/11/2018 14h-16h) pdf
Cache Memory pdf
Introduction to Parallel Computing pdf
Shared Memory programming pdf
The Sieve of Eratosthenes pdf

PAPI

PAPI Download
Installation:
Uncompress to a directory and change to "src" directory
./configure
make
sudo make install
sudo ldconfig

Compiling tests code:
make test
cd ctests
./zero. (run tests)

To use PAPI:
g++ -O2 file.cpp -o fileout -lpapi

Installing papi-tools: sudo apt-get install papi-tools
Check available counters: papi_avail -a

Lab work: computing PI

Download the file in the link below and:
1 - Change the program according to the solutions presented and measure their performance from n=10^5 to 10^9;
2 - Why the precision of PI does not reduce consistently? (use a single thread);
3 - Propose and implement a solution to increase precision.
Shared memory version of PI



OpenMP

OpenMP Summary
Number of threads
Nested parallel
Nested parallel mod
Dynamic scheduling (loop.cpp).
Pipeline 1
Pipeline 2
Example code for nested parallelism