title: Parallelizing a data dependence loop with OpenMP
body: <p>I have to parallelize the following code, the data dependence is i -> i-3</p>
  
  <pre><code> for(i=3; i&lt;N2; i++)
          for(j=0; j&lt;N3; j++)
          {
            D[i][j] = D[i-3][j] / 3.0 + x + E[i];
            if (D[i][j] &lt; 6.5) bat = bat + D[i][j]/100.0;
         }
  </code></pre>
  
  <p>I tried with <code>#pragma omp parallel for reduction(+:bat) private(i,j) shared(D,x,E)</code> and similar things but it wasn't correct</p>