Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* dgemm benchmarks for axp Linux and Dec Unix
@ 1998-03-09 22:44 Robert Williams
  1998-03-11 13:57 ` Robert Williams
  0 siblings, 1 reply; 8+ messages in thread
From: Robert Williams @ 1998-03-09 22:44 UTC (permalink / raw)
  To: axp-list; +Cc: gamess-users

Quick comparison of three different dgemm 
(double precision matrix-matrix multiply) packages
on Linux and Dec Unix.  Matrices were 1012x1012.
The 625 MHz alpha is a Dec 8400 (21164A) running Dec Unix.
The 433 MHz machine is a PC164 (21164A) running Linux.

______________________________________________________________________________
MFlops -- CPU ---- OS -------- Compiler ----- BLAS

691. -- 625 MHz -- Dec Unix -- Dec ---------- Dec DXML dgemm
	       
415. -- 625 MHz -- Dec Unix -- Dec ---------- Kazushige Goto's assembler
dgemm
	       
415. -- 433 MHz -- Linux ----- egcs-980221 -- Kazushige Goto's assembler
dgemm
	       
296. -- 433 MHz -- Linux ----- Dec ---------- Kazushige Goto's assembler
dgemm
	       
 27. -- 625 MHz -- Dec Unix -- Dec ---------- Public Domain dgemm
(netlib)
 23. -- 433 MHz -- Dec Unix -- Dec ---------- Public Domain dgemm
(netlib)
 24. -- 433 MHz -- Linux ----- egcs-980221 -- Public Domain dgemm
(netlib)
______________________________________________________________________________


I used the level 3 blas timing routine: 
      PROGRAM DB3TIM
*  -- Written on 1-July-1988.
*     Jeremy Du Croz and Mick Pont, NAG Central Office.
with N=M=K=1012. Only transa = transb = 'T' are show.
This program has some roundoff problems.
It was written in the days when a large matrix multiply
would take more than a few seconds, so timings are
in seconds.  I haven't had a chance to fix that yet.
So, for example, there are two benchmarks at 415 MFlops,
due to this roundoff problem.  

The assembler dgemm, written specifically for the
21164A, requires that matrix size
must be aligned (a multiple of four).  It drops back
to a somewhat tuned c language routine running at
about half the speed of the assembler when the size
is not aligned.  The assembler routine is specific
to the transa = transb = 'N' case.  Cases requiring
a transpose use the tuned c routines.
The speed in Mflops varied significantly with the
size of the problem.

Generally, the assembler dgemm that was compiled with egcs
and run on the Linux machine appears to perform
significantly better than it does compiled
with Dec compilers and run under Linux
(compare 415 with 296).  So it appears that
entirely native Linux/GNU code may be faster than
DEC's DXML, for which a direct comparison could
not be made here.

-- 
Bob Williams, http://bob.usuf2.usuhs.mil/


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: dgemm benchmarks for axp Linux and Dec Unix
  1998-03-09 22:44 Robert Williams
@ 1998-03-11 13:57 ` Robert Williams
  0 siblings, 0 replies; 8+ messages in thread
From: Robert Williams @ 1998-03-11 13:57 UTC (permalink / raw)
  To: axp-list; +Cc: gamess-users

Robert Williams wrote:
> 
> Quick comparison of three different dgemm
> ...
> I used the level 3 blas timing routine:
>       PROGRAM DB3TIM
> *  -- Written on 1-July-1988.
> This program has some roundoff problems.

I would like to retract these comparisons
I posted earlier until I've looked carefully
at the effects of the roundoff problems in
this old benchmarking code.  Some preliminary
fixes have changed the results downward in a very
disconcerting way.

-- 
Bob Williams, http://bob.usuf2.usuhs.mil/


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: dgemm benchmarks for axp Linux and Dec Unix
  1998-03-11 19:22 GU: Re: dgemm benchmarks for axp Linux and Dec Unix Richard Henderson
@ 1998-03-13 20:00 ` Robert Williams
  1998-03-16 19:09   ` Claus Denk
  0 siblings, 1 reply; 8+ messages in thread
From: Robert Williams @ 1998-03-13 20:00 UTC (permalink / raw)
  To: axp-list; +Cc: gamess-users

