@@ -154,7 +154,7 @@ Here we are going to implement a second and a third parallel version of the [pi.
### Tasks and questions to be addressed
1) Create two new parallel versions of the [pi.c](pi.c) / [pi.f90](pi.f90) program using the parallel construct ``#pragma omp parallel`` and a) ``#pragma omp critical`` b) ``#pragma omp atomic``.
2) Run the two new parallel codes and take the execution time with 1, 2, 4, 8, 16, 32 threads. Record the timing in a table.
2) Run the two new parallel codes and take the execution time with 1, 2, 4, 8, 16 threads. Record the timing in a table.
3) What would happen if you hadn’t used critical or atomic a shared variable?
4) How does the execution time change varying the number of threads? Is it what you expected?
5) Do the two versions of the code differ in performance? If so, what do you think is the reason?