The idea is to use the pseudo random number generator in C to get random points inside a square of sides with length 2 units. We shall try to determine if a point is lying inside the circle that is inscribed inside it. If random numbers are well spread, then ratio of number of points inside the circle to the number of points inside the square should be equal to that their respective areas.
Apart from the usual stuffs, one thing to note is that the pseudo random number generator in C is not thread-safe. The seed gets locked and its state gets changed in usual rand() call. GCC kindly provides this thread-safe version of it (rand_r()). Otherwise, with multi-threading, run-time actually increases.
Another minor thing is that since the pseudo-random numbers generation is mostly similar time consuming, default OpenMP for option (static) is best fit.
You can find the code here. Please let me know your comments.