Here is an updated comparison of three different dgemm
(double precision matrix-matrix multiply) packages
on axp Linux and Dec Unix.  A few problems in the benchmark
code have been fixed, particularly the roundoff
problem imposed by a 1 second resolution in the Fortran
time() call.  This version implements the dtime(tarray)
call with a resolution of 1/60 second, good enough
for a five second test.  The most notable
result of this fix is a lowering of the DEC DXML numbers. 
Matrices are 1012x1012 for the
public domain (netlib) dgemm, and 3000x3000 for the assembler
dgemm.

Results for two versions of 
Kazushige Goto's assembler dgemm code
are shown.  This code is 15-30% faster
than DEC's own DXML dgemm for alligned problems.
It's remarkable.  
Kazushige Goto's address: <goto@statabo.rim.or.jp>

The 625 MHz alpha is a 6 cpu Dec 8400 (21164A) running Dec Unix.
On chip: 8 Kbyte instruction cache, 8 Kbyte data cache, 96-Kbyte 
write-back second level cache.  On board: 4 Mbyte third level
cache for each cpu.  Tests were run in the forground with
interactive priority while the machine was in full use running
lower priority batch jobs.

The 433 MHz machine is an Alpine Durango PC164 (21164A) running Linux.
On chip: same as for 8400.  On board: 1 Mbyte third level cache.
This machine was otherwise quiescent during the tests.

------------------------------------------------------------------------------
Tests with maximum matrix dimension = 2048 and N=M=K=1012, average of 4
runs;
standard deviations were all about 2 MFlops.
______________________________________________________________________________
MFlops - CPU MHz -- OS --- Compilers ----- BLAS
 
657. --- 625 --- Dec Unix -- Dec -------- Kazushige Goto's fast dgemm
631. --- 625 --- Dec Unix -- Dec -------- Kazushige Goto's V.1 dgemm 
575. --- 625 --- Dec Unix -- Dec -------- Dec DXML dgemm
460. --- 433 --- Linux ----- Dec -------- Kazushige Goto's fast dgemm
453. --- 433 --- Linux --- egcs-980221 -- Kazushige Goto's fast dgemm
407. --- 433 --- Linux --- egcs-980221 -- Kazushige Goto's V.1 dgemm
390. --- 433 --- Linux ----- Dec -------- Kazushige Goto's V.1 dgemm
 27. --- 625 --- Dec Unix -- Dec -------- Public Domain dgemm (netlib)
 23. --- 433 --- Dec Unix -- Dec -------- Public Domain dgemm (netlib)
 24. --- 433 --- Linux --- egcs-980221 -- Public Domain dgemm (netlib)
______________________________________________________________________________

Tests with maximum matrix dimension = 2048 and N=M=K=2000, average of 3
runs;
standard deviations are in parenthesis.
______________________________________________________________________________
MFlops - CPU MHz -- OS --- Compilers ----- BLAS
 
706(5)-- 625 --- Dec Unix -- Dec -------- Kazushige Goto's fast dgemm
668(4)-- 625 --- Dec Unix -- Dec -------- Kazushige Goto's V.1 dgemm 
548(7)-- 625 --- Dec Unix -- Dec -------- Dec DXML dgemm
456(5)-- 433 --- Linux ----- Dec -------- Kazushige Goto's fast dgemm
434(7)-- 433 --- Linux --- egcs-980221 -- Kazushige Goto's fast dgemm
429(1)-- 433 --- Linux ----- Dec -------- Kazushige Goto's V.1 dgemm
390(1)-- 433 --- Linux --- egcs-980221 -- Kazushige Goto's V.1 dgemm

------------------------------------------------------------------------------
Tests with maximum matrix dimension = 4000 and N=M=K=1012, average of 4
runs;
standard deviations are shown in parenthesis.  Paging is a factor here
on the
PC164.  Performance appears to be the same on the 8400 with N=M=2000.
______________________________________________________________________________
MF(std)- CPU MHz -- OS --- Compilers ----- BLAS
 
652(21)- 625 --- Dec Unix -- Dec -------- Kazushige Goto's fast dgemm
630(6)-- 625 --- Dec Unix -- Dec -------- Kazushige Goto's V.1 dgemm 
531(11)- 625 --- Dec Unix -- Dec -------- Dec DXML dgemm
   . --- 433 --- Linux ----- Dec -------- Kazushige Goto's fast dgemm
327(42)- 433 --- Linux --- egcs-980221 -- Kazushige Goto's fast dgemm
331(33)- 433 --- Linux --- egcs-980221 -- Kazushige Goto's V.1 dgemm
   . --- 433 --- Linux ----- Dec -------- Kazushige Goto's V.1 dgemm
