I have two threads with a parallel for but this one does not break up into threads:
#pragma omp parallel sections
{
#pragma omp section
{
for(int i=0;i<4;++i)
printf("Loop A %d %d\n", omp_get_thread_num(),2);
}
#pragma omp section
{
for(int i=0;i<4;++i)
printf("Loop B %d %d\n", omp_get_thread_num(),3);
}
}
Output:
Running…
Loop A 0 2
Loop A 0 2
Loop A 0 2
Loop A 0 2
Loop B 0 3
Loop B 0 3
Loop B 0 3
Loop B 0 3