Determining number of memory banks?

Peter Klausler pmk at craycos.com
Thu Mar 15 00:25:36 AEST 1990


	parameter (l=11,lp=2048,n=640,nn=n*lp)
	integer m (nn), cps (0:l), str
	str = 1
	do 1 i=0,l
	   j = irtc ()
	   do 2 k=1,n
 2	      m (k*str) = m (k*str) + 1
	   cps (i) = irtc () - j
 1	   str = 2*str
	print 3, (i, cps (i), i=0,l)
 3	   format ('2**',i2,': ',i6,:)
	end

Run this, examine the output, and find the least power of two with the
worst performance (highest clock count). This should give you a pretty
good idea of the number of banks on the machine. On a multiprocessor this
code will yield different results on each run, but at the stride that
equals the bank count things won't differ by too much.

You can also run the 'target' command (on COS or UNICOS) to see what the
compilers and libraries are supposed to believe about the machine; it's usually
trustworthy.

-Peter Klausler @ Cray Computer Corp. in Colorado Springs, CO



More information about the Comp.unix.cray mailing list