I wrote:
>
> [...]
> > Also, there seem some _rules_ conflicting with current well known or
> > not so well known issues in Fortran 90 compilers.
>
John Bray wrote:
> Can you give examples. I've not reviewed the standard recently to
> see if it actually complies with our current practice, but I don't
> remember any major divergences from it.
In Guidance For the Use of Dynamic Memory:
----------------------------------------
Use automatic arrays in preference to the other forms of dynamic
memory allocation.
Our experiences show that at least for some systems, automatic arrays
may be very demanding on stack memory, making the software too
expensive to run (except maybe on Cray systems?). For compilers
using stack memory for _automatic_ objects, and heap memory for
_allocatable_ and _pointer_ objects, this might be a typical problem.
In Use of New Fortran Features/Conclusion:
----------------------------------------
Array notation should be used whenever possible. This should
help optimization and ...
I have heard the other way: array notation expressions are often hard
to optimize, at least for cache effiency.
There are also other issues invovled in array notation expressions,
such as temporary memory demanding more stack memory (see above), or
unexpected performance-hurting copying related to passing arguments
if the explicit interface issue is not addressed carefully.
I think array notation is a complicate issue with a lot of painful
details to be concerned. I don't know a simple solution for that.
I have not read the whole thing carefully yet, so my concerns may have
been addressed in different place in the coding standard. Also,
please correct me if my concerns are wrong.
Jing
--
________________________________ _-__-_-_ _-___---
Jing Guo, [log in to unmask], (301)805-8333(o), (301)805-7960(fx)
Data Assimilation Office, Code 910.3, NASA/GSFC, Greenbelt, MD 20771
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|