From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,9a45ac8930ff0a33 X-Google-Attributes: gid111c93,public From: "H.W. Stockman" Subject: Re: g77 performance Date: 1998/01/17 Message-ID: <34C0C91C.677A@swcp.com>#1/1 X-Deja-AN: 316836784 Content-Transfer-Encoding: 7bit References: <69qe8l$2sa$2@news.utrecht.NL.net> Content-Type: text/plain; charset=us-ascii Organization: Lentil Sorbet, Inc. Mime-Version: 1.0 Reply-To: hwstock@swcp.com Newsgroups: comp.os.linux.alpha Toon Moene wrote: > > Olgun Guvench wrote: > > > Currently I am a RedHat 4.1 user on a Pentium 166 MMX. I am running some > > floating point intensive molecular dynamics Fortran code compiled under > > g77 2.7.2.3 and am hoping to move to an Alpha processor based computer for > > a performance boost. I would very much appreciate any opinions on how g77 [...] > > Perhaps someone can address with what types of algorithms or code > > structure either of the two Fortran compiliers excel or do not excel. > > (or any other Fortran 77 compilers for alpha for that matter...) > You'll run into performance problems in the following cases: > 1. Your code does a lot of REAL -> INTEGER or INTEGER -> REAL conversions. > 2. It does a lot of sqrt's (Digital's compiler uses a special 4-sqrts- > at-a-time run time library routine). [...] The sqrts could indeed be the speed limiting factor, since most molecular dynamics calculations need to calculate something like sqrt((x1-x2)**2 + (y1-y2)**2 + (z1-z2)**2) often. A similar thread came up in comp.arch about a 4 months ago, in light of the recognition that most MD programs really need sqrt(1/rSqrd). It was pointed out that the standard Newton's method formulation is easily cast in 1/rSqrd, removing a lot of unnecessary calculation (in particular, the division). Terje Mathisen was tracking the various methods at that time, and indeed it was possible to achieve quite a bit of register-level parallelism. Not all MD methods may benefit by this approach, but it is possible that a few carefully-selected hand optimizations might overwhelm the differences among the compilers.