[Omp] Subroutines inside parallel block
Patricia Bittencourt Sampaio
patricourt at yahoo.com.br
Tue Apr 12 16:13:01 PDT 2005
Hello,
I'm trying to parallelize a block of code where a
call to a subroutine appears inside of it. However I
wonder what really happens when there is a dynamic
extension (a subroutine inside a parallel region). I
don't know if the subroutine is executed in parallel.
And , if does so, wich threads participate on the
execution of it? Perhaps as soon as entering at the
subroutine, another group of threads is created.
Assuming the particular case where I have
something of this kind:
#pragma omp for
for (i=0; i<n; i++)
{
sort();
}
In this case, when each thread (let's to say 5
in total) invoque the sort routine, it's create
anouther group of threads so as to execute sort for
each one?
I appreciate your help,
Patricia B. Sampaio
------------------------------------
Federal University of Rio de Janeiro
Yahoo! Acesso Grátis - Internet rápida e grátis.
Instale o discador agora! http://br.acesso.yahoo.com/
More information about the Omp
mailing list