Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!amelia!orville.nas.nasa.gov!fouts From: fouts@orville.nas.nasa.gov (Marty Fouts) Newsgroups: comp.arch Subject: Re: RISC is a nasty no-no! Message-ID: <322@amelia.nas.nasa.gov> Date: 3 Mar 88 17:57:52 GMT References: <179@wsccs.UUCP: <696@nuchat.UUCP: <284@scdpyr.UUCP> <25699@linus.UUCP> <11199@duke.cs.duke.edu> <25723@linus.UUCP> <8332@eddie.MIT.EDU> <7482@apple.UUCP> <7514@boring.cwi.nl> <17415@think.UUCP> Sender: news@amelia.nas.nasa.gov Reply-To: fouts@orville.nas.nasa.gov (Marty Fouts) Lines: 23 In article <17415@think.UUCP> barmar@fafnir.think.com.UUCP (Barry Margolin) writes: >>In article <7482@apple.UUCP> baum@apple.UUCP (Allen Baum) writes: >> > (power of two array sizes are pretty common!), > >For scientific programming (the major application of supercomputers), >is this really true? What scientific applications naturally map onto >power-of-two arrays? I suspect that making arrays a power of two in >size is a habit mostly of systems programmers, who know to make things >fit neatly into memory pages in order to reduce paging. > Much scientific programming takes the form of solving partial differential equations using finite difference approximations of the initial equation. By selecting the differencing delta, the programmer controls the problem size, so there is really a range of sizes which work. The lower limit is the minimum necessary to achieve some kind of numerical stability in the result. The upper limit is the amount of computer time available/desirable for solving the problem. On many vector machines, the use of multiple memory banks to increase apparent memory bandwidth dictates that arrays not be powers of two in all dimensions, in order to avoid bank conflict when marching through the array. Some computations are done with arrays in which bounds are arbitrarily set to relatively prime values.