[comp.sys.sun] SUN-4 FPU

jan@eik.ii.uib.no (01/31/89)

In v7n114 Ruth Milner writes that all Sun-4 series machines come installed
with the FPU. This is -unfortunately- dead wrong. The Sun-4/2x0 is
delivered with the FPU, for the Sun-4/110 it is an option. (Here in Norway
it costs an additional $3000.)

She is right when she states that it is not necessary to configure it into
the kernel. Also during boot the system prints out a line on the console,
stating whether an FPU was found or not. (I haven't checked if it has a
program comparable to the 'mc68881version', but I don't think so.)

It is our experience that the Sun-4/110 is worthless for floating-point
intensive applications *without* the FPU. (In fact it is embarrassingly
bad, it cannot even compare with a Sun-2! If anybody has different
experiences we sure would like to hear about it.)

So if your applications are floating-point intensive, get the FPU. If you
run AI-applications start saving up money for memory-upgrades. (LISP works
on 8MB, forget about using SPE with less than 16MB.)

If anybody thought this is a FLAME, it isn't *really*. It just points out
that a nice machine could have been even nicer ... (And it would have been
nice to have known about the floating-point performance before we bougth
the machines.)


Jan Berger Henriksen
Institute of Informatics		E-mail:	jan@eik.ii.uib.no
University of Bergen				jan%eik.ii.uib.no@tor.nta.no
Allegt. 55
N - 5007 Bergen,
Norway

montanaro@sprite.steinmetz.ge.com (02/09/89)

The Sun-4 compilers always assume that an FPU is installed. Without an FPU
(as on Bruce Barnett's Sun-4/110) attempts to execute FP instructions
cause a trap to the kernel, where they are then executed in software. I
tried compiling a small floating point program on a Solborne. Their
compiler (and I assume Sun's as well) accepts -fsoft on the command line
but ignores it.  The generated assembler still contains FPU instructions,
not calls to software FP routines.

It makes you wonder if Sun actually tried any floating point stuff on
non-FPU graced Sun-4/110s before they began letting them out the door.

--
Skip Montanaro (montanaro@sprite.steinmetz.ge.com, montanaro@ge-crd.arpa)

marcel@uunet.uu.net (Marcel Bernards) (02/19/89)

In article <MONTNARO.89Feb1125820@sprite.steinmetz.ge.com> montanaro@sprite.steinmetz.ge.com writes:
>The Sun-4 compilers always assume that an FPU is installed. Without an FPU
>(as on Bruce Barnett's Sun-4/110) attempts to execute FP instructions
>cause a trap to the kernel, where they are then executed in software...

This is not quite true.

I tried some testprograms on our 4/110 and our 4/280S SUN.  The 4/110 is
delivered without FPU yes -> ;-(

The test program (from barnett@steinmetz.ge.com (Bruce Barnett)) I tested
results in the following data 

SUN 4/280-S Weitec Co's 
f=100000
0.2u 0.2s 0:00 68% 0+248k 9+0io 5pf+0w

SUN 4/110 NOCO
f=100000
1.2u 31.1s 0:32 99% 0+136k 2+9io 2pf+0w

SUN 3/50 68881 Diskless
f=100000
7.5u 2.2s 0:18 53% 0+96k 5+0io 7pf+0w

SUN 3/60 COLOR W SCSI + 68881 
f=100000
4.4u 1.1s 0:06 84% 0+96k 2+1io 2pf+0w

I used the following program with csh time command

main() {
      int i = 100000;
      double f = 0.0;
      while (i--) f += 1.0;
      printf("f=%g\n",f);
}

So SUN 4/110 _does_ emulate FP .

But VERY VERY SLOOOOOOOOW !!!!!!!!!!!

I think i'm gonna screw some budgets there ordering FPU for a 4/110 :-)

Marcel Bernards, UNIX & Net sysadm Netherlands Energy Research Foundation ECN
P.O. Box 1, 1755 ZG Petten, UUCP: marcel@ecn.UUCP, marcel%ecn.uucp@uunet.uu.net
PHONE: -31 2246 4342 ,EARN: ESU0130@HPEENR51L

barnett@uunet.uu.net (Bruce Barnett) (03/04/89)

Marcel Bernards says:
>So SUN 4/110 _does_ emulate FP .

Maybe there is a communication problem, but Skip and I never said the Sun
4/110 doesn't emulate the FPU.

The problem is that the emulation appears to require a kernal trap.  Look
at the time the program spends in the system mode:

>SUN 4/110 NOCO
>1.2u 31.1s 0:32 99% 0+136k 2+9io 2pf+0w

That's thiry one seconds in the kernel (system) mode.

The results for a 3/50 without FPU is:
	6.0u 0.2s 0:06 94% 0+72k 0+1io 0pf+0w

And the system time is 0.2 seconds. 

Of *course* the Sun 4 is emulating the FPU.

I just wished I could use a library routine, the GNU cc compiler,
ANYTHING, so I wouldn't have to suffer from all those traps. Does anyone
have any ideas not requiring $$?

Does anyone have any ideas on how I can measure the number of traps I get
so I can estimate the penalty I pay? (I use NeWS a lot).

Of course I could always use a 3/50 as a compute server....
--
Bruce G. Barnett  <barnett@ge-crd.ARPA> <barnett@steinmetz.ge.com>
		uunet!steinmetz!barnett

marcel@nluug.nl (Marcel Bernards) (03/04/89)

Bruce G. Barnett writes:
>Maybe there is a communication problem, but Skip and I never said  
>the Sun 4/110 doesn't emulate the FPU.

You are right: It was a communication problem.  But is was on a late
friday afternoon and my eyes were getting square by looking to long at my
1152 * 900 Monochrome pixels ;-)

Sorry, my apologies......

>Does anyone have any ideas on how I can measure the number of traps I get
>so I can estimate the penalty I pay? (I use NeWS a lot).

ps, time, vmstat and pstat does not give appropriate information for
kernel I also want a trap logger (like perfmeter), but I'm not a Kernel
Guru :-(

.signature