<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Then, where does the overhead come from ? --<br>
The call to    omp_set_dynamic(dynamic);<br>
Or the<br>
<div class="im">#pragma omp parallel for private(j, i,ax,ay, dif_x, dif_y)<br>
</div></blockquote></div><br>It may be this. You initialize a thread pool, even if it has only one thread, and there is the dynamic part, so OpenMP may create several chunks instead of one big chunk.<br><br>Matthieu<br>-- <br>
Information System Engineer, Ph.D.<br>Blog: <a href="http://matt.eifelle.com" target="_blank">http://matt.eifelle.com</a><br>LinkedIn: <a href="http://www.linkedin.com/in/matthieubrucher" target="_blank">http://www.linkedin.com/in/matthieubrucher</a><br>