Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: don@chara.UUCP (Donald J. Barry)
Subject: Odd performance with f77 and common variables as parameters
Date: 11 Jul 90 04:41:43 GMT	[thread overview]
Message-ID: <173@chara.UUCP> (raw)

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


         reply	other threads:[~1990-07-11  4:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1990-07-13 15:28 Odd performance with f77 and common variables as parameters axt654
1990-07-11  4:41 ` Donald J. Barry [this message]
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