[comp.os.minix] Dhrystone 2.1 part 1

root@cca.ucsf.edu (Systems Staff) (10/07/89)

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  README.RER clarify.doc Makefile submit.frm
# Wrapped by root@ucsfcca on Fri Oct  6 16:05:20 1989
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'README.RER' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'README.RER'\"
else
echo shar: Extracting \"'README.RER'\" \(4220 characters\)
sed "s/^X//" >'README.RER' <<'END_OF_FILE'
XHere is Reinhold Weicker's DHRYSTONE 2.1 benchmark, slightly modified
Xby me for instrumentation purposes only.  This is an integer CPU
Xbenchmark.  The differences between 2.0 and 2.1 are minor, and
XI believe that 2.0 and 2.1 results are comparable.
X
XI've enclosed a new submission form (note new address for mailings).
XPlease deluge this mailbox (..!uunet!pcrat!dry2) with your results.
XI'll summarize and repost when the dust clears.  Please do not
Xassume that I will pull posted results off of the net (I won't, its
Xtoo much work).
X
XI've attempted to include a Makefile for UNIX and Microsoft C (with ndmake).
XPay particular attention to the HZ parameter, even though your power may
Xbe 50 or 60 hertz, your computer may not be.  You may have to ask someone,
Xread the manual, or check:
X	/usr/include/sys/param.h
X	/usr/include/limits.h		(CLK_TCK==HZ)
Xfor this information.
X
XThere are two versions to run, one with register variables, and one
Xwithout.  Please let the benchmark run for 30,000 loops on sixteen
Xbit machines, and for much longer (a minute or two) on faster machines.
XPlease note that "time(2)" has a resolution of 1 second, and may give
Xvariable results.  No matter how time is measured, a sanity check with
Xa stopwatch is prudent.  We've run into systems that lie about time,
Xand there is always the configuration error problem.  When it comes
Xto time measurement on UNIX, there is no widely adhered to standard.
X
XFor segmented architectures, it is appropriate to submit results for
Xall memory models, as shown below.
X
XThe CODESIZE information is new.  On UNIX, the size command may
Xbe used to get this info:
X	size dhry_1.o dhry_2.o
Xand then add the first number on each line together.  MS-DOS provides
Xno such utility.  I think you have to rummage around the object
Xcode listing.  We are only concerned with the actual object module code
Xsize, and not the size of the loaded program and libraries, or their file
Xsizes.  I've only included one size parameter; use the NOREG or the REG
Xsize, whichever is smaller.
X
XHere's a sample submission of results:
X
XDHRYSTONE 2.1 BENCHMARK REPORTING FORM
XMANUF: IBM
XMODEL: PC/AT
XPROC: 80286
XCLOCK: 8
XOS: Venix
XOVERSION: SVr2.3
XCOMPILER: AT&T cc
XCVERSION: 11/8/84
XOPTIONS: -O
XNOREG: 1450
XREG: 1450
XNOTES: Small Model
XDATE: 03/04/88
XSUBMITTER: pcrat!rick (Rick Richardson)
XCODESIZE: 1901
XMAILTO: uunet!pcrat!dry2
X
XDHRYSTONE 2.1 BENCHMARK REPORTING FORM
XMANUF: IBM
XMODEL: PC/AT
XPROC: 80286
XCLOCK: 8
XOS: Venix
XOVERSION: SVr2.3
XCOMPILER: AT&T cc
XCVERSION: 11/8/84
XOPTIONS: -O -Ml
XNOREG: 1043
XREG: 1043
XNOTES: Large Model
XDATE: 03/04/88
XSUBMITTER: pcrat!rick (Rick Richardson)
XCODESIZE: 2403
XMAILTO: uunet!pcrat!dry2
X
XThe program that processes submission forms is rather dumb.  Please
Xdo not change the order, add or removes lines in the form.  If your
XNOTES are longer than the space provided, then they are too long for
Xthe summary.  Keep it terse, please.
X
XA form consists of all lines between:
X	DHRYSTONE 2.1 BENCHMARK REPORTING FORM
Xand
X	MAILTO: uunet!pcrat!dry2
Xboth lines must be present for the form to be processed.  If
Xa field does not apply or is not known, leave it blank.  The fields
Xare:
X	MANUF:	Computer manufacturer, e.g. AT&T, IBM
X	MODEL:	Model number of computer
X	PROC:	If a microprocessor CPU, the part number, e.g. 68030
X	CLOCK:	Clock in Mhz, if known.  Numeric only, e.g. 16.67
X	OS:	Operating system, e.g. UNIX
X	OVERSION: OS version, e.g. SVR3
X	COMPILER: Compiler name, e.g. cc, Microsoft, or Green Hills
X	CVERSION: Compiler version, e.g. 5.10
X	OPTIONS: Relevant compiler options, e.g. -O3
X	NOREG:	Dhrystones/second, no register attribute
X	REG:	Dhrystones/second, with register attribute
X	NOTES:	Additional, terse comments on one line
X	DATE:	Date of test, US format MM/DD/YY
X	CODESIZE: ".text" size of dhry_1.o plus dhry_2.o.  Do not
X		indicate the "a.out" or ".exe" size.  One number only,
X		in bytes.  Leave blank if unknown.  File sizes are
X		inappropriate.
X	SUBMITTER: uucp or domain address (full name)
X
X--
X		Rick Richardson, President, PC Research, Inc.
X
X(201) 542-3734 (voice, nights)   OR     (201) 389-8963 (voice, days)
Xuunet!pcrat!rick (UUCP)			rick%pcrat.uucp@uunet.uu.net (INTERNET)
X		uunet!pcrat!dry2   (Dhrystone submission forms only)
END_OF_FILE
if test 4220 -ne `wc -c <'README.RER'`; then
    echo shar: \"'README.RER'\" unpacked with wrong size!
