[Omp] nested parallel region
DING, Yang
dingyang at gmail.com
Sun Jul 1 13:29:50 PDT 2007
Dear all,
I am trying to use nested parallel regions with OpenMP but the new
program cannot pass the compilation. Basically, what I want to do is
as following:
#pragma omp sections
{
#pragma omp section
xxxx (serial code here)
#pragma omp section
#pragma omp for
for ()
{
...
}
}
However, the compilation is not successful because "pragma for is not
allowed to be nested inside of sections".
Is there any other way to try? I am thinking to use pthread_create
directly instead of parallel sections, for example,
pthread_create(xxxx,...);
#pragma omp for
for ()
{
...
}
Will this create any new problems? Or are there better ways to do
this? Thank you for your attention and I appreciate any suggestion.
Many thanks,
Yang
More information about the Omp
mailing list