icpc -v 10.0 MacOSX10.4
double *const opt = new double[...];
#pragma omp parallel shared(opt)
opt[threadSpecifcIndex] = value;
cout<< opt[threadSpecifcIndex] ;
Once one thread writes a value to an element of opt (threadSpecifcIndex is never the same for 2 different threads), is the same thread supposed to read that array element and find the same value it has written... There is no "flushing" required?
The behavior seems different depending on the optimization level. (no optim vs -O3)