I know there is same question, what I want to know is If I use "#pragma omp parallel for" inside a loop, does the program make threads every iteration? Or makes them once and reuses them?
for(i=1;i<ni;i++)
{
#pragma omp parallel for
for(j=1;j<nj;j++)
{
some codes.....
}
and some codes ....(with loop)
}
If this code makes threads every iteration, how can I optimize?
(EDITTED) actually, my code is not perfectly nested loop, and can not be modified nested loop.