I am writting a Monte Carlo code to simulate particle collisions,
and I use my own random number genertoion subroutine in my code.
Before I parallelize the code, the simulation result can be exactly reproduced if i use the same seed number.
(all the numerical results are exactly the same).
If I compile the code with a flag (-openmp), the numerical results are changed even if I do nothing to the code.
Does anyone know how it happens and how can I avoid this problem?