|
From: Umut T. <umu...@gm...> - 2012-08-16 22:50:50
|
Dear all, I was trying to verify if there were memory leaks with my code until the point I could come, however at this point, I have a strange problem that valgrind on some problems hangs at start up. Briefly on what I am doing: I am trying to read some numeric values from a file and set some arrays dynamically in my program, mathematically these numerical values are the values of a matrix. For this step I am using a C++ matrix library to set the matrix which is MTL4 in this case. Running valgrind with relatively small input files goes smoothly and I can only see that I only have some still reachable errors. No loss reports, however if I increase the files sizes and try to use the same code with valgrind with a different input file, valgrind hangs on these large files. I have found out a similar thread for this hanging problem, namely, http://www.mail-archive.com/val...@li.../msg01743.html I could not make it work with the default tool 'memcheck' on large problems, however if I use 'cachegrind' it works and outputs the results smoothly. Any pointers on this topic are appreciated highly. System : ubuntu 11.10, version of valgrind 3.6.1 and also tried 3.8.0, it also has the same problem. Best regards, Umut |
|
From: John R. <jr...@bi...> - 2012-08-16 23:17:05
|
> Running valgrind with relatively small input files goes smoothly and I > can only see that I only have some still reachable errors. No loss > reports, however if I increase the files sizes and try to use the same > code with valgrind with a different input file, valgrind hangs on these > large files. [snip] > System : ubuntu 11.10, version of valgrind 3.6.1 and also tried 3.8.0, > it also has the same problem. Thank you for that version information. What hardware architecture is the computer, how much RAM does it have, and how much address space does your program use without valgrind? How big is a "large file"? What is the output from the command: $ sed /SwapFree/q </proc/meminfo -- |
|
From: Milian W. <ma...@mi...> - 2012-08-16 23:50:29
Attachments:
signature.asc
|
On Friday 17 August 2012 00:50:40 Umut Tabak wrote: > Dear all, > > I was trying to verify if there were memory leaks with my code until the > point I could come, however at this point, I have a strange problem that > valgrind on some problems hangs at start up. > > Briefly on what I am doing: I am trying to read some numeric values from > a file and set some arrays dynamically in my program, mathematically > these numerical values are the values of a matrix. For this step I am > using a C++ matrix library to set the matrix which is MTL4 in this case. > > Running valgrind with relatively small input files goes smoothly and I > can only see that I only have some still reachable errors. No loss > reports, however if I increase the files sizes and try to use the same > code with valgrind with a different input file, valgrind hangs on these > large files. > > I have found out a similar thread for this hanging problem, namely, > > http://www.mail-archive.com/val...@li.../msg017 > 43.html > > > I could not make it work with the default tool 'memcheck' on large > problems, however if I use 'cachegrind' it works and outputs the results > smoothly. > > Any pointers on this topic are appreciated highly. Are you sure they really "hang"? Remember that valgrind can easily slow down your app by a factor of 20-100. Suddenly your app doesn't run 1min but 1h36min... /me who tried to valgrind a scientific app which did a matrix diagonalizations for 1h (without valgrind) Generally, do you have serious reasons to doubt that your app will work the same, no matter the size of the input? Otherwise your app might be just fine, if it works for smaller input sizes. -- Milian Wolff ma...@mi... http://milianw.de |