Article View: comp.sys.dec
Article #1710Odd performance with f77 and common variables as parameters
From: Donald J. Barry
Date: Wed, 11 Jul 1990 04:41
Date: Wed, 11 Jul 1990 04:41
25 lines
1856 bytes
1856 bytes
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
Technical Details
Message-ID:
<173@chara.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!umich!samsung!emory!mephisto!eedsp!chara!donShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!umich!samsung!emory!mephisto!eedsp!chara!don From: don@chara.UUCP (Donald J. Barry) Newsgroups: comp.sys.dec Subject: Odd performance with f77 and common variables as parameters Message-ID: <173@chara.UUCP> Date: 11 Jul 90 04:41:43 GMT Reply-To: don@chara.UUCP (Donald J. Barry) Organization: Center for High Angular Resolution Astronomy Lines: 25