OpenMP for dependent variables
问题 This is the first time I am using OpenMP, and I apply it for Fortran. I happened to have a problem adjusting the loop where there is a variable that requires update from its previous value. I tried using PRIVATE clause but the result is far from those resulted by serial computation (without OpenMP). I looked somewhere in OpenMP website and I found one solution using !$OMP PARALLEL DO ORDERED which finally works (produce the same result with the serial one). But it seems that by using this,