______________________________________________________________________________
> 
I used a modified level 3 blas timing routine:
>       PROGRAM DB3TIM
> *  -- Written on 1-July-1988.
> *     Jeremy Du Croz and Mick Pont, NAG Central Office.
changed to use the dtime(tarray) call, 13 March, 1998.
Only transa = transb = 'N' are show.

> The assembler dgemm, written specifically for the
> 21164A, requires that matrix size
> must be aligned (a multiple of four).  It drops back
> to a somewhat tuned c language routine running at
> about half the speed of the assembler when the size
> is not aligned.  The assembler routine is specific
> to the transa = transb = 'N' case.  Cases requiring
> a transpose use the tuned c routines.
> The speed in Mflops varied significantly with the
> size of the problem.



-- 
Bob Williams, http://bob.usuf2.usuhs.mil/


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: dgemm benchmarks for axp Linux and Dec Unix
  1998-03-16 19:09   ` Claus Denk
@ 1998-03-16 19:04     ` Robert Williams
  0 siblings, 0 replies; 8+ messages in thread
From: Robert Williams @ 1998-03-16 19:04 UTC (permalink / raw)
  To: axp-list

Claus Denk wrote:
> 
> Robert Williams wrote:
> > 657. --- 625 --- Dec Unix -- Dec -------- Kazushige Goto's fast dgemm
> > .....
> >  27. --- 625 --- Dec Unix -- Dec -------- Public Domain dgemm (netlib)
> >  23. --- 433 --- Dec Unix -- Dec -------- Public Domain dgemm (netlib)
> >  24. --- 433 --- Linux --- egcs-980221 -- Public Domain dgemm (netlib)
> 
> Are you sure about the last three values ?...
> when compiled under DU I get 115
> Mflops for the same routine. Matrix sizes were different however (small
> matrices 32x32 up to 128x128).

Yes.  I just recompiled on the DEC 8400 with DEC f77
again, and reproduced the 27 GFlops.  I get much higher
numbers with a 100x100 matrix, but the dtime call
has a resolution of 1/60 sec, and at 625 MHz a 100x100
goes in less than 1/10 sec.  

> Where can one obtain the assembler version of K. Goto ?

Kazushige Goto's address: <goto@statabo.rim.or.jp>

Kazushige, what is your policy for releasing and
distributing your code?

-- 
Bob Williams, http://bob.usuf2.usuhs.mil/


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: dgemm benchmarks for axp Linux and Dec Unix
  1998-03-13 20:00 ` Robert Williams
@ 1998-03-16 19:09   ` Claus Denk
  1998-03-16 19:04     ` Robert Williams
  0 siblings, 1 reply; 8+ messages in thread
From: Claus Denk @ 1998-03-16 19:09 UTC (permalink / raw)
  To: axp-list

Robert Williams wrote:
> 
> Here is an updated comparison of three different dgemm
> (double precision matrix-matrix multiply) packages
> on axp Linux and Dec Unix. 
> .....
> .....
>
> MFlops - CPU MHz -- OS --- Compilers ----- BLAS
> 
> 657. --- 625 --- Dec Unix -- Dec -------- Kazushige Goto's fast dgemm
> 631. --- 625 --- Dec Unix -- Dec -------- Kazushige Goto's V.1 dgemm
> 575. --- 625 --- Dec Unix -- Dec -------- Dec DXML dgemm
> 460. --- 433 --- Linux ----- Dec -------- Kazushige Goto's fast dgemm
> 453. --- 433 --- Linux --- egcs-980221 -- Kazushige Goto's fast dgemm
> 407. --- 433 --- Linux --- egcs-980221 -- Kazushige Goto's V.1 dgemm
> 390. --- 433 --- Linux ----- Dec -------- Kazushige Goto's V.1 dgemm
>  27. --- 625 --- Dec Unix -- Dec -------- Public Domain dgemm (netlib)
>  23. --- 433 --- Dec Unix -- Dec -------- Public Domain dgemm (netlib)
>  24. --- 433 --- Linux --- egcs-980221 -- Public Domain dgemm (netlib)
>

Are you shure about the last three values ? The netlib dgemm
performed with 27 Mflops when compiled with g77 on a 500 Mhz -Linux
box we use here. This compares fine with your 24 Mflops having in
mind the frequency difference. But when compiled under DU I get 115
Mflops for the same routine. Matrix sizes were different however (small
matrices 32x32 up to 128x128).

Where can one obtain the assembler version of K. Goto ?

regards, Claus


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: dgemm benchmarks for axp Linux and Dec Unix
@ 1998-03-16 19:23 David Tucker
  1998-03-17 13:26 ` Kazushige Goto
  0 siblings, 1 reply; 8+ messages in thread
From: David Tucker @ 1998-03-16 19:23 UTC (permalink / raw)
  To: axp-list


-----Original Message-----
From: Claus Denk <denk@cica.es>
To: axp-list@redhat.com <axp-list@redhat.com>
Date: Monday, March 16, 1998 10:28 AM
Subject: Re: dgemm benchmarks for axp Linux and Dec Unix


>Are you shure about the last three values ? The netlib dgemm
>performed with 27 Mflops when compiled with g77 on a 500 Mhz -Linux
>box we use here. This compares fine with your 24 Mflops having in
>mind the frequency difference. But when compiled under DU I get 115
>Mflops for the same routine. Matrix sizes were different however (small
>matrices 32x32 up to 128x128).


If the method used by Goto is anything like Strassem's Algorithm, for n x n
matrix multiplication, n should be > 100 to see any real benifit.

Dave


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: dgemm benchmarks for axp Linux and Dec Unix
  1998-03-16 19:23 dgemm benchmarks for axp Linux and Dec Unix David Tucker
@ 1998-03-17 13:26 ` Kazushige Goto
  1998-03-23 19:42   ` New version has no errors Robert Williams
  0 siblings, 1 reply; 8+ messages in thread
From: Kazushige Goto @ 1998-03-17 13:26 UTC (permalink / raw)
  To: axp-list

From: "David Tucker" <davet@altatech.com>
Subject: Re: dgemm benchmarks for axp Linux and Dec Unix

davet> If the method used by Goto is anything like Strassem's Algorithm, for n x n
davet> matrix multiplication, n should be > 100 to see any real benifit.

I uses unrolling, blocking, and taking into consideration of 2'nd cache 
on my routine.  I do not use special technique.  Thus, if n is under
100, you can get faster result(e.g. if n is 40, it takes about
980 MFlops(600MHz 21164A machine)).


From: Robert Williams <bob@bob.usuf2.usuhs.mil>
Subject: Re: dgemm benchmarks for axp Linux and Dec Unix

bob> > Where can one obtain the assembler version of K. Goto ?
bob> 
bob> Kazushige Goto's address: <goto@statabo.rim.or.jp>
bob> 
bob> Kazushige, what is your policy for releasing and
bob> distributing your code?

That's all right to distribute my code with GPL.  But I'm trying to
make more generic and faster code.  If you have interested in my
routine, please check following ftp site.

ftp://ftp.eni.co.jp/.2/Linux-Alpha-JP/ftp.statabo.rim.or.jp/BLAS

This directory contains some DGEMM programs, but the latest version is 
(maybe) the fastest routine.

note.

This program currently does not take consideration into cache
congruence.  So, you must avoid to use power of 2(e.g. 512, 1024, 2048
..) of m, n, k(m, n and k must be aligned).  It's my routine's
defect. But I'm working now to improve about this.

Thanks,
 goto@statabo.rim.or.jp


^ permalink raw reply	[flat|nested] 8+ messages in thread

* New version has no errors
  1998-03-17 13:26 ` Kazushige Goto
@ 1998-03-23 19:42   ` Robert Williams
  0 siblings, 0 replies; 8+ messages in thread
From: Robert Williams @ 1998-03-23 19:42 UTC (permalink / raw)
  To: axp-list

Kazushige,

The new version, 980321,
has completed most of the tests without
errors.  I want to look at the output
carefully next.

Is it possible to make assembler routines
for the _tn case?  This appears to be the
most frequently called option in the 
Gaussian 94 code.  It is used to repeatedly
perform matrix inversions to obtain iteritive
solutions.

  
-- 
Bob Williams, http://bob.usuf2.usuhs.mil/


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~1998-03-23 19:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-03-16 19:23 dgemm benchmarks for axp Linux and Dec Unix David Tucker
1998-03-17 13:26 ` Kazushige Goto
1998-03-23 19:42   ` New version has no errors Robert Williams
  -- strict thread matches above, loose matches on Subject: below --
1998-03-11 19:22 GU: Re: dgemm benchmarks for axp Linux and Dec Unix Richard Henderson
1998-03-13 20:00 ` Robert Williams
1998-03-16 19:09   ` Claus Denk
1998-03-16 19:04     ` Robert Williams
1998-03-09 22:44 Robert Williams
1998-03-11 13:57 ` Robert Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox