- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I've just installed the Intel ThreadChecker and was trying out the Samples program Primes.exe that's bundled together with the tool.
However, I found some problems using the ThreadChecker with OpenMP
(#pragma omp critical) directive. Not sure there are other issues as well.
Anyway, the following code snippet from the samples folder works fine in both the actual executable and Thread Checker i.e. no race conditions detected during execution as well in Thread Checker
EnterCriticalSection( &Primes_CS );
Primes[ PrimeCount ] = number;
PrimeCount++;
LeaveCriticalSection( &Primes_CS );
But using the OpenMP directive version
#pragma omp critical
{
Primes[ PrimeCount ] = number;
PrimeCount++;
}
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).
Thanks.
I've just installed the Intel ThreadChecker and was trying out the Samples program Primes.exe that's bundled together with the tool.
However, I found some problems using the ThreadChecker with OpenMP
(#pragma omp critical) directive. Not sure there are other issues as well.
Anyway, the following code snippet from the samples folder works fine in both the actual executable and Thread Checker i.e. no race conditions detected during execution as well in Thread Checker
EnterCriticalSection( &Primes_CS );
Primes[ PrimeCount ] = number;
PrimeCount++;
LeaveCriticalSection( &Primes_CS );
But using the OpenMP directive version
#pragma omp critical
{
Primes[ PrimeCount ] = number;
PrimeCount++;
}
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).
Thanks.
Link Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page