openmp sections running sequentially

Posted by chi42 on Stack Overflow See other posts from Stack Overflow or by chi42
Published on 2010-06-01T21:44:05Z Indexed on 2010/06/02 5:23 UTC
Read the original article Hit count: 199

Filed under:
|
|

I have the following code:

#pragma omp parallel sections private(x,y,cpsrcptr) firstprivate(srcptr) lastprivate(srcptr)
{
    #pragma omp section
    {
       //stuff
    }
    #pragma omp section
    {
       //stuff
    }
}

According to the Zoom profiler, two threads are created, one thread executes both the sections, and the other thread simply blocks!

Has anyone encountered anything like this before? (And yes, I do have a dual core machine).

© Stack Overflow or respective owner

Related posts about c

    Related posts about parallel