Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
4973 Discussions

Thread Checker for Windows gives "Out of Memory" Error.

jayaraghavendran
Beginner
648 Views
Hi,

I am using Intel VTunes Thread Checker for Windows (Version 3.1) Licensed.

When I run my exe after some time Thread Checker Pops up a message saying "Out of Memory" and the application terminates.

My Code runs without creating much trouble with all memory validation tools (IBM Rational Purify, Memory Validator etc).

When I execute normally all my test cases execute and pass without any trouble. But, when I run the same scenario with VTunes Thread Checker, Out of Memory error comes.

I have tried all the suggestions given in the help for reducing memory usage like Making memory guard padding to 0 and build my software with incremental:no option etc. But, nothing has helped so far.

I aminstrumenting my dll with all functions instrumentation.Again if I use API imports instrumentation, then everything works fine, but, I doubt if thread checker will be able to find any issues in that case.

One peculiar thing is that, in the Instrumented Application Status in the output window, it shows something like below:

Wed Apr 01 21:17:26 2009 [Intel Thread Checker Status: Memory 514.8 MB allocated, 2.13x increase, 30885 routines]

Lot of messages like the one above (each showing increasing memory)keeps coming before it shows "Out of Memory" pop up. I am unable to understand what it means by 30885 routines? This value of routines also initially less and then increases before it gives the pop up.

I have analysed my areas of code near which the "Out of Memory" pop up comes and there is no memory allocation happening there which can lead to increase in memory.

Any ideas as to what might exactly be causing the problem will be of great help.

Please let me know if any other information is required.

Thanks in Advance!

Regards,
Jay

0 Kudos
7 Replies
srimks
New Contributor II
648 Views
Hi,

I am using Intel VTunes Thread Checker for Windows (Version 3.1) Licensed.

When I run my exe after some time Thread Checker Pops up a message saying "Out of Memory" and the application terminates.

My Code runs without creating much trouble with all memory validation tools (IBM Rational Purify, Memory Validator etc).

When I execute normally all my test cases execute and pass without any trouble. But, when I run the same scenario with VTunes Thread Checker, Out of Memory error comes.

I have tried all the suggestions given in the help for reducing memory usage like Making memory guard padding to 0 and build my software with incremental:no option etc. But, nothing has helped so far.

I aminstrumenting my dll with all functions instrumentation.Again if I use API imports instrumentation, then everything works fine, but, I doubt if thread checker will be able to find any issues in that case.

One peculiar thing is that, in the Instrumented Application Status in the output window, it shows something like below:

Wed Apr 01 21:17:26 2009 [Intel Thread Checker Status: Memory 514.8 MB allocated, 2.13x increase, 30885 routines]

Lot of messages like the one above (each showing increasing memory)keeps coming before it shows "Out of Memory" pop up. I am unable to understand what it means by 30885 routines? This value of routines also initially less and then increases before it gives the pop up.

I have analysed my areas of code near which the "Out of Memory" pop up comes and there is no memory allocation happening there which can lead to increase in memory.

Any ideas as to what might exactly be causing the problem will be of great help.

Please let me know if any other information is required.

Thanks in Advance!

Regards,
Jay


I think you should check the 'heap-limit".

~BR
0 Kudos
TimP
Honored Contributor III
648 Views
For the case where C and C++ or Fortran source code is available (unfortunately, not a mixture of C and Fortran unless only one of those has threading), I've had better success with the tcheck compile option. The automatic binary instrumentation may encounter a problem such as described, when running a large application, particularly on 32-bit OS.
0 Kudos
jayaraghavendran
Beginner
648 Views
Quoting - srimks

I think you should check the 'heap-limit".

~BR

Thanks for the response.

Heap Limit is currently 1000 MB. But, I tried by changing it to minimum (200 MB) also with no success.

Can you let me know what should be most optimum value for the same?

Thanks!

Regards,
Jay
0 Kudos
jayaraghavendran
Beginner
648 Views
Quoting - tim18
For the case where C and C++ or Fortran source code is available (unfortunately, not a mixture of C and Fortran unless only one of those has threading), I've had better success with the tcheck compile option. The automatic binary instrumentation may encounter a problem such as described, when running a large application, particularly on 32-bit OS.

Hi,

Thanks for the response.

My code is a mixture of C & C++. I didn't particularly understand the 'tcheck' compile option.

I am compiling my DLL and the test exe using MSVC6. Is this option available in MSVC6?

My OS is Windows XP (32 bit only).

Thanks!

Regards,
Jay


0 Kudos
Thomas_W_Intel
Employee
648 Views
Quoting - tim18
For the case where C and C++ or Fortran source code is available (unfortunately, not a mixture of C and Fortran unless only one of those has threading), I've had better success with the tcheck compile option. The automatic binary instrumentation may encounter a problem such as described, when running a large application, particularly on 32-bit OS.

My code is a mixture of C & C++. I didn't particularly understand the 'tcheck' compile option.

I am compiling my DLL and the test exe using MSVC6. Is this option available in MSVC6?


The "tcheck" option is available for the Intel compiler if you have Thread Checker installed on your system.

Thread Checker has to do much more book keeping to keep the necessary information for detecting race conditions. Unless you want to disable the check for race conditions, you need to further downsize your workload. Remember that it is sufficient to hit an issue once for detection. Data sets with thousands of entries are usually a waste of time and memory for Thread Checker.

Kind regards
Thomas
0 Kudos
stanleyh
Beginner
648 Views

The "tcheck" option is available for the Intel compiler if you have Thread Checker installed on your system.

Thread Checker has to do much more book keeping to keep the necessary information for detecting race conditions. Unless you want to disable the check for race conditions, you need to further downsize your workload. Remember that it is sufficient to hit an issue once for detection. Data sets with thousands of entries are usually a waste of time and memory for Thread Checker.

Kind regards
Thomas

Will there be a problem because of mixing of C & C++ codes?

I have an older version of the same library which seems to run fine. Also if I build only the C files into a library and use, then it becomes slow, but it doesn't give an out of memory error.

Here one more thing, after a few operations, the memory usage as shown by the output windows starts increasing in a spurt continously leading to out of memory which is very strange.

Regards,
Jay
0 Kudos
TimP
Honored Contributor III
648 Views
Mixing C and C++ isn't necessarily a problem. It's certainly possible, with the complications of C++, the job of thread checker becomes more difficult.
Thread checking is slow running, for sure. It basically emulates your parallel regions, one instruction at a time, comparing result with 1 thread with expected multi-threaded result. You should make your test cases as short as is possible while executing all the phases. If you use it in the compile mode with Intel compiler, it sets /Od, but still takes longer to run than plain /Od with no parallel regions.
0 Kudos
Reply