Hi all,
I was not able to access the example working code for pi in ptfs100h (I always get a permission denied error), so I made my own version of the code where x is not privatized in the kernel (see below). I ran this as described in the exercise and got results that were completely consistent across all experiments. Even worse, when I "correct" the code by adding private(x) onto the end of the omp pragma, the performance doesn't change. This was the case for the scalar and AVX optimized compiler options. Can anyone explain what I am missing? Also, just for clarity, this code still returns the correct value of pi up to a precision of about 10 digits.