CS475 Lab 1: Parallel Performance of Mandelbrot
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.
1. Retrieve source code and verify that you can compile, run, and control the number of threads.
A quick note for Mac users: OpenMP
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!
- Log into one of the capital machines.
- Choose a machine from the list of capital machines:( machines list ).
- Secure shell (ssh) into a capital machine (e.g. ssh yourname@denver.cs.colostate.edu).
- Check to see how busy the machine is. You want to run on a quiet machine.
These machines have one CPU with eight hyperthreaded cores.
Use "who" to find out whether there are other users, or "top" to find out
what the processor is doing.
-
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.
- Compile (using the makefile) and run
mandSEQ 1000
mandOMP 1000
- Vary the number of threads being used: for p = 1, 2, 3, 4, 5, 6, 7, and 8.
csh: setenv OMP_NUM_THREADS p
bash: export OMP_NUM_THREADS=p
2. Collect Parallel Performance Data
- Run each case 5 times.
- Record execution itmes in a file: "resultsMachinename.txt"
- Analyze your data and prepare for discussion:
- Contrast the execution times for mandSEQ and mandOMP for OMP_NUM_THREADS=1.
Write down an explaination of what you see and why you think it is happening.
- Make observations about the collected data including:
How many decimal digits are significant?
How variable are the execution times?
- Summarize your data using the median.
- Build a table with a row for each p containing the speedups you see for p=1, 2, ... , 8?
- (median) time in seconds in significant decimal digits
- speedup
- efficiency
-
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.