[Beowulf] Array Declaration approach difference

amjad ali amjad11 at gmail.com
Sat Nov 14 09:47:07 EST 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.clustermonkey.net/pipermail/beowulf/attachments/20091114/9721f7d1/attachment-0001.html>
-------------- next part --------------
_______________________________________________
Beowulf mailing list, Beowulf at beowulf.org sponsored by Penguin Computing
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf


More information about the Beowulf mailing list