<html><body>
<p><font size="2" color="#333333" face="Helvetica">There are three kmpc querries (kmpc_bound_thread_num, kmpc_bound_num_threads, and kmpc_in_parallel) that refer to the innermost active parallel construct.</font><br>
<br>
<font size="2" color="#333333" face="Helvetica">I just want to make sure that "active" is really ment as defined in the OMP specs.</font><br>
<br>
<font size="2" color="#333333" face="Helvetica">For example, the traditional omp_get_num_threads gets the number of threads in the current region. But the kmpt_bound_num_threads request this info in the innermost active parallel construct.</font><br>
<font size="2" color="#333333" face="Helvetica">They differ in this context:</font><br>
<font size="2" color="#333333" face="Helvetica">#pragma omp parallel num_thread(4) if(1)<br>
{<br>
// code A<br>
#pramga omp parallel num_thread(1)<br>
{<br>
// code B<br>
}<br>
}</font><br>
<br>
<font size="2" color="#333333" face="Helvetica">In Code A... both calls return the same number 4 as the parallel region is active (i.e. more than one thread).</font><br>
<font size="2" color="#333333" face="Helvetica">In Code B, however, the innermost parallel region is not active. So the omp calls return 1, and the kmpc calls return 4 (as the outer parallel region is the innermost active region).</font><br>
<font size="2" color="#333333" face="Helvetica">Is this understanding correct? If so, what is the default answer when there are no active parallel region?</font><br>
<br>
<font size="2" color="#333333" face="Helvetica">Thanks</font><br>
<br>
<font size="2" color="#333333" face="Helvetica">Alexandre</font><br>
<br>
</body></html>