Due : Tuesday October 13, 2015
Extended Due Date : Tuesday October 20, 2015
Assignment:
Parallelize the program using OpenMP. To do this compile with
gcc -fopenmp mm.c -lgomp -o mmWhen compiling and running you must NOT use gollum itself but one of the nodes node1 to node8. Present the results as a table of run time and spedup (wrt OpenMP on 1 thread). Speedup is defined as T1/Tp where T1 is the time on 1 thread and Tp is the time on p threads. Comment on the results.
The preferred way to time the codes is to use omp_set_num_threads(number) to set the threads and omp_get_wtime() to time the relevant part e.g.
omp_set_num_threads(s); start = omp_get_wtime(); #pragma omp parallel ... PUT PARALLEL CODE HERE end = omp_get_wtime(); printf("time=:%.16g number of threads: %d\n",end - start, s);
Note that to implement this program you will need to increase the default stack size for both the original thread and the OMP threads. If you do not you will get a segmentation error. To do this you need to execute shell commands similar to:
ulimit -s unlimited export OMP_STACKSIZE=16M
This assignment is an individual assignment, to be done on your own without help from other students in the class. However, you may use any materials from any written resource, including web resources.
Instructions for submitting the homework using svn are contained in this file.