Archives


- Beowulf
- Beowulf Announce
- Scyld-users
- Beowulf on Debian

[Beowulf] Array Declaration approach difference

Many of your questions may have already been answered in earlier discussions or in the FAQ. The search results page will indicate current discussions as well as past list serves, articles, and papers.

Search

amjad ali amjad11 at gmail.com
Sat Nov 14 06:47:07 PST 2009


Hi All.

I have parallel PDE/CFD code in fortran.
Let we consider it consisting of two parts:

1) Startup part; that  includes input reads, splits, distributions, forming
neighborhood information arrays, grid arrays, and all related. It includes
most of the necessary array declarations.

2) Iterative part; we proceed the solution in time.


Approach One:
============
What I do is that during the Startup phase, I declare the most array
allocatable and then allocate them sizes depending upon the input reads and
domain partitioning. And then In the iterative phase I utilize those arrays.
But I "do not" allocate/deallocate new arrays in the iterative part.


Approach Two:
============
I think that,  what if I first use to run only the start -up phase of my
parallel code having allocatable like things and get the sizes-values
required for array allocations for a specific problem size and partitioning.
Then I use these values as contant in another version of my code in which I
will declare array with the contant values obtained.


So my question is that will there be any significant performance/efficiency
diffrence in the "ITERATIVE part" if the approch two is used (having arrays
declared fixed sizes/values)?


Thank You for your kind attention.

with best regards,
Amjad Ali.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.scyld.com/pipermail/beowulf/attachments/20091114/9721f7d1/attachment.html


More information about the Beowulf mailing list