Sequential Equivalence isn’t a Silver Bullet
This program follows the weak PSE rules, but its still wrong.
In this example, RAND() may not be thread safe. Even if it is, the pseudo-random sequences might overlap thereby throwing off the basic statistics.
C$OMP& PRIVATE(I, ID, TMP, RVAL)
ID = OMP_GET_THREAD_NUM()
N = OMP_GET_NUM_THREADS()
TMP =RAND_ALG_KERNEL(RVAL)