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.
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
Just verified, still happens with OpenMP-1.1.3.02 and CGT-7.4.0.
Support Staff, please forward this bug to the developer teams.
Thanks, Clemens
Hi Ajay,
Thanks for taking a look. Actually I think it might be my fault as it seems it is not allowed to use a barrier inside a parallel for loop - GCC complaines when compiling that loop.
Regards, Clemens