In this lab we'll add timing code to the Mandelbrot Set generator program
goatbrot.c and time with various numbers of threads.
Grab the files from the directory Beej's goatbrot program. Build the program by running
make. To get an idea of what the program does, run with this command line:
./goatbrot -i 8000 -o out.ppm
This says to generate the Mandelbrot Set with 8000 iterations (which is our problem size) and output the result to
out.ppm, which you can view in by double-clicking the file in File Viewer.
Modify the makefile to enable OpenMP. Add timing code around the call to
mandelbrot and rebuild the program by running
-t flag to vary the number of threads (the default is 8). Use
-t 1 to get the serial program time, as in:
./goatbrot -i 8000 -o out.ppm -t 1
As always, record the average of at least 3 runs.
When finished with the graph, look at the README.TXT file and try several different combinations of the -e and -m flags to get different funky images. Drop your favorite on your website. Hmmm…does Jupyter allow you to paste in a graphics file?