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!
  1. Log into one of the capital machines.
    1. Choose a machine from the list of capital machines:( machines list ).
    2. Secure shell (ssh) into a capital machine (e.g. ssh yourname@denver.cs.colostate.edu).
    3. 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.
  2. Download and untar the provided mand.tar file.
  3. 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.
  4. Compile (using the makefile) and run
    mandSEQ 1000
    mandOMP 1000
  5. 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

  1. Run each case 5 times.
  2. Record execution itmes in a file: "resultsMachinename.txt"
  3. Analyze your data and prepare for discussion:
    1. 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.
    2. Make observations about the collected data including:
      How many decimal digits are significant?
      How variable are the execution times?
    3. Summarize your data using the median.
    4. Build a table with a row for each p containing the speedups you see for p=1, 2, ... , 8?
    5. 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.