This lab session is intended to show you how run an OMP code and to analyze and graph the speedup of parallel code. We will be using Mandelbrot code, which produces a fractal.
Download and untar the provided mand.tar file. Study the makefile and the mandelbrot.c code. Study the way it times the program. This is an OMP program; study the parallelized for loop.
If you want work on a Mac at home, you need a version of gcc compiled with openMP support: You can go to hpc.sourceforge.net and download gcc 4.7 4.8 4.9 depending on your OS version. You will have to extract the archive and update the PATH variable to include the new gcc.
You still have to report the results for a capital machine from the cs department.
Find a list of the capital machines ( machines list ). Secure shell (ssh) into a capital machine (e.g. ssh firstname.lastname@example.org). These machines have one CPU with eight hyperthreaded cores. Find a quiet machine; use "who" to find out whether there are other users, or "top" to find out what the processor is doing.
Compile (using the makefile) and run
for p = 1, 2, 3, 4, 5, 6, 7, and 8 threads, using
if you are using csh
setenv OMP_NUM_THREADS p
if you are using bash
Run each case five times. Put all your raw performance data in a "resultsMachinename.txt" file.
What do you observe about the performance of mandSEQ and mandOMP for OMP_NUM_THREADS 1? What does this mean?
What do you observe about the timing data, i.e. which decimal digits are significant? Summarize your data using the median of your five experiments, using only rounded significant decimal digits.
What speedups do you see for p=1, 2, ... , 8? Build a table with a row for each p containing
Plot the number of threads, time, speedup and efficiency. You can use any plotting tool, or plot by hand. What do you observe? Can you explain your observations?
In discussion 1 you will report your results and discuss your observations with your group.