Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!uunet!convex!psmith From: psmith@convex.com (Presley Smith) Newsgroups: comp.lang.fortran Subject: Array Notation Message-ID: <1991Jan03.163532.22692@convex.com> Date: 3 Jan 91 16:35:32 GMT Sender: news@convex.com (news access account) Distribution: comp.lang.fortran Organization: Convex Computer Corporation; Richardson, TX Lines: 91 Nntp-Posting-Host: mozart.convex.com Thought this might be interesting to readers of comp.lang.fortran. It quantifies the potential performance decrease that one may experience when converting from DO loop notation of FORTRAN 77 to the array notation available on the Cray. This is the same array notation that is specified in Fortran 90. Array notation provides a simplified way to specify array operations in many cases, but may, in fact, decrease the performance of the program. ------------------------------------------------------------------------ Path: convex!texsun!sundc!seismo!dimacs.rutgers.edu!mips!news.cs.indiana.edu!cica!tut.cis.ohio-state.edu!att!emory!hubcap!rcarter From: rcarter@nas.nasa.gov (Russell L. Carter) Newsgroups: comp.parallel Subject: Re: CM Fortran (actually, CRI array syntax performance) Message-ID: <12444@hubcap.clemson.edu> Date: 2 Jan 91 18:06:35 GMT References: <12301@hubcap.clemson.edu> <12324@hubcap.clemson.edu> <12381@hubcap.clemson.edu> <12398@hubcap.clemson.edu> <12410@hubcap.clemson.edu> Sender: fpst@hubcap.clemson.edu Reply-To: rcarter@wilbur.nas.nasa.gov (Russell L. Carter) Organization: NAS Program, NASA Ames Research Center, Moffett Field, CA Lines: 67 Approved: parallel@hubcap.clemson.edu In article <12410@hubcap.clemson.edu> john%ghostwheel.unm.edu@ariel.unm.edu (John Prentice) writes: >In article <12398@hubcap.clemson.edu> serafini@amelia.nas.nasa.gov (David B. Serafini) writes: >> >>CFT77 has had a subset of the Fortran 90 array syntax for quite a while now, >>at least a couple of years. It hasn't caught on much, (to my knowledge) >>probably because of the portability problems it creates. The Cray Fortran >>preprocessor, fpp, now can put out do-loop based code when given array code, >>so portability is less of a concern now. >> >This is rather interesting. Does fpp generate a new do-loop for every >array construct or is it smart enough to combine operations the way >you would if you were writing in Fortran 77? What is the effect on >the optimizer of all this? > >John K. Prentice >john@unmfys.unm.edu Well, let's look at some data. I converted the NAS Kernels, a popular CFD benchmark (at least here at NAS) to array syntax, and ran it on our YMP. Here is what I get: Using array syntax: THE NAS KERNEL BENCHMARK PROGRAM PROGRAM ERROR FP OPS SECONDS MFLOPS MXM 1.8085E-13 4.1943E+08 1.5879 264.15 CFFT2D 3.2001E-12 4.9807E+08 11.1267 44.76 CHOLSKY 1.8256E-10 2.2103E+08 4.9911 44.29 BTRIX 6.0622E-12 3.2197E+08 4.5159 71.30 GMTRY 1.0082E+00 2.2650E+08 3.5258 64.24 EMIT 1.5609E-13 2.2604E+08 1.3055 173.15 VPENTA 2.3541E-13 2.5943E+08 7.1281 36.40 TOTAL 1.0082E+00 2.1725E+09 34.1810 63.56 And using plain vanilla fortran 77: THE NAS KERNEL BENCHMARK PROGRAM PROGRAM ERROR FP OPS SECONDS MFLOPS MXM 1.8085E-13 4.1943E+08 1.5705 267.06 CFFT2D 3.2001E-12 4.9807E+08 7.0951 70.20 CHOLSKY 1.8256E-10 2.2103E+08 2.6393 83.75 BTRIX 6.0622E-12 3.2197E+08 2.3717 135.76 GMTRY 6.5609E-13 2.2650E+08 2.0910 108.32 EMIT 1.5609E-13 2.2604E+08 1.2987 174.05 VPENTA 2.3541E-13 2.5943E+08 4.7900 54.16 TOTAL 1.9305E-10 2.1725E+09 21.8563 99.40 The MFLOPS definitely decrease for this code when the DO loops are expressed in the array section syntax. We have smart users; They HATE to go slower. So few apparently use the array syntax here at NAS, unless they want a code that can be run with minimal changes on the CM. russell rcarter@wilbur.nas.nasa.gov