When a thread in a parallel region encounters another parallel construct, it may create a new team of threads and become the master of the new team.
#pragma omp parallel num_threads(4) { /* .... */ #pragma omp parallel num_threads(2) { // } }