[comp.sys.super] Assembly or ....

mccalpin@loligo.fsu.edu (John McCalpin) (12/02/88)

I notice that no one has discussed supercomputers in this long 
discussion on the merits of learning assembly language.  To achieve
any sort of reasonable performance on a vector supercomputer, you
must know a lot about the architecture.  Some machines are worse
than others --- the CDC/ETA machines and the Cray-2 come to mind as
machines on which it is remarkably easy to get bad performance....

On the other hand, it is almost never necessary for users to _write_
is assembly language on these machines to get good performance - you
just need to know what the vectorizer is able to convert into 
efficient code.  Also on the CDC/ETA machines, the entire instruction
set is available in FTN200 anyway via special calls. (This actually
produces inline code, but they are written as subroutine calls).

John D. McCalpin
Supercomputer Computations Research Institute
The Florida State University
mccalpin@masig1.ocean.fsu.edu

dik@cwi.nl (Dik T. Winter) (12/07/88)

In article <159@loligo.fsu.edu> mccalpin@loligo.UUCP (John McCalpin) writes:
 > I notice that no one has discussed supercomputers in this long 
 > discussion on the merits of learning assembly language.  To achieve
 > any sort of reasonable performance on a vector supercomputer, you
 > must know a lot about the architecture.  Some machines are worse
 > than others --- the CDC/ETA machines and the Cray-2 come to mind as
 > machines on which it is remarkably easy to get bad performance....

This is very true.
 > 
 > On the other hand, it is almost never necessary for users to _write_
 > is assembly language on these machines to get good performance - you
 > just need to know what the vectorizer is able to convert into 
 > efficient code.  Also on the CDC/ETA machines, the entire instruction
 > set is available in FTN200 anyway via special calls. (This actually
 > produces inline code, but they are written as subroutine calls).

But, but ... Programming special calls in FTN200 is not very different
from programming in assembler (META in this case).  Try to port a
program containing special calls.  (For the readers that do not know
FTN200 and its special calls, it is similar to the C asm statement.)
When you rely on the vectorizer you may find you have bad luck (and
especially FTN200 comes to my mind).
Also you have to twist your program to let it compile to an efficient
executable, finding that your program will not port so very well anymore.
And (at least on Cray-1) on vector machines with vector registers
you may find a general improvement when you do things in assembler.
Not that it is *necessary*, but it may help.
-- 
dik t. winter, cwi, amsterdam, nederland
INTERNET   : dik@cwi.nl
BITNET/EARN: dik@mcvax