Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* Re: F77, Errors when Optimizing on Alpha
@ 1995-08-12  4:00 Steve Lionel
  0 siblings, 0 replies; 2+ messages in thread
From: Steve Lionel @ 1995-08-12  4:00 UTC (permalink / 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/



^ permalink raw reply	[flat|nested] 2+ messages in thread
* F77, Errors when Optimizing on Alpha
@ 1995-08-11  4:00 William Steve Shepard
  0 siblings, 0 replies; 2+ messages in thread
From: William Steve Shepard @ 1995-08-11  4:00 UTC (permalink / raw)



We are using several codes that read and write data (to the disk) numerous
times so that a set of original data can be reused.  We are experiencing an
interesting problem with these codes.

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.

To check this problem further, another code (written by a different person)
was even separated into a mathematical section and a read/write section.
When run together, the codes gave the correct answer only when the
read/write section was NOT optimized.   Optimizing the mathematical section
did not affect the results.

So, it appears that when the optimized code is used, the read/write 
statements are not always executing.

We are currently running:
          Dec Fortran for OSF/1 v3.6
on an Alpha machine.

Has anyone else experienced this problem?

Does anyone have any ideas what could be happening?

Please send replies to: shepard@lab11.me.gatech.edu

Cross-Posted in:
  comp.lang.fortran
  comp.sys.dec

Thanks in Advance!
Steve Shepard



-- 
*********************************************************
Steve Shepard              shepard@lab11.me.gatech.edu
A Ramblin' Wreck from Georgia Tech
And a Helluva Engineer  



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1995-08-12  4:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-08-12  4:00 F77, Errors when Optimizing on Alpha Steve Lionel
  -- strict thread matches above, loose matches on Subject: below --
1995-08-11  4:00 William Steve Shepard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox