From: "H.W. Stockman" <hwstock@swcp.com>
Subject: Real-life benchmark
Date: 1996/11/17 [thread overview]
Message-ID: <328F96B6.45F1@swcp.com> (raw)
This thread started in comp.lang.fortran, but I thought it
might be interesting here, since it involved a difficult,
real-life, memory-intensive scientific program that has been
run by my employer for some years. The benchmark has similarities
to some SPEC tests, but since it isn't SPEC, there was no way
for the machine/compiler makers to anticipate and wire-in
special options. In fact, the test turned up a few compiler
bugs. Detailed explanation (of what the program does) follows
the table.
================================================================
Machine Compiler Options Time (seconds)
----------------------------------------------------------------
(1) P5-90 LF90 1.1B -nstchk -O1 2726
(2) PPro-200 " -O1 874
(2) PPro-200 " -nstchk -O1 869
(2) PPro-200 LF90 3.0 -O1 -tpp* 862
(2) PPro-200 " -O3 -tpp* 928
(3) P5-133 Salford ?? 1417
(4) 21064A-275 VMS /OPT=LEVEL=4/ 1259
(4) 21064A-275 " /OPT=LEVEL=5/ALIGN 1182
(5) SparcServer Sun -native -O3 -silent 2970
(6) R8000-80 IRIX 6.2 f77 -O3 900
(7) PA-RISC-99 HPUX 9 f77 +OP -WP,-nv,-ur=2 1800
(8) R10000-200 IRIX ?? f77 see note 350
(9) 21164A-500 Unix f77 kf77 -O5 -fkapargs= 274
"tune=ev4"
(10) POWER2-77 AIX xlf? -O3? 630
----------------------------------------------------------------
* or whatever the PPro optimization switch is! Note O3 in
Lahey is not necessarily faster; O3 does interprocedural
optimizations, which don't help matrix math much, and may
use up precious registers.
----------------------------------------------------------------
Machine summary:
1: 8KB(I)/8KB(D) L1; 256KB asynch L2; 40 MB DRAM; Gateway 2000
2: 8KB(I)/8KB(D) L1; 256KB on-board L2; 32 MB EDORAM; Gateway
3: 8KB(I)/8KB(D) L1; 256KB; 24 MB DRAM; ??
4: DEC 2100 4/275: 21064A CPU; 16KB(I)/16KB(D) L1; 4MB L2; lottsa
DRAM... I had a CPU to myself, but times varied up to 4%
(lowest shown).
5: ?? appears to be Sparc 10 generation.
6: SGI Power Challenge R8000 "average" 80 Mhz
7: HP735 99 Mhz
8: 200MHz Origin 2000, R10k, 32K(I)/32K(D) L1, 4 MB L2 running at 133
MHz,
"good options are -O3 -n32 -mips4 -OPT:if_conversion=off
-LNO:opt=1:prefetch=2:prefetch_ahead=3:ou=4,8"
9: AlphaStation 500/500 (500 MHz), 8K(I)/8K(D) L1, 96K L2, 8 MB L3,
128 MB ECC DIMMs
10: IBM RS/6k R20, 77 MHz POWER2, L1 256K(D)/64K(I), L2 ??, 384 MB RAM
===== Why I chose this example ====================================
The program is an integrated finite difference code to
calculate fluid flow and heat transfer in an unsaturated medium;
the relevant matrices are solved by a linear conjugate gradient
method. The latter is significant, since such methods are beginning
to replace more traditional matrix solvers for 3-D problems, and they
don't always benefit from traditional matrix optimizations.
This code is one of 2 floating-point-intensive programs that
consumed large amounts of my time this last year (the other
is very transcendental-intensive, and might be perceived as
favoring the 80x87 architecture, and is hard to port).
The benchmark example models a thermal flow probe buried
in desert soil; I chose a full 3-D example that we used in
analyzing data from the instrument, but I used the "sparse"
gridding so it wouldn't be too hard on systems with low RAM (2880
elements, 8336 interfaces, 64 sinks and sources of heat and air).
In particular, I kept the size small so the program could be
tested on a PPC 604 Mac; ironically, the Mac person has never had the
time to get the benchmark running. Tim Butler tried the benchmark
on an unspecified PPC 603e system with g77, but couldn't get it
to compile (Stefan Deutscher was able to get it to compile under
g77 on a PPro).
The code is f77, and the arrays are static; total allocated array
space is ca. 32 MB. However, only about 12 MB is used by the
current problem; on a 16 MB P5-90 system running under extended
DOS, there is minimal disk activity except at the beginning and
end of the run, so apparently the unused parts of the arrays get
swapped out, never to be swapped back in. Dropping the L2 cache size
from 4 MB to 1 MB on the R10k system caused a ca. 30% performance
hit. Since the 21164A system could hold about 2/3 of the arrays
in L3 cache, the results may be a little skewed.
One person noted there were lots of alignment mismatches reported
by the compiler for COMMON. However, these have no significant
effect on performance; one of my coworkers once aligned all the
COMMONs, only to get ca. 0% speed increase. How can that be?
Well, the code author made sure all heavily-accessed elements are
in aligned commons; the blocks responsible for the error messages
contain a mix of 4-byte integers and 8-byte floats, but are rarely
accessed.
After all was done, I realized that I had biased the problem in
two ways; (1) I made it smaller than is "typical", so it would
run on the Mac; and (2) I picked a problem that always converged
within the requested limits, to keep the total run time reasonable.
Most of my problems don't converge right away, and have to cut
the time steps, which may increase the proportion of transcendentals
and division. That is, the test problem may overemphasize
straight matrix algebra.
I was really impressed with the attention paid to the problem
by the DEC and SGI experts, who squeezed quite a bit of extra
performance out of the code, all through legitimate means.
It is comforting to know that these fellows are available to
give optimization advice, and the advice can make a lot of
difference in performance. It seems that when alpha 21164PC
systems start shipping, they could make inexpensive and very
competitive scientific workstations, and the SGI Origin
200 systems also looked pretty impressive.
Harlan Stockman
next reply other threads:[~1996-11-17 5:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-11-17 5:00 H.W. Stockman [this message]
1996-11-21 5:00 ` Real-life benchmark Carl J. Appellof
1996-11-21 5:00 ` H.W. Stockman
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox