[comp.unix.cray] Determining number of memory banks?

bernhold@qtp.ufl.edu (David E. Bernholdt) (03/14/90)

Is there any way in software to determine the number of memory banks
on a given machine?

Failing that, can anyone point me towards a current table of these
values vs. the model, or something similar?

I have a rather old table, which gives this info for some of the
oldest models, but it doesn't include XMP/EA, YMP, or -2
architectures, and considering the detail, there are probably many
more variants which I can't even identify.

What other ways could I find this info out for a given site?
-- 
David Bernholdt			bernhold@qtp.ufl.edu
Quantum Theory Project		bernhold@ufpine.bitnet
University of Florida
Gainesville, FL  32611		904/392 6365

pmk@craycos.com (Peter Klausler) (03/14/90)

	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

bernhold@qtp.ufl.edu (David E. Bernholdt) (03/15/90)

In article <949@red.qtp.ufl.edu> I wrote:
>Is there any way in software to determine the number of memory banks
>on a given machine?

Thanks to the several people who replied by mail, along with Peter
Klausler, who posted...

The target(1) command does what I want -- and provides more than just
the number of banks.  This command is available in both COS and
UNICOS, as Peter pointed out.  The manual I have implies that it is
not available on a -2, but I don't have access to a unicos -2 to check
it out.

In UNICOS, the data is obtained from the target(2) system call, which
returns the data that target(1) prints out, although the structure
isn't documented in the man page.  looking at the include file
<sys/target.h> shows what the structure is, and so it is possible to
easily obtain this info from a running program with a system call.
(although the "primary machine type" it gives is a very large integer
number, and I don't know how to interpret it -- not that its so important)

On COS, I'm sure there is an equivalent system call, but checking
the few manuals I have for COS revealed nothing useful.

I have no idea what they do in CTSS.

Thanks again.
-- 
David Bernholdt			bernhold@qtp.ufl.edu
Quantum Theory Project		bernhold@ufpine.bitnet
University of Florida
Gainesville, FL  32611		904/392 6365

mjt@duck.ncsc.org (Mike Tighe) (03/15/90)

In article <949@red.qtp.ufl.edu> bernhold@qtp.ufl.edu (David E. Bernholdt) writes:
>
>Is there any way in software to determine the number of memory banks
>on a given machine?

Command line:
Execute the command called target(1). This will give you the info for your
machine. 

From C program:
Make a call to the GETPMC(3U) function. This returns an array of values for
your machine.

Further details on each method can be found in the appropriate manual page.
--
Michael Tighe, mjt@ncsc.org  
               (919)-248-1157

ken@wj.msc.umn.edu (Ken Chin-Purcell) (03/15/90)

In article <950@orange19.qtp.ufl.edu>, 
  bernhold@qtp.ufl.edu (David E. Bernholdt) writes:

> The target(1) command does what I want -- and provides more than just
> the number of banks.  This command is available in both COS and
> UNICOS, as Peter pointed out.  The manual I have implies that it is
> not available on a -2, but I don't have access to a unicos -2 to check
> it out.

If you mean a CRAY-2, then yes, target(1) does exist.  
At least it does on our machine (UNICOS 5.0).

\/  Ken Chin-Purcell
<>  also known as ken@msc.umn.edu and (612)626-1340
/\  Minnesota Supercomputer Center, University of Minnesota

lrul00@dixel.Kodak.COM (Richard C. Dempsey) (03/16/90)

In article <950@orange19.qtp.ufl.edu> bernhold@qtp.ufl.edu (David E. Bernholdt) writes:
>In article <949@red.qtp.ufl.edu> I wrote:
>>Is there any way in software to determine the number of memory banks
>>on a given machine?

>The target(1) command does what I want -- and provides more than just
>the number of banks.  This command is available in both COS and
>UNICOS, as Peter pointed out.  The manual I have implies that it is
>not available on a -2, but I don't have access to a unicos -2 to check
>it out.

On the Cray-2 at NCSA, the target command works:

u2 1% target
Primary machine type is:  CRAY-2
   banks    = 128
   numcpus  = 4
   ibufsize = 16
   memsize  = 134217728
   memspeed = 35
   clocktim = 4100
   numclstr = 0
   bankbusy = 13
u2 2% 

I didn't look into the target(2) system call.  Presumably it's there if
the command is there.

Rich Dempsey				dempsey@Kodak.COM
Computational Science Laboratory	(716) 477-3457
Eastman Kodak Company
Rochester, NY 14650-2205