title: openMP generate different random numbers with the same seed
body: <p>I am new to openMP, in my program complex simulations are needed, to repeat the result, the seed is set for each simulation, however, when implementing openMP, different results are produced for each time I run it. so I write a simple example to check the problem as follows,
  I also generated different result each time:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;omp.h&gt;
  using namespace std;
  
  
  int main () {
  
  double A[10];
  
  #pragma omp parallel for
  for( int i=0;i&lt;10;i++){
      srand(i+1);
      int m = rand()%100;
      A[i] = m;
  }
  
  cout&lt;&lt;"A= \n";
  
  for(int i=0;i&lt;10;i++){
      cout&lt;&lt;i&lt;&lt;" "&lt;&lt;A[i]&lt;&lt;" \n";
  }
     return 0;
  }
  </code></pre>
  
  <p>I run it twice, the results are:
  A= 
  0 86 
  1 25 
  2 78 
  3 1 
  4 46 
  5 95 
  6 77 
  7 83 
  8 15 
  9 8 </p>
  
  <p>and 
  A= 
  0 15 
  1 41 
  2 65 
  3 1 
  4 75 
  5 85 
  6 95 
  7 83 
  8 74 
  9 8 </p>
  
  <p>Thank you very much!</p>