Speed penalty for using allocatable arrays?



Dear Group,

I am in the process of converting a collection of Fortran 77 programs
into
Fortran 90/95. One of the reasons for converting is the dynamic memory
allocation available in Fortran 90/95. However, I noticed that the
version
of the program that allocates the large arrays we use runs at a much
slower speed compared to the version of the same program that uses
static allocation. More precisely, the arrays are allocated once at the
begining of the program and then they are used in an iterative
algorithm.
With the Irix MIPSpro compiler version 7.4, each iteration slows down
by a factor of approx. one third when allocating the large arrays
(compared to statically allocating them). With the Absoft Fortran 90
compiler (Pro-Fortran Version 8) on G4 and G5 Macintosh computers
(Mac OS 10.3.9), each iteraion of the program that allocates the large
arrays runs at about half the speed of the static-memory version.

Is this a known "feature" of Fortran 90/95? Is there a solution to this
problem other than going back to static memory allocation?

Feedback to this newsgroup and/or e-mail to jomarBueyes@xxxxxxxxxxx
will be greatly appreciated.

Jomar
(jomarBueyes@xxxxxxxxxxx)

.



Relevant Pages