From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,100c510dac09e617 X-Google-Attributes: gid111c93,public From: "H.W. Stockman" Subject: Re: MFlops Comparison using g77 (bad news) Date: 1997/09/16 Message-ID: <341E957B.7233@swcp.com>#1/1 X-Deja-AN: 272958324 References: <5vl4lv$8ko@bgtnsc03.worldnet.att.net> Reply-To: hwstock@swcp.com To: Luke Lonergan Organization: Lentil Sorbet, Inc. Newsgroups: comp.os.linux.alpha Luke Lonergan wrote: [...] > ------------------------ > C Operation count = 9 operations/grid point > > do j = 2, ny-1 > do i = 2, nx-1 > psi_new(i,j) = a1*psi(i+1,j)+a2*psi(i-1,j)+ > & a3*psi(i,j+1)+a4*psi(i,j-1)- > & a5*f(i,j) > end do > end do > ---------------------------------------------------------------------------- > ------------------------ > > This is the performance that I get: > > 36 MFlops on the 21164 Alpha 433 MHz (This is obviously unexpected) > > 40 MFlops on the PPro 200MHz > 55 MFlops on the PentiumII 300 MHz > 70 MFlops on the SGI Origin 2000 (MIPS R10000 at 195 MHz) > 100 MFlops on the 21164 Alpha 450MHz on the Cray T3E > 1000 MFlops on the Cray T90 [...] > I think the compiler is the culprit. Any ideas? The compiler is probably the culprit. We don't know how big your arrays are, so there is a chance you are thrashing the cache with all that column-flipping, but I doubt it. About a year back we did some comparisons among various architechtures and compilers, and found: (1) g77 generally produced code a factor of 2 to 3 slower than the commercial compilers (like Lahey on the PPro, DEC FORTRAN on the alpha); for our memory-intensive tests, a 500 MHz DECalpha system was about 3 times faster than a 200 MHz PPro. Unfortunately, the tests were slightly skewed by the fact that the alpha had 8 MB L3 on a total array set of about 12 MB, but subsequent tests suggested at least a factor of 2. On gcc code, one fellow did some "quick" gcc hand optimizations -- mainly stuffing important variables into registers -- and improved the alpha performance by nearly a factor of two. You might request someone try to compile your code with egcs-inspired g77. I saw a note here recently (possibly from Craig Burley?) that such a combination was possible.