This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OpenMP barrier hangs when number loop-iterations < core-count

Hi,

Using CGT-7.4.1 and OpenMP-1.1.2.06, I experience problems with openmp barriers when the number of loop iterations is lower then the core-count:

#include <ti/omp/omp.h>
#include <stdio.h>

void main()
{
    int i;

    #pragma omp parallel for
    for (i=0; i < 6; i++)     //8 iterations work
    {
        printf("Hello before barrier \n");
        #pragma omp barrier
        printf("Hello after barrier \n");
    }
}

The following code hangs forever at the barrier (config taken from mathvec example, except OpenMP.setNumProcessors(8)), however when I increase loop iterations to 8 everything works as expected.
As I am very tight on schedule, I unfourtunately can not try the latest versions.

Regards, Clemens