In Lab 1 you probably did not get perfect speedup, not even linear speedup! Convince yourself that even though the outer loops of Mandelbrot are very nice and regular, the inner loop IS NOT! Study the mandelbrot image.
What if neither hint nor the use of scheduling strategy is specified? What will be a systematic way to analyze?
In the attached tar file Mand_Profiling, you have the following files.
$mandSEQ_prof 1000 Elapsed time: 6.258007 sec op_count_sequential=1404437847 $mandOMP_prof 1000 3 Elapsed time: 2.413585 sec op_count[0]=354968274 op_count[1]=699245587 op_count[2]=468106879 op_count_parallel=1404437847The third argument in the mandOMP_prof is the number of threads. You can specify it here instead of using "export OMP_NUM_THREADS". As you can see the op_count_sequential and op_count_parallel should be the same. But the op_count[i] varies for each thread. By this way, even if you cannot understand the code at first glace, you can systematically see how the parallelization is working and how the work/iterations are distribuited among the threads. You can play with the code and see how the count value varies with different scheduling strategies. This is not a part of your Lab exercise. This is an illustration to understand the code better.