It runs fine but the ThreadChecker would report that there's a Read Write race condition on PrimeCount++;
FYI, I compiled this using Visual Studio 2005 Professional Edition on the machine with the specs:
OS : Windows XP Professional SP 2 Pentium 4 HT 3.60 GHz 1 GHz RAM
Pls feedback whether this is an issue with the tool or something else. This could be a major problem for me in the future because I may need to develop a complex multithreaded app using OpenMP (due to porting issues).