fi
# end of 'README.RER'
fi
if test -f 'clarify.doc' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'clarify.doc'\"
else
echo shar: Extracting \"'clarify.doc'\" \(3374 characters\)
sed "s/^X//" >'clarify.doc' <<'END_OF_FILE'
XCLARIFICATION
XThere seems to have been a great deal of confusion over what this
Xbenchmark measures, and how to use these results.  Let me try to clarify
Xthis:
X
X	1) DHRYSTONE is a measure of processor+compiler efficiency in
X	   executing a 'typical' program.  The 'typical' program was
X	   designed by measuring statistics on a great number of
X	   'real' programs.  The 'typical' program was then written
X	   by Reinhold P. Weicker using these statistics.  The
X	   program is balanced according to statement type, as well
X	   as data type.
X
X	2) DHRYSTONE does not use floating point.  Typical programs don't.
X
X	3) DHRYSTONE does not do I/O.  Typical programs do, but then
X	   we'd have a whole can of worms opened up.
X
X	4) DHRYSTONE does not contain much code that can be optimized
X	   by vector processors.  That is why a CRAY doesn't look real
X	   fast, they weren't built to do this sort of computing.
X
X	5) DHRYSTONE does not measure OS performance, as it avoids
X	   calling the O.S.  The O.S. is indicated in the results only
X	   to help in identifying the compiler technology.
X
X	6) DHRYSTONE is not perfect, but is a hell of a lot better than
X	   the "sieve", or "SI".
X
X	7) DHRYSTONE gives results in dhrystones/second.  Bigger
X	   numbers are better.  As a baseline, the original IBM PC
X	   gives around 300-400 dhrystones/second with a good compiler.
X	   The fastest machines today are approaching 100,000.
X
XIf somebody asked me to pick out the best machine for the money, I
Xwouldn't look at just the results of DHRYSTONE.  I'd probably:
X
X	1) Run DHRYSTONE to get a feel for the compiler+processor
X	   speed.
X	2) Run any number of benchmarks to check disk I/O bandwidth,
X	   using both sequential and random read/writes.
X	3) Run a multitasking benchmark to check multi-user response
X	   time.  Typically, these benchmarks run several types of
X	   programs such as editors, shell scripts, sorts, compiles,
X	   and plot the results against the number of simulated users.
X	4) If appropriate for the intended use, run something like
X	   WHETSTONE, to determine floating point performance.
X	5) If appropriate for intended use, run some programs which do
X	   vector and matrix computations.
X	6) Figure out what the box will:
X		- cost to buy
X		- cost to operate and maintain
X		- be worth when it is sold
X		- be worth if the manufacturer goes out of business
X	7) Having done the above, I probably have a hand-full of
X	   machines which meet my price/performance requirements.
X	   Now, I find out if the applications programs I'd like
X	   to use will run on any of these machines.  I also find
X	   out how much interest people have in writing new software
X	   for the machine, and look carefully at the migration path
X	   I will have to take when I reach the (inevitable) limits
X	   of the machine.
X
XTo summarize, DHRYSTONES by themselves are not anything more than
Xa way to win free beers when arguing 'Box-A versus Box-B' religion.
XThey do provide insight into Box-A/Compiler-A versus Box-A/Compiler-B
Xcomparisons.
X
XA SPECIAL THANKS
XI didn't write the DHRYSTONE benchmark.  Rheinhold Weicker did. He has
Xcertainly provided us with a useful tool for benchmarking, and is
Xto be congratulated.
X
X			Rick Richardson
X			PC Research, Inc.
X			(201) 389-8963 (9-17 EST)
X			(201) 542-3734 (7-9,17-24 EST)
X			...!uunet!pcrat!rick	(normal mail)
X			...!uunet!pcrat!dry2	(results only)
X
X
X
END_OF_FILE
if test 3374 -ne `wc -c <'clarify.doc'`; then
    echo shar: \"'clarify.doc'\" unpacked with wrong size!
