[2400] in Athena Bugs
f77 -O option
daemon@ATHENA.MIT.EDU (drmorris@ATHENA.MIT.EDU)
Fri Jun 16 16:42:54 1989
From: <drmorris@ATHENA.MIT.EDU>
To: bugs@ATHENA.MIT.EDU
Cc: oliver@ATHENA.MIT.EDU
Date: Fri, 16 Jun 89 16:42:26 EDT
From user oliver:
-----------------
I have a rather long fortran program (/mit/oliver/programs/globalfit2.f,
compiling command contained in /mit/oliver/programs/makefile)
with which I am experiencing separate difficulties running on the different
workstations. The unaltered program runs fine on mainframe VAXs, so as far
as I know there is nothing wrong with the code:
1. On VAXstations, the program compiles successfully but does not run
correctly when the main program (globalfit.f) is compiled using the
optimization (-O) switch. Specifically, the wrong results are obtained.
When I tried running it using the debugger, I found that everything worked
fine. Finally, I tried compiling without optimizing the main program, and
then the program runs o.k.
2. Strangely, I had been able to compile and run the program successfully
on the RTs with the old compiler, but now with the new compiler the program
does not compile using the optimization switch. I haven't yet tried
compiling without optimization.
I thus have two questions:
1. Is there something about the program length which may affect the
optimization?
2. Do you have an estimated of how much effeciency is gained by
optimization? The program is a rather long curve-fitting routine and if a
significant amount of time can be saved by optimizing, I would prefer
figuring out how to do that. If, however, the difference is negligible,
then I can live with what I have.
Thanks,
Jim Oliver
------
- Dave Morrison