From: axt654@csc.anu.oz
Subject: Re: Odd performance with f77 and common variables as parameters
Date: 13 Jul 90 15:28:32 GMT [thread overview]
Message-ID: <2373.269de8a0@csc.anu.oz> (raw)
In-Reply-To: 173@chara.UUCP
In article <173@chara.UUCP>, don@chara.UUCP (Donald J. Barry) writes:
> Running UWS 1.31 and the associated fortran and compilers on a DS 3100, I'm
> finding it rather difficult to port a creaky fortran application over. The
> code is roughly 6000 lines, still uses arithmetic if's, switches, etc, and
> even has a few (gasp) hollerith constants here and there. Its fortran 77
> and compiles and runs with no problems on both Microsoft Fortran 5.1 and
> a Univac compiler. The problem seems to be one of passing arrays declared
> in common as arguments to subroutines (I know, it's terrible programming, but
> the trick is really needed in this case). Specifically, I have a function
> of the sort
> MAP(array1,array2,int,array3,array4,int2)
> where all the arrays, and sometimes one or both of the scalars is also in
> named common. Only the arrays suffer side effects from the call. If
> I replace one of the scalars with a copy of it, rather than using the
> original in common, the output changes. I have not yet tried making
> copies of all the arrays because of the many permutations that this
> routine is used with.
>
> Is this a known compiler problem? Has anyone developed any workarounds?
> Don Barry
> Center for High Angular Resolution Astronomy
> Georgia State University
> --
> Donald J. Barry (404) 651-2932 | don%chara@gatech.edu
> Center for High Angular Resolution Astronomy | President, Astronomical
> Georgia State University, Atlanta, GA 30303 | Society of the Atlantic
I am also using 1.31 of this compiler and don't seem to be hitting the problem.
I declare 5 dimensional several megabyte arrays and pass subsections of lower
dimension to subroutines without problem. I can only guess that some sort of
assumption may be being made about byte-order, the PC and DS 3100 have opposite
byte order. I certainly don't think it's a compiler limitation as my arrays
are also common blocked, and the code isn't even all that ugly - how else do
you structure arrays of arrays of two dimensional objects?
Andrew Tridgell
tridge@aerodec.anu.oz.au
next parent reply other threads:[~1990-07-13 15:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1990-07-13 15:28 axt654 [this message]
1990-07-11 4:41 ` Odd performance with f77 and common variables as parameters Donald J. Barry
1990-07-13 12:59 ` Shawn Mamros
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox