Re: different results with different f77 optimizers

ah739@cleveland.Freenet.Edu (Leslie J. Somos)
Fri, 29 Sep 1995 07:56:05 GMT

          From comp.compilers

Related articles
different results with different f77 optimizers keyes@chem.bu.edu (Tom Keyes) (1995-09-24)
Re: different results with different f77 optimizers ah739@cleveland.Freenet.Edu (1995-09-29)
Re: different results with different f77 optimizers roberson@hamer.ibd.nrc.ca (1995-09-30)
Re: different results with different f77 optimizers cliffc@ami.sps.mot.com (1995-10-05)
Re: different results with different f77 opti bliss@worm.convex.com (1995-10-05)
Re: different results with different f77 optimizers preston@tera.com (1995-10-06)
| List of all articles for this month |

Newsgroups: comp.sys.sgi.apps,comp.compilers
From: ah739@cleveland.Freenet.Edu (Leslie J. Somos)
Keywords: Fortran, optimize, comment
Organization: Case Western Reserve University, Cleveland, OH (USA)
References: 95-09-146
Date: Fri, 29 Sep 1995 07:56:05 GMT

In a previous article, keyes@chem.bu.edu (Tom Keyes) says:
> I am running some molecular dynamics simulations on an SGI 150 MHz
>'Challenger' with IRIX 5.2. I compile the Fortran source with f77
>-O3 -non_shared;if I try -O3 alone I get a message that the system does
>not support -O3 in 'shared' mode, please use non_shared. The program
>compiles and runs fine. Recently I recompiled with no optimizer,which I
>understand leads to the default '-O1'. Again the program compiled and
>ran fine-the same identical program-but now one of the calculated
>quantities was radically different. I have checked enough now to verify
>that these two different optimizers really do lead to different results.
[...]


I would trust the unoptimized version more.


See CMG Transactions (CMG=Computer Measurement Group)
number 52, Spring 1986, article "Do Fortran Compilers Really Optimize?"
by Dr. David S. Lindsay.
He compares optimized and unoptimized versions of Fortran code
specifically coded to be optimizable, on commercial compilers.
Quote from his Conclusion:
"1. Compiler optimization of generated code is haphazard at best.
  2. Compiler optimization if _not_ a mature technology, at least
      not if IBM's VS FORTRAN and DEC's VAX/VMS FORTRAN are representative.
  3. Trade, technical, and academic sources have no basis for their
      dogma about how all optimizing compilers do so-and-so.
  4. Empirical tests are _badly_ needed to verify vendors' claims of
      their compilers' generation of optimized code.
  5. Empirical tests are probably also the only way to improve
      optimization technology.
  6. Academics should have their students run tests, not just
      learn techniques."


He makes available the sources of his FORTRAN Compiler Optimization Checker
if you agree to actually run them against your local compiler and
send him back the results. He is Dr. David S. Lindsay
                                                                        585 Manet Terrace
                                                                        Sunnyvale, CA 94007


(The article is from 1986, I have no idea if this address is stale.)
[I also wonder if the optimization biz has advanced any in the past decade.
I sure hope so. -John]
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.