On Fri, Jan 23, 2009 at 11:03:46AM +0500, amjad ali wrote:

> (1) Which debugger would be easy and effective to use for above?

print *,

> (2) Which of the folliwng two ways of using arrays is more efficient
> with respect to memory and function-call-overheads or other overheads:
>                  (i) We should keep the arrays ALLOCATABLE and then
> before return from the subroutines, DEALLOCATE the local arrays.
>               or (ii) We should keep the local arrays fix-sized as
> much as we can. (Will the memory is deallaocated/freed automatically
> on return from the subroutine?).

In general (ii) is faster: the compiler can generate better code if it
knows the size of the arrays. This is always possible with (ii) and
only sometimes with (i).

With (ii) the memory will be freed on return from the subroutine, with
most modern compilers. With (i) the arrays will also be automagically
freed on exit from the subroutine.

-- greg


_______________________________________________
Beowulf mailing list, Beowulf@beowulf.org
To change your subscription (digest mode or unsubscribe) visit 
http://www.beowulf.org/mailman/listinfo/beowulf

Reply via email to