[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: finding the memory used by programs



On 4/15/05, Kamaraju Kusumanchi <kk288@cornell.edu> wrote:
>    I have a Fortran 90 program parallellized using MPICH. It is
> crashing if I am using large arrays but it is working perfectly fine, if
> I use small arrays. The code is too big to post here.
> 
>    In order to gain better understanding of what is going on, I want to
> know how much memory is actually used by the programs. The ideal
> solution would be a program which gives the memory utilized vs time
> graph when the program is running.
> 
> One way is to actually go through the program and count the size of
> variables but I am thinking there is a better way than this. I also
> tried using top, but it is very dynamic and I have note down the numbers
> by hand.

If you're running on an x86, you might try valgrind with the massif
tool.  It won't give you the data dynamically (actually, it might),
but it will show you how the stack and heap are growing with time.

-- 
Michael A. Marsh
http://www.umiacs.umd.edu/~mmarsh
http://mamarsh.blogspot.com



Reply to: