From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: X-Archive-Original-Message-ID: <9704241157.AA00276@maine.com> Date: Thu, 24 Apr 97 07:57:19 -0400 From: Harold H.Youngren Subject: Re: g77 experience (now with comment on NDP f77) Michal Jaegermann responded with: >> >> The fortran situation under Linux/Alpha is pretty bleak, that is why I run DEC >> OSF and the DEC f77/f90 for my work. If you use f2c/gcc you can expect to get >> about 40 MFLOPS out of a LINPACK benchmark (that runs at 140 MFLOPS on DEC >> f77!). >I would strongly suspect that you see in these numbers not so >a difference in compilers but an essential difference in libraries. >Posted timings when really compilers were involved did not show up >such dramatic differences even if DEC compiler was faster (something >of an order of 10-15 %, which is still hard to disregard). First, the only posted timings I have seen only involve the DEC C and gcc, not f2c/gcc and f77. The bottom line here is that a native Fortran compiler can optimize far better than a C compiler and you see this in the comparisons of f2c/cc and f77 on any platform with a good native fortran compiler. I just chose the LINPACK as a standard of comparison (this LINPACK was the undoctored benchmark from standard net sources, like ORNL, with the sizes increased to 400/401 to get reliable timing) because everybody could get it. The difference between DEC f77/f90 and f2c/gcc is really 2x-3x for most any of the "real-life" fortran codes that I have worked with, including big 3D Euler and NS codes. When you crank up the optimization on the DEC compiler and play with the loop unrolling you get a big speedup. You can get more if you put the source through a source optimizer like KAP, here I am guided by discussions with Microway's Steve Fried who has worked with KAP alot, I don't have it. I understand that the DEC DXML was tuned up to its extreme speeds using KAP and lots and lots of comparison runs varying tuning parameters. This fortran speedup is much greater than the speed differences between DEC C and gcc, most of the time DEC C will be faster (for example I have an LU decomposition benchmark that gets 40 MFLOPS or so with f2c/gcc which gets 65 MFLOPS with f2c/DEC C. On the other hand Mesa runs roughly 5% faster when compiled with gcc2.7.2 rather than DEC C. Go figure. >As a corollary to the above I would not expect miracles until higly >optimized BLAS libraries will be available for GNU compilers. >At some moment there was a talk that maybe Linux users will get >an access to binaries of some DEC math libraries, not necessarily >for free, but somehow things failed to materialize. >On the other hand if your codes are not of a LINPACK type then >people using f2c/gcc do not seem to fare too badly. :-) This is misleading. You can't just brush off the speed differences between f2c/gcc and DEC f77 to the libraries either as most simple math operations such as these matrix/vector operations don't make library calls for anything in the main loops, this is just simple code optimization and scheduling. The optimized BLAS would give big speedups for only the calls to the libraries which would be pretty good for codes which are written specifically around the BLAS but would not help the code that doesn't involve the BLAS calls. Regards, Hal Y. -- ************************************************************* * Harold Youngren ----> Internet: guppy@maine.com * * 129 Pitt St, or: guppy@netcom.com * * Portland, ME 04103 AeroCraft Consulting * * Home: (207)871-0552 Aeronautical Consulting, Analysis,* * Fax: (207)871-1034 Design, CFD software * ************************************************************* -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com