Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: lionel@quark.enet.dec.com (Steve Lionel)
Subject: Re: F77, Errors when Optimizing on Alpha
Date: 1995/08/12	[thread overview]
Message-ID: <40ijko$ds6@nntpd.lkg.dec.com> (raw)

In article <40g89i$h27@acmex.gatech.edu>, Steve Shepard wrote:

>If the code is compiled using the standard F77 command, the results
>obtained when runing the program are NOT ALWAYS CORRECT.  In one code, the
>results are correct with one loop of execution and incorrect on the next
>loop.  In this same code, the results are repeatable.  That is,  the Nth
>loop always gives the same, incorrect, answer.
>
>If the code is compiled with OPTIMIZATION OFF (using -g option), the
>results obtained when running the program are ALWAYS CORRECT.

He set his posting for replies to go back to the poster, and I have sent him
a more detailed answer, but I did want others to know that I had responded and
to suggest what might be the problem.  Here is part of what I wrote:

 One common programming error which can cause problems like this is violation
 of the Fortran 77 standard's prohibition against aliasing of dummy arguments
 and/or common.  One way this often happens is to pass the same array or
 overlapping portions of the same array as two separate arguments to the same
 routine.  The compiler assumes by default that you don't do this, and some
 significant optimizations take advantage of that knowledge.

Unfortunately, without having seen the source code, I can only guess, but if
the above is the problem, compiling with the -assume dummy_aliases switch
will disable the optimizations which depend on the absence of dummy argument
aliasing (storage association).

Steve Lionel                      Mail: lionel@quark.enet.dec.com
DEC Fortran Development           WWW:  http://www.digital.com/info/slionel.html
Digital Equipment Corporation     CompuServe: 75263,3001
110 Spit Brook Road, ZKO2-3/N30
Nashua, NH 03062-2698             "Free advice is worth every cent"

For information on DEC Fortran 90, see http://www.digital.com/info/hpc/f90/



             reply	other threads:[~1995-08-12  4:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-08-12  4:00 Steve Lionel [this message]
  -- strict thread matches above, loose matches on Subject: below --
1995-08-11  4:00 F77, Errors when Optimizing on Alpha William Steve Shepard
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