Skip to content

Compiled APL for Supercomputers

Vector 9:3, page 81

implementations performance

Transcribed from the printed issue; not yet reviewed. Read it in the PDF of the issue, page 81

We then jumped right to the other end of the computing spectrum with a talk by Walter Schwarz. Walter’s talk was about ‘Compiled APL for supercomputers’ and covered the Acorn (APL to C On Real Numbers) APL compiler. I had first seen references to the Acorn compiler in the APL90 Proceedings (in a paper by Bernecky, Brenner and others). That paper discussed the compiler being used on a Sun 386 and also on a Cray XMP. In outline the Acorn compiler can compile a restricted set of APL expressions into C (the restrictions include use of real numbers only — hence the name). Walter discussed more recent work (presented at a workshop on array functional languages in Montreal in 1991) where the compiler code was destined to be run on a parallel machine — the Connections Machines CM-2 system with a VAX or Sun front end. The project referred to was an exercise to do preliminary work to gain some understanding of working in a parallel environment, and also to study the results of executing Acorn code on this type of system. I won’t attempt to cover the technicalities but those of you who have just bought a new PC might like to compare specifications. The CM-2 used had 32K processors and 1K floating point co-processors. Each processor had 8K of memory. Walter discussed the system architecture, the means of communication between the front end and the parallel machine, and also the sorts of APL functions that could be compiled and run on the CM-2.

The hypothesis that was being tested was that there should be a good match between APL and a parallel programming system, and it has to be said that this was not proven.

Performance was tested by running a number of routines that had been run on other systems such as the Cray X-MP. On the first test the CM-2 (parallel) system ran some 200 times slower than the Cray and with the second the ratio of CPU times was more than 400. This difference of 2 orders of magnitude was not expected (!) and investigations were carried out to see if the difference could be explained in terms of:

  • wrong expectations about the relative machine performance
  • problems in implementing the Acorn system for this architecture

To try and track these down, the performance of an inner product operation compiled by the Acorn system and also in CM-FORTRAN was compared. In these tests the Acorn code was one order of magnitude slower than the CM-FORTRAN. The absolute figures are interesting — the FORTRAN code reached speeds of 25 Mflops (millions of FP operations per second). In a second test, the interprocessor communication scheme was altered and one of the benchmarks re-run. This time round it was shown that by using an alternative inter-processor scheme the execution time of the algorithm could be reduced by almost an order of magnitude.

The conclusions drawn were firstly that no evidence could be provided to show that APL is a suitable programming language for the CM system, but also that many of the performance problems could be directly attributed to design choices in the implementation of the Acorn run-time system. More work is needed!