[Beowulf] array shape difference

amjad ali amjad11 at gmail.com
Thu Nov 12 10:02:38 EST 2009


Hi all and Thanks you all.

It is making quite good sense.

On Thu, Nov 12, 2009 at 8:50 AM, Michael H. Frese <
Michael.Frese at numerex-llc.com> wrote:

> At 06:26 AM 11/12/2009, Stuart Barkley wrote:
>
>> At 03:40 PM 11/11/2009, Peter St. John wrote:
>> >       The difference between:
>> >       array1(1:60000)
>> >       array2(1:2, 1:30000)
>> >
>> >       would be reflected in the size of the executable, not the size
>> >       of the data.
>> >       Right?
>>
>> On Thu, 12 Nov 2009 at 07:18 -0000, Michael H. Frese wrote:
>>
>> > That's correct.  The executable size would reflect the extra operations
>> > required to compute the offset for the doubly dimensioned array.
>>
>> Or maybe not.
>>
>> <theory>
>> If the fortran code is doing virtual subscripts (e.g. array2(i*2 + j))
>> it would likely generate about the same code as the compiler would
>> generate for 2 dimensions.  In theory, the compiler can generate
>> better subscript computation but I suspect in most reasonable (or
>> simple testing) cases the actual code size difference is a wash.
>> </theory>
>>
>> Go with what is most natural for expressing the algorithm.  And ease
>> the future maintenance.
>>
>> Stuart
>>
>
> Agreed.  The code size differences would compiler dependent and minimal in
> any case.  Human readability should determine the choice.
>
>
>
> Mike
>
>
>
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.clustermonkey.net/pipermail/beowulf/attachments/20091112/b7577324/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