Part Number: TMDSEVM6678
Tool/software: TI C/C++ Compiler
Dear All,
I created a default RTSC project with OpenMP support. I was able to get the "omp parallel" and "omp parallel for" constructs to work and got expected outputs.
However, when I tried to use the "omp parallel sections" construct, the compiler crashed. The code:
#include <omp.h>
#include <stdio.h>
void ompTask()
{
int tid = omp_get_thread_num();
printf("Task-%d", tid);
}
int main (int argc, char *argv[])
{
omp_set_num_threads(4);
#pragma omp parallel
#pragma omp sections
{
#pragma omp section
ompTask();
#pragma omp section
ompTask();
#pragma omp section
ompTask();
#pragma omp section
ompTask();
}
return 0;
}
Error Dialog Box Message: "TMS320C6x C/C++ Parser v8.2.2 has stopped working"
I have already tried
a. removing the first "#pragma omp section"
b. replacing the "#pragma omp parallel" and "#pragma omp sections" with "#pragma omp parallel sections" which gives "error #1510 : Syntax Error in OpenMP pragma"
c. removing "#pragma omp parallel" altogether.
Please suggest
Regards
Harash