The PAX Computer and QCDPAX: History, Status and Evaluation David K. Kahaner Office of Naval Research, Far East 20 Feb 1990 10 Apr 1990 (Revised) Abstract: The PAX parallel processing project developed at the University of Tsukuba by T. Hoshino is summarized. PAX is a two dimensional array of processors which operate in MIMD form. QCDPAX has a fast floating point unit, specially programmed for QCD calculations. Peak performance is 12.5 Gigaflops. 0. Introduction Modern computing for the solution of scientific and engineering problems began in the 1940s. It was recognized by Von Neumann and others that simulation or modelling of real world phenomena could be used to reduce the amount of physical experimentation in certain situations. When no experimentation was possible it was hoped that models would allow extrapolation and prediction of new results. Weather modelling provides an excellent example. Solving the differential equations describing the temporal evolution of pressure, temperature and associated variables was one of the earliest motivations for computer modelling. Even today the problem is largely unsolved although tremendous progress has been made. This growing desire to compute has fueled research in computers and computational science. There are many papers detailing the need for ever faster hardware and software. While some of the original problems can now be solved, science's appetite for computing has grown at least as rapidly as the technology has been able to provide solutions. There is no reason to think that this trend will abate. Computers were originally sequential, each operation occurring in its own turn. This is essentially the "Von Neuman model," although early scientists appreciated that there is often simultaneity in nature that could be exploited. A substantial amount of simultaneous processing takes place in all computers today. For example, input and output are performed asynchronously with arithmetic processing. But it is only within the last 10-15 years that parallel or nonsequential numerical processing has been available. Here, some aspects of a long term parallel processing research project (PACS, PAX, and QCDPAX) begun in 1977 at Kyoto University and Hitachi corporation's nuclear power division are summarized. The initial name, Processor Array for Continuum Simulation (PACS) was soon changed to Processor Array eXperiment (PAX). QCDPAX is the current running computer, see below. Unless it is necessary to distinguish between them, we refer to the family as PAX computers. Research is now centered at the Institutes of Engineering Mechanics and Information Sciences, University of Tsukuba, Ibaraki 305 Japan. The principal investigator is Professor Tsutomu Hoshino, although he has many long term collaborators, including Professors Shirakawa, Iwasaki, Oyanagi, and others. A number of papers [1--9] and a book [10] detailing this work are referenced. This report is the result of analyzing many of these, several visits between December 1989 and January 1990 to Professor Hoshino's Tsukuba laboratory, and an examination of some programs that are now running on QCDPAX. The PAX idea was to capitalize on the obvious parallelism in many continuum problems, the rapidly decreasing costs of computer hardware, along with its associated miniaturization. These ideas have been pursued by other researchers, and PAX was in many ways inspired by research on the ILLIAC IV. The latter was a SIMD computer (single instruction, multiple data) in which a control unit forced a large number of identical processors to perform identical calculations on different data. ILLIAC IV was seminal for the subsequent development of parallel computers but it was never commercialized. Even today it is extremely difficult to design a SIMD computer which can cope with data dependent branching and this has restricted SIMD's applicability to special kinds of problems such as image processing. Current SIMD machines, for example the AMT DAP, are often criticized for this restriction. PAX also uses several hundred identical processors, but each of these can operate independently. This is usually referred to as MIMD processing--multiple instruction, multiple data--although the idea was known before PAX. Supercomputers such as Cray Y/MP or NEC SX-3 utilize very powerful asynchronous processors, but typically fewer than 16. Careful programming can sometimes lead to speedups nearly equal to the number of processors. Synchronous or asynchronous multiprocessing, sometimes called spatial replication [2], is today's best bet for substantial performance improvements, and is a major part of current research in high performance computing. However, very few scientific computations can be performed completely asynchronously. That is generally limited to searches of tables for state variables, calculation of material properties, portions of ray tracing algorithms, etc., that are data driven and hence will be different for each process. Thus a program may need to determine information about a function at a large number of points on the boundary of a region before further processing. Each of these computations may be done asynchronously, but it will also be necessary to globally synchronize before proceeding from these results. Similarly in any computation involving iteration or time integration a global synchronization of all parallel tasks must be performed. However, between these points the calculations are independent and may be performed asynchronously. Thus a good model for real problems is "quasi MIMD" [3]. Hoshino notes that "Global synchronization is not a "MUST" for parallel computers. There are lots of such machines that lack any global synchronization mechanism. PAX's advantage is this global barrier synchronization, that simplifies the communication and debugging." Also see the Editor's Introduction by Harold Stone in the book, [10]. Supercomputers also incorporate "pipelining" within their arithmetic units. This means that an operation such as multiply is broken down into a number of steps, where each can proceed concurrently on distinct operands. This provides a different type of parallelism, and has successfully generated performance improvements of perhaps one order of magnitude, roughly equal to the number of sections or steps in arithmetic operations. Pipeline computers are often referred to as "vector" computers. Sometimes two or more operations, such as + and *, can be "chained" together to provide further speedup. If there are independent arithmetic units several operations can be done simultaneously. Breaking arithmetic operations into sections requires some additional hardware and results in its own increased overhead; it is necessary to "latch" between sections to synchronize. New hardware devices such as Josephson junctions might provide a means of increasing the number of steps without introducing too much additional latching overhead. There is also the possibility of pipelining from memory so that operands can be provided to the arithmetic units in greater number per unit time. Currently this is not being done although the primary restriction seems to be economic. Pipelining is an essential ingredient in improving computer performance but additional gains to be obtained from it appear to be limited. Most computer scientists think of spatial replication as true parallel processing and feel that it has the most potential for high performance. 1. PAX The Introduction above provides a setting for describing the work by Hoshino and collaborators. The physical questions that originally motivated Hoshino were related to nuclear reactor models, and from these he became interested in "action through a medium" problems. For example fluid flow equations are normally derived by describing various conservation laws on a small volume of material. Thus the state at point P is mostly determined by local data around P. Similarly, in statics problems, such as solving the Laplace or Poisson equation, the usual approach is to discretize the region and compute approximations to the spatial derivatives at P by suitable averages of data adjacent to P. Finite differences in two dimensions take five point or nine point averages; finite element approximations can be described in the same way. On the other hand many particle problems do not satisfy this proximity condition, nor do many important numerical methods, such as Gaussian elimination with partial pivoting. All PAX computers, have shared the same basic design philosophy. (0) A high performance parallel computer to solve specific real engineering problems, rather than general problems. (1) Multiple processing units (PU), arranged in a torus or two dimensional rectangular lattice (nearest neighbor mesh, NNM). (2) Fast connections for data between neighboring PUs. (3) Synchronization and broadcasting between many, or all, PUs whenever necessary, but otherwise independent MIMD processing. Various PAX computers have been constructed; they are named according to the number of PUs, PAX-9, PAX-32, PAX-128, QCDPAX-240, and QCDPAX-480. The major differences between them are the number of processors, the specific hardware technology used in each PU, the connection network, the memory, and in the case of the last two the application software that is being developed. QCDPAX-480 is still under construction as this is written. It is scheduled for completion in March 1990 and will have peak performance of about 12.5 GFLOPS. Hardware. The PAX computer system consists of an array of PUs, a host computer, and an interface unit (HPI) to communicate between the host and the PUs. In QCDPAX each PU contains a Motorola MC68020 (CPU) with a clock speed of 25 MHz. The host is a Sun 3-260 workstation with a monochome graphic display, as well as a Anritsu color display. In QCDPAX-480 the PUs are arranged in a 24 by 20 array; QCDPAX is arranged in a 24 by 18 array. QCDPAX-288 was arranged in a 24 by 12 array. The PUs are arranged toroidally. By that we mean that the eastern end of each row is also adjacent to the western end, similarly for north and south. One particularly interesting design feature of all PAX computers is the provision for fast floating point computation. This is an integral part of most scientific computing but is not always included in multiprocessing computers of size comparable to PAX. For example, the ICL DAP lacks hardware for floating point. (All supercomputers provide floating point hardware.) In QCDPAX each PU contains a Vector Processing Unit (VPU) with floating point hardware, memory, and control circuitry. For fast floating point computation Hoshino and his associates decided that the usual floating point processor, Motorola 68881, that is often provided with 68020 chips was not fast enough. Instead, they selected as a floating point processor (FPU) the LSI L64133 that has a peak arithmetic performance of 33MFLOPS. This chip can perform both a 32 bit floating point add and multiply in a single clock period. They have incorporated the L64133 into the VPU, which also has 2MB of high speed (35-ns) SRAM for data memory (dm), another 8KB of similar memory called writable control storage (wcs) for the microcode (software) to support the floating point operations, and 1KB ROM for a look-up table. There is a three part pipeline associated with instruction fetch--decode--execute. This pipeline, along with the the two simultaneous arithmetic operations, accounts for the name "vector processor". Floating point operations occur after the CPU sends instructions and data information to the VPU which then operates independently. Computations such as evaluation of the elementary functions, random numbers, and some matrix computations have been programmed via microcode into the wcs. There are no wait states when the CPU addresses the wcs. The VPU also supports vector operations which are set up by the CPU but run by the wcs and the FPU. Compared to the 68881, the FPU is difficult to program and programming problems have been a significant time sink for the small PAX research group. Nevertheless it accounts for the high peak performance of QCDPAX. The PAX team has developed compiler, called "psc" which should make programming much easier and more productive. Communication and Memory. In addition to the 68020 CPU and VPU, each PU contains communication hardware and several different kinds of memory. The PU communicates rapidly to four PUs on the east, west, north, and south by communication memories, cm. Each of these is an 8KB two-port RAM and thus can be accessed by the PUs that share it. Adjacent PUs thus communicate by reading and writing into the same memory location. Synchronization is by the global synchronizer. Synchronization using a flag in CM is also possible. Hoshino says that programmers use the better of the two, whichever is appropriate. The PUs also communicate rapidly with the host by another 8KB two-port RAM that is associated with the HPI and is mapped onto the address space of the host. As the host writes to its memory it also sets a switch indicating which PU is to get the data, and that data item then becomes available at the appropriate PU. Communication between a PU and the host works in the same way. Also, by overlapping the addresses, i.e., having all the PUs associated with the same memory locations on the host, the latter can transmit identical data to all the PUs. This mechanism also transmission of data from one PU to all the others. In PAX descriptions this type of communication is known as a "ferry". Each PU also has 4MB of DRAM local memory, (lm); this is used to store the PU program and whatever local data it requires. Host. The host computer is used to compile and assemble source programs, load them into the array of PUs, initiate parallel tasks, send and receive data from the PUs, and output the results to a user via files and the color display. Each local PU, or node, runs whatever program is loaded into it. All PUs are normally loaded with the same program, but this is not a requirement. (This is similar to other asynchronous multiprocessors having many PUs.) Different data at each node means that the program execution path, or thread, is likely to be different for each PU. Parallelism. To summarize, PAX has four levels of parallelism. First, each PU can compute independently. Second, the CPU can compute independently of the VPU. Third, in the VPU, instruction fetch, decode, and execute can occur simultaneously. Fourth, within the FPU addition and multiplication can occur simultaneously. A user should only have to think about the first level. This determines the algorithm that is selected and how it is programmed. System software should be responsible for parallelizing on the lower levels. However, Hoshino and his colleagues have resorted to programming at all four levels in order to generate good performance from QCDPAX. Programming. The host computer on QCDPAX runs a standard version of UNIX. A user's job is to write a main program for the host and programs for the PUs. Originally, PAX programs were written in Fortran, with some extensions. Now C is used for QCDPAX. This has been extended to allow programmers to communicate between nodes, to the host, etc. Complex arithmetic is supported. Assembly language is also available for taking advantage of the additional levels of parallelism mentioned above, and using it seems to be an essential part of getting optimal performance. The structure of programs written to run on a PU will be almost entirely understandable to any experienced C programmer. There are some differences due to the communication. Thus variables can be declared as "fast", meaning that they are to be stored in the dm of the VPU, "slow", meaning that they are to be stored in lm of the PU, "north", "east", "south", or "west", meaning that they are to be stored in the communication memory, and hence available to the adjacent processor, or "ferry", meaning that they are are to be stored in the memory space that is mapped onto the hosts memory, and hence are available to other PUs. The "vfor" loop forces computations to occur in the FPU; a more traditional "for" loop generates code that executes on the CPU. vfor (k=0; k