FORTRAN program optimisation

Keith Bierman - Advanced Languages - Floating Point Group khb at road.Sun.COM
Sat Aug 26 12:19:52 AEST 1989


In article <89Aug25.093608edt.57688 at ugw.utcs.utoronto.ca> LEONARDZ at UOGUELPH.BITNET ("Len Zaifman  UoGuelph 824-4120 xt 6566", 519) writes:
>
>     I need help on two issues.
>
>     1 . I am trying to compile some fortran code with optimisation. At O2 ,
>        several routines ( this program has several hundred  ) hit
         .... stuff about table sizes

It should be easy enough to try the experiment of compiling a few
modules with and without the larger tables. I've never noticed a
significant difference, but not working for SGI, I can't promise you
that. 

>             To that end I would also like someone from SGI to comment on the
>        advisability of using O3. I was told that at the moment this level of
>        optimisation is unsafe. Is that true , and what performance

Mileage varies a lot for all higher level optimizers. I strongly
suggest you profile your code, and turn the optimizer on high on just
the top routines (probably 5 or 10). Optimizers can pessimize code, so
pay attention to the profiles as you go. I expect that you have both
prof and gprof. prof is less intrusive. For really reducing the
intrusiveness (at the cost of lower information content) turn on
profiling ONLY on the "link" line, viz.

	f77 -O  your.f -c
	f77 your.o -p

Asking how much benefit O<n> gives over <n-1> is typically silly ...
most of the time doesn't matter ... just what goes on in 10% of your
code. 

>
>       2. On the user interface side , I see a need for easier command recall

At the very least ksh should be available (if only via the ATT
toolchest source program, or via bash from RMS). I haven't played
around with the SGI machines enough to comment of the cut and paste
(sunview, and openlook allow it).


Keith H. Bierman    |*My thoughts are my own. !! kbierman at sun.com
It's Not My Fault   |	MTS --Only my work belongs to Sun* 
I Voted for Bill &  | Advanced Languages/Floating Point Group            
Opus                | "When the going gets Weird .. the Weird turn PRO"



More information about the Comp.sys.sgi mailing list