Agree with sundialsvcs that it is fairly difficult to get meaningful numbers..
However, you can get an idea of memory usage in a fortran program by using 'top' with and without the program running. It is a little tricky though.
For example, for top to show the memory being used by an array, you actually have to be using the array while you run top. Hence you have to gludge your code with something to force this to happen while you look at top.
e.g. in this example the while statement will force the array to be used until you bomb out of the program. Top will show you that the program is using about 1000000*4 bytes
program sizer
integer array(1000000)
do while(.true.)
array(1)=1.0
enddo
end
(Obviously, dont do this while others want to use the machine.. it will hog everything!)
Hope this helps
steve
|