fi
# end of 'clarify.doc'
fi
if test -f 'Makefile' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Makefile'\"
else
echo shar: Extracting \"'Makefile'\" \(3725 characters\)
sed "s/^X//" >'Makefile' <<'END_OF_FILE'
X#
X#	Adjust for your system!
X#
X#	Common options for generic UNIX and Microsoft C (under DOS)
X#	are listed here.  You can change them by switching the order,
X#	placing the ones you want last.  Pay particular attention to
X#	the HZ parameter, which may or may not be listed in some
X#	header file on your system, such as <sys/param.h> or <limits.h>
X#	(as CLK_TCK).  Even if it is listed, it may be incorrect.
X#	Also, some operating systems (notably some (all?) versions
X#	of Microport UNIX) lie about the time.  Sanity check with a
X#	stopwatch.
X#
X#	For Microsoft C under DOS, you need a real make, not MSC make,
X#	to run this Makefile.  The public domain "ndmake" will suffice.
X#
XCC=		cl			# C compiler name goes here (MSC)
XCC=		cc			# C compiler name goes here (UNIX)
X
XPROGS=		msc			# Programs to build (MSC)
XPROGS=		unix			# Programs to build (UNIX)
X
XTIME_FUNC=	-DMSC_CLOCK		# Use Microsoft clock() for measurement
XTIME_FUNC=	-DTIME			# Use time(2) for measurement
XTIME_FUNC=	-DTIMES			# Use times(2) for measurement
XHZ=		50			# Frequency of times(2) clock ticks
XHZ=		60			# Frequency of times(2) clock ticks
XHZ=		100			# Frequency of times(2) clock ticks
XHZ=		1			# Give bogus result unless changed!
XHZ=		60			# Frequency of times(2) clock ticks
X
XSTRUCTASSIGN=				# Compiler can assign structs
XSTRUCTASSIGN=	-DNOSTRUCTASSIGN	# Compiler cannot assign structs
X
XENUMS=					# Compiler does have enum type
XENUMS=		-DNOENUMS		# Compiler doesn't have enum type
X
XOPTIMIZE=	-Ox -G2			# Optimization Level (MSC, 80286)
XOPTIMIZE=	-O			# Optimization Level (generic UNIX)
X
XLFLAGS=					#Loader Flags
X
XCFLAGS=	$(OPTIMIZE) $(TIME_FUNC) -DHZ=$(HZ) $(ENUMS) $(STRUCTASSIGN) $(CFL)
X
X#
X#		You shouldn't need to touch the rest
X#
XSRC=		dhry_1.c dhry_2.c
XHDR=		dhry.h
X
XUNIX_PROGS=	dry2 dry2reg
XMSC_PROGS=	sdry2.exe sdry2reg.exe mdry2.exe mdry2reg.exe \
X		ldry2.exe ldry2reg.exe cdry2.exe cdry2reg.exe \
X		hdry2.exe hdry2reg.exe
X
X# Files added by rer:
XFILES1=		README.RER clarify.doc Makefile submit.frm
X# Reinhold's files:
XFILES2=		Rationale $(HDR) $(SRC)
XFILES3=		dhry.p
X
Xall:	$(PROGS)
X
Xunix:	$(UNIX_PROGS)
X
Xmsc:	$(MSC_PROGS)
X
Xdry2:		$(SRC) $(HDR)
X		$(CC) $(CFLAGS) $(SRC) $(LFLAGS) -o $@
X
Xdry2reg:	$(SRC) $(HDR)
X		$(CC) $(CFLAGS) -DREG=register $(SRC) $(LFLAGS) -o $@
X
Xsdry2.exe:	$(SRC) $(HDR)
X		$(CC) -AS $(CFLAGS) $(SRC) $(LFLAGS) -o $@
X
Xsdry2reg.exe:	$(SRC) $(HDR)
X		$(CC) -AS $(CFLAGS) -DREG=register $(SRC) $(LFLAGS) -o $@
X
Xmdry2.exe:	$(SRC) $(HDR)
X		$(CC) -AM $(CFLAGS) $(SRC) $(LFLAGS) -o $@
X
Xmdry2reg.exe:	$(SRC) $(HDR)
X		$(CC) -AM $(CFLAGS) -DREG=register $(SRC) $(LFLAGS) -o $@
X
Xldry2.exe:	$(SRC) $(HDR)
X		$(CC) -AL $(CFLAGS) $(SRC) $(LFLAGS) -o $@
X
Xldry2reg.exe:	$(SRC) $(HDR)
X		$(CC) -AL $(CFLAGS) -DREG=register $(SRC) $(LFLAGS) -o $@
X
Xcdry2.exe:	$(SRC) $(HDR)
X		$(CC) -AC $(CFLAGS) $(SRC) $(LFLAGS) -o $@
X
Xcdry2reg.exe:	$(SRC) $(HDR)
X		$(CC) -AC $(CFLAGS) -DREG=register $(SRC) $(LFLAGS) -o $@
X
Xhdry2.exe:	$(SRC) $(HDR)
X		$(CC) -AH $(CFLAGS) $(SRC) $(LFLAGS) -o $@
X
Xhdry2reg.exe:	$(SRC) $(HDR)
X		$(CC) -AH $(CFLAGS) -DREG=register $(SRC) $(LFLAGS) -o $@
X
Xshar:	dry2shar.1 dry2shar.2 dry2shar.3
X
Xarc:	$(FILES1) $(FILES2) $(FILES3)
X	arc a dry2.arc $(FILES1) $(FILES2) $(FILES3)
X
Xdry2shar.1: $(FILES1)
X	shar -p X $(FILES1) >$@
X
Xdry2shar.2: $(FILES2)
X	shar -p X $(FILES2) >$@
X
Xdry2shar.3: $(FILES3)
X	shar -p X $(FILES3) >$@
X
Xclean:
X	-rm -f *.o *.obj
X
Xclobber: clean
X	-rm -f $(UNIX_PROGS) $(MSC_PROGS) dry2shar.* dry2.arc
X
Xpost:	dry2shar.1	dry2shar.2	dry2shar.3
X	for i in 1 2 3;\
X	do\
X		cat HEADERS BOILER.$$i dry2shar.$$i |\
X		inews -h -t "Dhrystone 2.1 ($$i of 3)" -n comp.arch;\
X	done
X
Xmail:	dry2shar.1	dry2shar.2	dry2shar.3
X	for i in 1 2 3;\
X	do\
X		cat BOILER.$$i dry2shar.$$i |\
X		mailx -s "Dhrystone 2.1 ($$i of 3)" $(ADDR);\
X	done
END_OF_FILE
if test 3725 -ne `wc -c <'Makefile'`; then
    echo shar: \"'Makefile'\" unpacked with wrong size!
fi
# end of 'Makefile'
fi
if test -f 'submit.frm' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'submit.frm'\"
else
echo shar: Extracting \"'submit.frm'\" \(180 characters\)
sed "s/^X//" >'submit.frm' <<'END_OF_FILE'
XDHRYSTONE 2.1 BENCHMARK REPORTING FORM
XMANUF:
XMODEL:
XPROC:
XCLOCK:
XOS:
XOVERSION:
XCOMPILER:
XCVERSION:
XOPTIONS:
XNOREG:
XREG:
XNOTES:
XDATE:
XSUBMITTER:
XCODESIZE:
XMAILTO: uunet!pcrat!dry2
END_OF_FILE
if test 180 -ne `wc -c <'submit.frm'`; then
    echo shar: \"'submit.frm'\" unpacked with wrong size!
fi
# end of 'submit.frm'
fi
echo shar: End of shell archive.
exit 0