Hi,
When running the following code on my EVM6678 using the "new" OMP-Runtime and the 7.4.1 cgt, I get the following output:
#pragma omp threadprivate(esvPrfLastStop)
static long long esvPrfLastStop = 0;
void main()
{
int i;
#pragma omp parallel for
for(i=0; i < 2; i++) {
printf("Value is: %lld, address: %x \n", esvPrfLastStop, &esvPrfLastStop);
}
}
[C66xx_0] Value is: 2, address: 82000248
[C66xx_1] Value is: 2, address: 82000248
It seems the final openmp runtime + cgt-7.4 ignore the threadprivate pragma and locate the variable in shared DDR3 memory using the vm6678_ddr platform.
When, however using cgt-7.4.0B2 and the beta-openmp runtime, I get the threadprivate variable located in L2SRAM as expected:
[C66xx_0] Value is: 3546716855134859842, address: 82bc48
[C66xx_1] Value is: 3546716855134859842, address: 82bc48
I've uploaded a self-containing testcase here: 1325.ThreadprivateTest.zip
Is this a problem with my setup, or a bug in the OMP runtime?
Thanks, Clemens