From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,45b50f14dadfce5b X-Google-Attributes: gid1164f8,public X-Google-Thread: 102b75,45b50f14dadfce5b X-Google-Attributes: gid102b75,public X-Google-Thread: 110292,45b50f14dadfce5b X-Google-Attributes: gid110292,public From: David Chase Subject: Re: Final kick at the "Merced Guessing Game" Date: 1997/10/09 Message-ID: <343C3344.7F57@world.std.com> X-Deja-AN: 278849733 Sender: news@world.std.com (Mr Usenet Himself) References: <61gr1g$kv@news-rocq.inria.fr> <343C0387.41C6@lanl.gov> <343C0C92.B6C7A244@tonys.ecology.umn.edu> Organization: Natural Bridge LLC Reply-To: chase@world.std.com Newsgroups: comp.sys.intel,comp.arch,comp.sys.dec > William Clodius wrote: > > So you are saying that David Chase, [resume omitted] writes lousy C code > > because he can't get within 10% of the performance of Fortran. There > > are several possibilities here, not all > > mutually exclusive You have to be careful there. First, I try not to argue from authority. Second, I know people with PhDs that I would not necessarily trust to write C; skill at writing C does not necessarily correlate with anything. I do think it was pretty good code that I wrote, at least in terms of performance. Also, I am emphatically NOT one of the primary authors of the Boehm-Weiser collector. Early user, yes, enthusiastic fan, yes, author, no. Hans and I worked on the optimizer- versus-your-garbage-collector problem in the distant past, trying to come up with some way to trick a C compiler into certainly not destroying the properties of the generated code that were needed by the collector, while still allowing it to generate decent code. The point, which apparently has not yet sunk in, is that indeed, C gets you very close to the machine, and on modern machines, if you want to get best performance, this means you need to know all sorts of silly stuff, and hand-apply atrocious transformations that will not necessarily enhance performance on the next machine. The tricks that were taught 5 years ago no longer apply, and the tricks that will work best 5 years from now will probably differ from the best tricks today. The guys at Tera think they have a solution to this problem, and I hope they are right (and I still want to know why they decided to build the damn thing about of GaAs, as if they weren't taking on enough risk already.) boo wrote: > About 5 years ago, I wrote a large simulation in CM Fortran for > the CM5 (and you had one of those at lanl, so I think you follow > what I am saying...), and was quite impressed with the performance. > I then wrote the crucial routines in C with CDPEAC (macros > which expand to vector unit assembly codes), and produced something > that thrashed the THEORETICAL PEAK EFFICIENCY POSSIBLE of CM Fortran at > that time, according to their manuals. CDPEAC is defined in what section of the C standard? You do know that they're not making those vector units anymore, don't you, and that they're one of the reasons (but not the only reason) why TMC is no longer in the hardware business? Custom hardware sucks. (Why do you think we were trying to see how fast stock hardware could be used to multiply matrices, given the best possible code we knew how to generate for a typical numerical problem?) Note to the non-CM users: a CM-5 contained a collection of Sparc chips speaking to memory through a pair of memory controllers, where each memory controlled was "enhanced" with (sort of) a pair of vector processors. Thus, you get 1 Sparc + 4 vector units. Each VU executes pipelined memory-to-memory operations, with a throughput of one per tick. The clock rate of the whole blob is typically lower than the current Sparc workstation clock rate; I don't know if this is the limit of the VU performance, or if it was done to make the entire machine reliable enough to use. The Cypress chip blobs were clocked at 25Mhz, the SuperSparc blobs were clocked at 40 Mhz. (I think this is correct; there were different terms for the blobs depending upon whether you were counting Sparc chips, memory controllers, or apparent vector units). CMF at least, you can translate pretty easily into HPF, and get it compiled onto an SP-2 or whatever else you choose. If I remember correctly, the current versions of the PowerPC ought to give the about the same performance as one of those Sparc+VU combinations. 40 Mhz * 4 multiply adds/tick gives you 320 Mflops speed-of-light, versus one multiply-add per tick on a 300+ Mhz PPC, assuming you can keep the damn thing fed operands, which is the entire point of the pipelining and blocking nonsense. The experiments we ran indicated that we were unlikely to get more than 2/3 of the speed-of-light on general-purpose hardware, and this was wildly optimistic. Compilers and Fortran "optimizing preprocessors" available at the time did a pretty poor job. On the other hand, peak performance from the CM was also pretty rare; I think that 1/6th peak was considered to be "good enough" at one national lab (otherwise, you were not using the machine efficiently, I don't want to think about what weird accounting, padding, and coding tricks this may have induced over time.) -- David Chase, chase@world.std.com