title: OpenMP not supporting break in loop
body: <p>I am optimizing some code with OpenMP. If <code>NO_VALUE</code> is met in a loop, I would like it to break. However, compiler tells me this is not allowed with openMP. How could I handle this? </p>
  
  <pre><code>#pragma omp parallel
  {
       #pragma omp for  reduction(+:functionEvaluation)   schedule(dynamic)   nowait
       for (int j=m_colStart;j&lt;m_colEnd+1;j++)
            {
                 double d = command_-&gt;execute().toDouble();
                 if(d==NO_VALUE)
                 {
                      functionEvaluation  = NO_VALUE;
                                                     break;
                  }
                  else
                  {
                      functionEvaluation += d;
                  }
                  delete command_;
              }
   }
  </code></pre>
  
  <p>How could I work around? thanks!</p>