Coder Social home page Coder Social logo

byte-unixbench's Introduction

byte-unixbench

UnixBench is the original BYTE UNIX benchmark suite, updated and revised by many people over the years.

The purpose of UnixBench is to provide a basic indicator of the performance of a Unix-like system; hence, multiple tests are used to test various aspects of the system's performance. These test results are then compared to the scores from a baseline system to produce an index value, which is generally easier to handle than the raw scores. The entire set of index values is then combined to make an overall index for the system.

Some very simple graphics tests are included to measure the 2D and 3D graphics performance of the system.

Multi-CPU systems are handled. If your system has multiple CPUs, the default behaviour is to run the selected tests twice -- once with one copy of each test program running at a time, and once with N copies, where N is the number of CPUs. This is designed to allow you to assess:

  • the performance of your system when running a single task
  • the performance of your system when running multiple tasks
  • the gain from your system's implementation of parallel processing

Do be aware that this is a system benchmark, not a CPU, RAM or disk benchmark. The results will depend not only on your hardware, but on your operating system, libraries, and even compiler.

History

UnixBench was first started in 1983 at Monash University, as a simple synthetic benchmarking application. It was then taken and expanded by Byte Magazine. Linux mods by Jon Tombs, and original authors Ben Smith, Rick Grehan, and Tom Yager. The tests compare Unix systems by comparing their results to a set of scores set by running the code on a benchmark system, which is a SPARCstation 20-61 (rated at 10.0).

David C. Niemi maintained the program for quite some time, and made some major modifications and updates, and produced UnixBench 4. He later gave the program to Ian Smith to maintain. Ian subsequently made some major changes and revised it from version 4 to version 5.

Thanks to Ian Smith for managing the release up to 5.1.3. As of the next release (5.2), Anthony F. Voellm is going to help maintain the code base. The releases will happen once there are enough pull requests to warrant a new release.

The general process will be the following:

  • Open a bug announcing that a new release will happen.
  • Everything on the dev branch will be run.
  • Code will move from the dev branch into main and be tagged. Bug fix releases with increment the subversion and major functionality changes will increase the major version.

Included Tests

UnixBench consists of a number of individual tests that are targeted at specific areas. Here is a summary of what each test does:

Dhrystone

Developed by Reinhold Weicker in 1984. This benchmark is used to measure and compare the performance of computers. The test focuses on string handling, as there are no floating point operations. It is heavily influenced by hardware and software design, compiler and linker options, code optimization, cache memory, wait states, and integer data types.

Whetstone

This test measures the speed and efficiency of floating-point operations. This test contains several modules that are meant to represent a mix of operations typically performed in scientific applications. A wide variety of C functions including sin, cos, sqrt, exp, and log are used as well as integer and floating-point math operations, array accesses, conditional branches, and procedure calls. This test measure both integer and floating-point arithmetic.

execl Throughput

This test measures the number of execl calls that can be performed per second. execl is part of the exec family of functions that replaces the current process image with a new process image. It and many other similar commands are front ends for the function execve().

File Copy

This measures the rate at which data can be transferred from one file to another, using various buffer sizes. The file read, write and copy tests capture the number of characters that can be written, read and copied in a specified time (default is 10 seconds).

Pipe Throughput

A pipe is the simplest form of communication between processes. Pipe throughput is the number of times (per second) a process can write 512 bytes to a pipe and read them back. The pipe throughput test has no real counterpart in real-world programming.

Pipe-based Context Switching

This test measures the number of times two processes can exchange an increasing integer through a pipe. The pipe-based context switching test is more like a real-world application. The test program spawns a child process with which it carries on a bi-directional pipe conversation.

Process Creation

This test measure the number of times a process can fork and reap a child that immediately exits. Process creation refers to actually creating process control blocks and memory allocations for new processes, so this applies directly to memory bandwidth. Typically, this benchmark would be used to compare various implementations of operating system process creation calls.

Shell Scripts

The shells scripts test measures the number of times per minute a process can start and reap a set of one, two, four and eight concurrent copies of a shell scripts where the shell script applies a series of transformation to a data file.

System Call Overhead

This estimates the cost of entering and leaving the operating system kernel, i.e., the overhead for performing a system call. It consists of a simple program repeatedly calling the getpid (which returns the process id of the calling process) system call. The time to execute such calls is used to estimate the cost of entering and exiting the kernel.

Graphical Tests

Both 2D and 3D graphical tests are provided; at the moment, the 3D suite in particular is very limited, consisting of the ubgears program. These tests are intended to provide a very rough idea of the system's 2D and 3D graphics performance. Bear in mind, of course, that the reported performance will depend not only on hardware, but on whether your system has appropriate drivers for it.

License

This project is released under the GPL v2 license.

byte-unixbench's People

Contributors

gstrauss avatar jiebinn avatar kdlucas avatar lipzhu avatar longerzone avatar mbrukman avatar mihalis68 avatar pdeng6 avatar rtoax avatar sunmin89 avatar t2-kob avatar tomcatzh avatar traveller42 avatar tycho avatar voellm avatar yummypeng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

byte-unixbench's Issues

Pipe-based Context Switching - slave write failed: Broken pipe

What steps will reproduce the problem?
1. Execute the test harness with ./Run
2. Notice that while the Pipe-based Context Switching test is running, it
fails with the error message: "slave write failed: Broken pipe; aborting"
3. This only happens on certain platforms, as I don't see this occur on all
hardware/software configurations. But I have seen it happen on certain
Ubuntu releases.

I'm currently seeing this with Ubuntu Karmic derivative with the 2.6.30
kernel, i686, running on an ASUS EEE PC with INtel Atom CPU N280 @ 1.66ghz.

Original issue reported on code.google.com by [email protected] on 3 Nov 2009 at 12:00

Starting next release v5.2

In the coming week+ I going to do an update release. If you have bug fixes or change please submit a pull release to the dev branch.

Error on FreeBSD 10: ERROR: slave read failed: No such file or directory

There is intermittent error on FreeBSD 10.

Pipe-based Context Switching -- 1 copy
==> "/mnt/xxx/byte-unixbench/UnixBench/pgms/context1" 10 2>&1 >> "/mnt/xxx/byte-unixbench/UnixBench/results/test-2016-01-12-03.log"

#### Pass 1


# COUNT0: 1653905
# COUNT1: 1
# COUNT2: lps
# ERROR: slave read failed: No such file or directory
# elapsed: 10.034850
# pid: 2346
# status: 0

Hack:

src/context1.c:
if (read(p1[0], (char *)&check, sizeof(check)) != sizeof(check)) {
                                if ((errno != 0) && (errno != EINTR))
                                        perror("slave read failed");
                                exit(1);
}

Additional note:

You incorrectly check return value of read(). errno should be checked only if read() returns -1, otherwise it may contain garbage (as it occurs on Freebsd 10).

Please do include math library in your makefiles

Q. What steps will reproduce the problem?
./Run

Q. What is the expected output? What do you see instead?
Usually compilers cannot find functions like sin cos etc without this

Q. What version of the product are you using? On what operating system?
Ubuntu 12.04

You can see the diff file as an attachment.

Original issue reported on code.google.com by [email protected] on 24 Nov 2012 at 5:15

Attachments:

Taming variance of UnixBench results when comparing systems

UnixBench has been shown to be very sensitive to compiler versions [1], compiles with out-dated [2] performance compiler optimizations, and includes hacks to avoid dead-code elimination by the compiler [3]. It seems one of the original intentions of the UnixBench was to have the ability to measure compiler performance[4], as a measurement of the overall system performance, reduced into a single metric[5].

Today, UnixBench it still being used to compare performance between systems, but most people have forgotten to read the warnings, and caveats included in both in the README.md and USAGE files included with this benchmark, which even the authors warned about the pitfalls when interpreting the results of different systems[6]. Even more worrying is how this benchmark is promoted[7] as 'the' single metric to look at when comparing different systems, even when these systems use different OSes, compiler, virtualization technologies, and even different architectures.

A lot of these problems seems to stem from the variability introduced by the compiler, and different versions of the linked libraries used by the benchmark.

Since UnixBench, Today, is mostly used as a benchmark to compare the performance across different infrastructure providers, I propose as a way to reduce the variability introduced by the factors mentioned above, to move UnixBench included benchmarks to be statically, binary-reproducible compiled binaries, which can be verified by means of a hash, for each major architecture out there.

The benefits of statically, binary-reproducible binaries would mean that compiler effects would be minimized, since binaries are distributed pre-compiled, it would also mean that because it is statically compiled, different versions of the dynamically linked libraries would not introduce variability. Finally because it is binary-reproducible, we can cross-verify, and compare results of the identical copies of the benchmark being executed, by means of hashing the binaries.

What are your thoughts? Do you think this a bad idea?

Thanks,
Carlos

[1] Compilers Love Messing With Benchmarks
[2] Issue #17
[3] Issue #10
[4] https://github.com/kdlucas/byte-unixbench/blob/master/UnixBench/USAGE#L351-L358
[5] https://github.com/kdlucas/byte-unixbench/blob/master/UnixBench/USAGE#L174
[6] https://github.com/kdlucas/byte-unixbench/blob/master/UnixBench/USAGE#L348-L349
[7] http://serverbear.com/benchmarks/vps

fscopy test case needs improvements

What steps will reproduce the problem?
1. fscopy test cases

What is the expected output? What do you see instead?

1. The test cases with a biggest file of 4096 buffer and 8000 blocks is ~ 32MB 
file size. When I run this on a Haswell server (Intel(R) Xeon(R) CPU E5-2690 
v3), this fits entirely in the L3 memory when I run only one guest. Even though 
the test case might be valid the enviroment or scenario where only one guest is 
running will give undue advantage as L3 is shared. This requires that the size 
of file be increased

2. I tried a cp command on ubuntu 15.04 on a file which contains only "0" as 
contents

read(3, "0\n", 131072)                  = 2
write(4, "0\n", 2)                      = 2

and I see that it uses a buffer size of 128k. I also noticed the same on ppc64 
version of ubuntu15.04

 So, the buffer size also needs to be increased.

What version of the product are you using? On what operating system?

ubuntu 5.1.3 / ubuntu 15.04 (ext4)

Please provide any additional information below.

In RHEL 7.0 (xfs) the cp command uses 64k buffer size.
So, it is necessary that the buffer and block size be increased.



Original issue reported on code.google.com by [email protected] on 30 Mar 2015 at 1:39

Run: "Pipe-based Context Switching": slave read failed: Invalid argument; aborting

What steps will reproduce the problem?
1. Run "perl Run" on OSX 10.9

What is the expected output? What do you see instead?

I expect UnixBench results.

Here's the output instead:

perl Run
make all
Checking distribution of files
./pgms  exists
./src  exists
./testdir  exists
./tmp  exists
./results  exists
Use of uninitialized value $coll in substitution (s///) at Run line 741.
Use of uninitialized value $coll in sprintf at Run line 742.
sh: 3dinfo: command not found
sh: runlevel: command not found

   #    #  #    #  #  #    #          #####   ######  #    #   ####   #    #
   #    #  ##   #  #   #  #           #    #  #       ##   #  #    #  #    #
   #    #  # #  #  #    ##            #####   #####   # #  #  #       ######
   #    #  #  # #  #    ##            #    #  #       #  # #  #       #    #
   #    #  #   ##  #   #  #           #    #  #       #   ##  #    #  #    #
    ####   #    #  #  #    #          #####   ######  #    #   ####   #    #

   Version 5.1.3                      Based on the Byte Magazine Unix Benchmark

   Multi-CPU version                  Version 5 revisions by Ian Smith,
                                      Sunnyvale, CA, USA
   January 13, 2011                   johantheghost at yahoo period com

Use of uninitialized value in printf at Run line 1369.
Use of uninitialized value in printf at Run line 1567.

1 x Dhrystone 2 using register variables  1 2 3 4 5 6 7 8 9 10

1 x Double-Precision Whetstone  1 2 3 4 5 6 7 8 9 10

1 x Execl Throughput  1 2 3

1 x File Copy 1024 bufsize 2000 maxblocks  1 2 3

1 x File Copy 256 bufsize 500 maxblocks  1 2 3

1 x File Copy 4096 bufsize 8000 maxblocks  1 2 3

1 x Pipe Throughput  1 2 3 4 5 6 7 8 9 10

1 x Pipe-based Context Switching  1
**********************************************
Run: "Pipe-based Context Switching": slave read failed: Invalid argument; 
aborting



Original issue reported on code.google.com by [email protected] on 27 Jan 2014 at 7:20

Can't do default run completely with > 16 CPUs

What steps will reproduce the problem?
Run with the default command line ('./Run') on a machine with > 16 CPUs.

What is the expected output? What do you see instead?
Expected would be a run with a single serial run, followed by an N-way parallel 
run. Instead, it skips all of the tests because of a hardcoded limit of '16'.

What version of the product are you using? On what operating system?
v5.1.3 on Linux 2.6.32.

Please provide any additional information below.
Is there a reason for the hardcoded limit of 16-way parallelism? It seems 
reasonable to be able to match the number of processors detected in the system.

Original issue reported on code.google.com by [email protected] on 6 Mar 2011 at 11:58

Plotting

Hi.
Is there an easy way to plot graphs out of the final results?

Loop in arith.c being optimized away by GCC 4.2

What steps will reproduce the problem?
1. Download and run on a recent distro (Ubuntu 12, CentOS 6)

What is the expected output? What do you see instead?
Any tests that utilize arith.c (arithoh, long, short, etc) will return 0 for 
iter instead of the expected value.

What version of the product are you using? On what operating system?
5.1.3 on Ubuntu 12.04 and CentOS 6.

Please provide any additional information below.
This is trivially fixed by changing the definition of the iter variable in 
arith.c to volatile.

The existing code attempts to prevent the loop from being optimized away by 
feeding the result variable back in to the dumb_stuff function. That should be 
completely unnecessary if iter is defined as volatile.

Original issue reported on code.google.com by [email protected] on 25 Apr 2013 at 12:56

cat: */unixbench.logo:no such file or directory

What steps will reproduce the problem?
1. when we are in the unixbench directory ,use ./Run arg ===>that's right
But,when we are not there ,such as: USAGE: /home/unixbench/Run arg

HERE the error message

even we change the Run file on 《system("cat 
\"${BINDIR}/unixbench.logo\"");》 
that's also can't run either.

maybe it is the <BINDIR> variable problem,but i am not used to perl

PLEASE  

3Q

Original issue reported on code.google.com by [email protected] on 11 Nov 2014 at 10:03

0 CPUs reported on Quad G5 running YellowDog Linux 6.2

What steps will reproduce the problem?
1. Download and decompress
2. Comment out graphics test per instructions in README
3. execute make
4. execute Run

What is the expected output? What do you see instead?
Quad-core G5 has 4 CPUs, but 0 CPUs are reported. Please see additional info 
below.

What version of the product are you using? On what operating system?
v5.1.2 on YDL 6.2 (2.6.29-3.ydl61.4)

Please provide any additional information below.

Output snippet:
========================================================================
   BYTE UNIX Benchmarks (Version 5.1.2)

   System: sorrel: GNU/Linux
   OS: GNU/Linux -- 2.6.29-3.ydl61.4 -- #1 SMP Mon Sep 7 14:50:27 PDT 2009
   Machine: ppc64 (ppc64)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   09:51:37 up 18:57,  2 users,  load average: 0.22, 0.70, 0.70; runlevel 3

------------------------------------------------------------------------
Benchmark Run: Tue Nov 09 2010 09:51:37 - 10:19:32
0 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables        5749777.3 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     1246.8 MWIPS (9.7 s, 7 samples)
Execl Throughput                               2021.4 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        190662.5 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks           57739.1 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        474500.7 KBps  (30.0 s, 2 samples)
Pipe Throughput                              401805.7 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 120129.4 lps   (10.0 s, 7 samples)
Process Creation                               6058.6 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   3675.4 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   1057.4 lpm   (60.0 s, 2 samples)
System Call Overhead                         567026.7 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0    5749777.3    492.7
Double-Precision Whetstone                       55.0       1246.8    226.7
Execl Throughput                                 43.0       2021.4    470.1
File Copy 1024 bufsize 2000 maxblocks          3960.0     190662.5    481.5
File Copy 256 bufsize 500 maxblocks            1655.0      57739.1    348.9
File Copy 4096 bufsize 8000 maxblocks          5800.0     474500.7    818.1
Pipe Throughput                               12440.0     401805.7    323.0
Pipe-based Context Switching                   4000.0     120129.4    300.3
Process Creation                                126.0       6058.6    480.8
Shell Scripts (1 concurrent)                     42.4       3675.4    866.8
Shell Scripts (8 concurrent)                      6.0       1057.4   1762.3
System Call Overhead                          15000.0     567026.7    378.0
                                                                   ========
System Benchmarks Index Score                                         490.6

Original issue reported on code.google.com by [email protected] on 9 Nov 2010 at 3:37

Invalid CPU count with offline CPUs

What steps will reproduce the problem?
1. Put some "middle" CPUs offline (example: cpus 1 and 2 on a 4 cpus system). 
This can be done using "echo 0 > /sys/devices/system/cpu/cpuX/online".
2. Run test


What is the expected output? What do you see instead?

Unixbench should count 2 CPUs but counts 4, this is due to getCpuInfo routine 
which uses CPU ID as array index.


What version of the product are you using? On what operating system?

UnixBench 5.1.3, will behave like this on all systems


Please provide any additional information below.

The routine is also not written properly, the "processor : 0" line is not 
parsed because of the "next if (!$prop || !$val);" line. Thankfully the $cpu is 
initialized to 0 so there is no functionnal issue there.

I ran into this issue by trying to run the test with less cores than the system 
really has, due to hyperthreading I had to disable core 4-7 and 12-15 (as 
opposed to disabling core 8-15)

Original issue reported on code.google.com by [email protected] on 9 Feb 2015 at 1:27

warning - ubunutu 18-04

~/src/byte-unixbench-master/UnixBench$ ./Run
gcc -o pgms/arithoh -Wall -pedantic -O3 -ffast-math -march=native -mtune=native -I ./src -DTIME -Darithoh src/arith.c
gcc -o pgms/register -Wall -pedantic -O3 -ffast-math -march=native -mtune=native -I ./src -DTIME -Ddatum='register int' src/arith.c
gcc -o pgms/short -Wall -pedantic -O3 -ffast-math -march=native -mtune=native -I ./src -DTIME -Ddatum=short src/arith.c
gcc -o pgms/int -Wall -pedantic -O3 -ffast-math -march=native -mtune=native -I ./src -DTIME -Ddatum=int src/arith.c
gcc -o pgms/long -Wall -pedantic -O3 -ffast-math -march=native -mtune=native -I ./src -DTIME -Ddatum=long src/arith.c
gcc -o pgms/float -Wall -pedantic -O3 -ffast-math -march=native -mtune=native -I ./src -DTIME -Ddatum=float src/arith.c
gcc -o pgms/double -Wall -pedantic -O3 -ffast-math -march=native -mtune=native -I ./src -DTIME -Ddatum=double src/arith.c
gcc -o pgms/hanoi -Wall -pedantic -O3 -ffast-math -march=native -mtune=native -I ./src -DTIME src/hanoi.c
gcc -o pgms/syscall -Wall -pedantic -O3 -ffast-math -march=native -mtune=native -I ./src -DTIME src/syscall.c
gcc -o pgms/context1 -Wall -pedantic -O3 -ffast-math -march=native -mtune=native -I ./src -DTIME src/context1.c
gcc -o pgms/pipe -Wall -pedantic -O3 -ffast-math -march=native -mtune=native -I ./src -DTIME src/pipe.c
src/pipe.c: In function ‘main’:
src/pipe.c:52:2: warning: ignoring return value of ‘pipe’, declared with attribute warn_unused_result [-Wunused-result]
pipe(pvec);
^~~~~~~~~~
gcc -o pgms/spawn -Wall -pedantic -O3 -ffast-math -march=native -mtune=native -I ./src -DTIME src/spawn.c
gcc -o pgms/execl -Wall -pedantic -O3 -ffast-math -march=native -mtune=native -I ./src -DTIME src/execl.c
In file included from src/execl.c:34:0:
src/big.c: In function ‘dummy’:
src/big.c:109:5: warning: ignoring return value of ‘freopen’, declared with attribute warn_unused_result [-Wunused-result]
freopen("masterlog.00", "a", stderr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/big.c:197:6: warning: ignoring return value of ‘freopen’, declared with attribute warn_unused_result [-Wunused-result]
freopen(logname, "w", stderr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/big.c:221:3: warning: ignoring return value of ‘dup’, declared with attribute warn_unused_result [-Wunused-result]
dup(pvec[0]);
^~~~~~~~~~~~
src/big.c:225:6: warning: ignoring return value of ‘freopen’, declared with attribute warn_unused_result [-Wunused-result]
freopen(logname, "w", stderr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/big.c:318:4: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
write(fcopy, cp->line, p - cp->line + 1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/big.c:196:34: warning: ‘%02d’ directive writing between 2 and 10 bytes into a region of size 5 [-Wformat-overflow=]
sprintf(logname, "masterlog.%02d", firstuser/MAXCHILD);
^~~~
src/big.c:196:23: note: directive argument in the range [-178956970, 178956970]
sprintf(logname, "masterlog.%02d", firstuser/MAXCHILD);
^~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:862:0,
from src/execl.c:25:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 13 and 21 bytes into a destination of size 15
return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -o pgms/dhry2 -Wall -pedantic -O3 -ffast-math -march=native -mtune=native -I ./src -DTIME -DHZ= ./src/dhry_1.c ./src/dhry_2.c
gcc -o pgms/dhry2reg -Wall -pedantic -O3 -ffast-math -march=native -mtune=native -I ./src -DTIME -DHZ= -DREG=register ./src/dhry_1.c ./src/dhry_2.c
gcc -o pgms/looper -Wall -pedantic -O3 -ffast-math -march=native -mtune=native -I ./src -DTIME src/looper.c
gcc -o pgms/fstime -Wall -pedantic -O3 -ffast-math -march=native -mtune=native -I ./src -DTIME src/fstime.c
gcc -o pgms/whetstone-double -Wall -pedantic -O3 -ffast-math -march=native -mtune=native -I ./src -DTIME -DDP -DGTODay -DUNIXBENCH src/whets.c -lm

some problems on Ubuntu 20.04

  1. no 3dinfo program, where could I find it, please? I use instead hwinfo --framebuffer --gfxcard | grep -E '^[0-9]|Driver:' | tr -d '\n, it seems to work
  2. running in verbose mode displays the message Redundant argument in printf at ./Run line 1784. (missing a %s ?)
  3. at line 734 Debian-like systems are missing, I fixed it with elsif ( -r "/etc/debian_version" ) { $info->{'system'} = getCmdOutput("cat /etc/debian_version"); }
  4. sometimes it crashes at line 935 due to the fact that $count = 0, would it be possible to add a test like if ($count > 0) { ?

dc benchmark much too short

What steps will reproduce the problem?
1. Running the dc benchmark

The command dc < dc.dat is computed very fast on modern computers, less than a 
millisecond. So the dc benchmark is benchmarking fork and exec instead 
(looper.c).

It is easy to change, by increasing the precision of sqrt(2) calculation.

Thanks

Original issue reported on code.google.com by [email protected] on 7 Nov 2012 at 6:53

spawn hangs and became defunct sometimes

In my test, sometimes spawn works well:
root@lkp-skl-1sp1 ~# date Thu Feb 28 16:00:57 CST 2019 root@lkp-skl-1sp1 ~# /lkp/benchmarks/unixbench/UnixBench/pgms/spawn 30 COUNT|457035|1|lps root@lkp-skl-1sp1 ~# date Thu Feb 28 16:01:31 CST 2019

But sometimes, hang for a long time, more than 20 minutes:
`root@lkp-skl-1sp1 ~# /lkp/benchmarks/unixbench/UnixBench/pgms/spawn 30
COUNT|446646|1|lps
root@lkp-skl-1sp1 ~# /lkp/benchmarks/unixbench/UnixBench/pgms/spawn 30
COUNT|457072|1|lps
root@lkp-skl-1sp1 ~# /lkp/benchmarks/unixbench/UnixBench/pgms/spawn 30
COUNT|444714|1|lps
root@lkp-skl-1sp1 ~# /lkp/benchmarks/unixbench/UnixBench/pgms/spawn 30
COUNT|446990|1|lps

^C
root@lkp-skl-1sp1 ~# `

Then became a defunct:
root 17877 17817 0 16:05 ? 00:00:00 /lkp/benchmarks/unixbench/UnixBench/pgms/spawn 30 root 22208 17877 0 16:06 ? 00:00:00 [spawn] <defunct> root 30370 16066 0 16:13 pts/0 00:00:00 [spawn] <defunct>

Can not run 2d test because of "language"

On this particular embedded computer with ARM processor and outdated Debian (Lilliput PC-701), all default tests run. But when selecting a 2D test, after letting it complete it's graphical show, it quits with:

Run: "2D graphics: aa polygons": perl: warning: Setting locale failed.
perl: warning Please that your locale settings:
LANGUAGE=en_US.UTF-8,
LC_ALL=en_US.UTF-8,
LANG=en_US.UTF-8
are all supported and installed on your system.
perl: warning: falling back to the standard locale ("C").; aborting

After sudo apt install locales (which I didn't have) and running locale-gen en_US.UTF-8, it still fails in the same way.

Can't compile UnixBench for AIX

Hi,

I'm trying to get UnixBench running on AIX.
As make does not work on AIX, I used gmake.

Now, I'm getting the following error.
Checking distribution of files
./pgms  exists
./src  exists
./testdir  exists
./tmp  exists
./results  exists
gcc -o ./pgms/syscall -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer 
-fforce-addr -ffast-math -Wall ./src/syscall.c
In file included from ./src/syscall.c:31:
./src/timeit.c: In function 'wake_me':
./src/timeit.c:39: warning: implicit declaration of function 'alarm'
./src/syscall.c: In function 'main':
./src/syscall.c:67: warning: implicit declaration of function 'close'
./src/syscall.c:67: warning: implicit declaration of function 'dup'
./src/syscall.c:68: warning: implicit declaration of function 'getpid'
./src/syscall.c:69: warning: implicit declaration of function 'getuid'
./src/syscall.c:70: warning: implicit declaration of function 'umask'
./src/syscall.c:88: error: 'pid_t' undeclared (first use in this function)
./src/syscall.c:88: error: (Each undeclared identifier is reported only once
./src/syscall.c:88: error: for each function it appears in.)
./src/syscall.c:88: error: expected ';' before 'pid'
./src/syscall.c:89: error: 'pid' undeclared (first use in this function)
./src/syscall.c:93: warning: implicit declaration of function 'execl'
./src/syscall.c:97: warning: implicit declaration of function 'waitpid'
gmake: *** [pgms/syscall] Error 1

The system is AIX.

If someone could help, that'd be great.

Jean-Louis

Original issue reported on code.google.com by [email protected] on 23 May 2011 at 11:09

Math behind unixbench tests

I am writing an article on VPS benchmarking so I would like to know is there any document describing the math behind unixbench tests?

replace '3dinfo'

unixbench tries to execute '3dinfo' command to get info about graphic system (I 
guess).
I found this program only in OpenSuse package 3ddiag and it looks that right 
now dumping expected info is commented out.
So, on most (all?) systems trying to run 3dinfo is pointless.
I think that 3dinfo should be replaced with something newer - maybe some part 
of 'glxinfo' output or 'hwinfo'.

Original issue reported on code.google.com by [email protected] on 23 Oct 2014 at 9:08

ValueError: NUMA Node(s) could not be found in lscpu value

Hello everyone:
I use unixbench to test a Ubuntu14.04 host, an error 'ValueError: NUMA Node (s) could not be found in lscpu value:'

[root@localhost PerfKitBenchmarker-1.13.0]# ./pkb.py --benchmarks=unixbench --benchmark_config_file=unixbench2u2g.yaml
2017-11-14 21:54:22,560 4658428b MainThread INFO Verbose logging to: /tmp/perfkitbenchmarker/runs/4658428b/pkb.log
2017-11-14 21:54:22,561 4658428b MainThread INFO PerfKitBenchmarker version: unknown
2017-11-14 21:54:22,561 4658428b MainThread INFO Flag values:
--benchmark_config_file=unixbench2u2g.yaml
--benchmarks=unixbench
2017-11-14 21:54:22,805 4658428b MainThread WARNING The key "static_vms" was not in the default config, but was in user overrides. This may indicate a typo.
2017-11-14 21:54:22,805 4658428b MainThread WARNING The key "flags" was not in the default config, but was in user overrides. This may indicate a typo.
2017-11-14 21:54:22,978 4658428b MainThread unixbench(1/1) INFO Provisioning resources for benchmark unixbench
2017-11-14 21:54:22,982 4658428b Thread-2 unixbench(1/1) INFO VM: 202.100.185.180
2017-11-14 21:54:22,982 4658428b Thread-2 unixbench(1/1) INFO Waiting for boot completion.
2017-11-14 21:54:22,982 4658428b Thread-2 unixbench(1/1) INFO Running: ssh -A -p 2279 [email protected] -2 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o PreferredAuthentications=publickey -o PasswordAuthentication=no -o ConnectTimeout=5 -o GSSAPIAuthentication=no -o ServerAliveInterval=30 -o ServerAliveCountMax=10 -i /root/.ssh/id_rsa hostname
2017-11-14 21:54:23,797 4658428b Thread-2 unixbench(1/1) INFO Running: ssh -A -p 2279 [email protected] -2 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o PreferredAuthentications=publickey -o PasswordAuthentication=no -o ConnectTimeout=5 -o GSSAPIAuthentication=no -o ServerAliveInterval=30 -o ServerAliveCountMax=10 -i /root/.ssh/id_rsa mkdir -p /tmp/pkb
2017-11-14 21:54:24,567 4658428b Thread-2 unixbench(1/1) INFO Running: ssh -A -p 2279 [email protected] -2 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o PreferredAuthentications=publickey -o PasswordAuthentication=no -o ConnectTimeout=5 -o GSSAPIAuthentication=no -o ServerAliveInterval=30 -o ServerAliveCountMax=10 -i /root/.ssh/id_rsa sudo mkdir -p /opt/pkb
2017-11-14 21:54:25,331 4658428b Thread-2 unixbench(1/1) INFO Running: ssh -A -p 2279 [email protected] -2 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o PreferredAuthentications=publickey -o PasswordAuthentication=no -o ConnectTimeout=5 -o GSSAPIAuthentication=no -o ServerAliveInterval=30 -o ServerAliveCountMax=10 -i /root/.ssh/id_rsa sudo chmod a+rwxt /opt/pkb
2017-11-14 21:54:26,091 4658428b Thread-2 unixbench(1/1) INFO Running: ssh -A -p 2279 [email protected] -2 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o PreferredAuthentications=publickey -o PasswordAuthentication=no -o ConnectTimeout=5 -o GSSAPIAuthentication=no -o ServerAliveInterval=30 -o ServerAliveCountMax=10 -i /root/.ssh/id_rsa dpkg --get-selections > /opt/pkb/dpkg_selections
2017-11-14 21:54:26,896 4658428b Thread-2 unixbench(1/1) INFO Running: ssh -A -p 2279 [email protected] -2 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o PreferredAuthentications=publickey -o PasswordAuthentication=no -o ConnectTimeout=5 -o GSSAPIAuthentication=no -o ServerAliveInterval=30 -o ServerAliveCountMax=10 -i /root/.ssh/id_rsa sudo apt-get update
2017-11-14 21:54:41,216 4658428b Thread-2 unixbench(1/1) INFO Running: ssh -A -p 2279 [email protected] -2 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o PreferredAuthentications=publickey -o PasswordAuthentication=no -o ConnectTimeout=5 -o GSSAPIAuthentication=no -o ServerAliveInterval=30 -o ServerAliveCountMax=10 -i /root/.ssh/id_rsa sudo DEBIAN_FRONTEND='noninteractive' /usr/bin/apt-get -y install python
2017-11-14 21:54:42,574 4658428b Thread-2 unixbench(1/1) INFO Running: ssh -A -p 2279 [email protected] -2 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o PreferredAuthentications=publickey -o PasswordAuthentication=no -o ConnectTimeout=5 -o GSSAPIAuthentication=no -o ServerAliveInterval=30 -o ServerAliveCountMax=10 -i /root/.ssh/id_rsa cat /proc/sys/net/ipv4/tcp_congestion_control
2017-11-14 21:54:43,312 4658428b Thread-2 unixbench(1/1) INFO Running: ssh -A -p 2279 [email protected] -2 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o PreferredAuthentications=publickey -o PasswordAuthentication=no -o ConnectTimeout=5 -o GSSAPIAuthentication=no -o ServerAliveInterval=30 -o ServerAliveCountMax=10 -i /root/.ssh/id_rsa lscpu
2017-11-14 21:54:44,138 4658428b MainThread unixbench(1/1) ERROR Exception occurred while calling PrepareVm(202.100.185.180):
Traceback (most recent call last):
File "/usr/local/PerfKitBenchmarker-1.13.0/perfkitbenchmarker/background_tasks.py", line 235, in Run
self.return_value = self.target(*self.args, **self.kwargs)
File "/usr/local/PerfKitBenchmarker-1.13.0/perfkitbenchmarker/benchmark_spec.py", line 456, in PrepareVm
vm.PrepareVMEnvironment()
File "/usr/local/PerfKitBenchmarker-1.13.0/perfkitbenchmarker/linux_virtual_machine.py", line 248, in PrepareVMEnvironment
self.RecordAdditionalMetadata()
File "/usr/local/PerfKitBenchmarker-1.13.0/perfkitbenchmarker/linux_virtual_machine.py", line 336, in RecordAdditionalMetadata
lscpu_results = self.CheckLsCpu()
File "/usr/local/PerfKitBenchmarker-1.13.0/perfkitbenchmarker/linux_virtual_machine.py", line 321, in CheckLsCpu
return LsCpuResults(lscpu)
File "/usr/local/PerfKitBenchmarker-1.13.0/perfkitbenchmarker/linux_virtual_machine.py", line 1274, in init
lscpu)
ValueError: NUMA Node(s) could not be found in lscpu value:
Architecture: x86_64
CPU 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
1
2
Socket(s): 2
NUMA 1
ID GenuineIntel
CPU 6
63
2
CPU MHz 2394.482
BogoMIPS: 4854.12
Xen
full
L1d 32K
L1i 32K
L2 256K
L3 20480K
NUMA node0 CPU(s): 0-3

2017-11-14 21:54:44,142 4658428b MainThread unixbench(1/1) ERROR Error during benchmark unixbench
Traceback (most recent call last):
File "/usr/local/PerfKitBenchmarker-1.13.0/perfkitbenchmarker/pkb.py", line 551, in RunBenchmark
DoProvisionPhase(spec, detailed_timer)
File "/usr/local/PerfKitBenchmarker-1.13.0/perfkitbenchmarker/pkb.py", line 430, in DoProvisionPhase
spec.Provision()
File "/usr/local/PerfKitBenchmarker-1.13.0/perfkitbenchmarker/benchmark_spec.py", line 340, in Provision
vm_util.RunThreaded(self.PrepareVm, self.vms)
File "/usr/local/PerfKitBenchmarker-1.13.0/perfkitbenchmarker/background_tasks.py", line 621, in RunThreaded
max_concurrency=max_concurrent_threads)
File "/usr/local/PerfKitBenchmarker-1.13.0/perfkitbenchmarker/background_tasks.py", line 565, in RunParallelThreads
errors.VmUtil.ThreadException)
File "/usr/local/PerfKitBenchmarker-1.13.0/perfkitbenchmarker/background_tasks.py", line 540, in _RunParallelTasks
'{0}{1}'.format(os.linesep, os.linesep.join(error_strings)))
ThreadException: The following exceptions occurred during parallel execution:
Exception occurred while calling PrepareVm(202.100.185.180):
Traceback (most recent call last):
File "/usr/local/PerfKitBenchmarker-1.13.0/perfkitbenchmarker/background_tasks.py", line 235, in Run
self.return_value = self.target(*self.args, **self.kwargs)
File "/usr/local/PerfKitBenchmarker-1.13.0/perfkitbenchmarker/benchmark_spec.py", line 456, in PrepareVm
vm.PrepareVMEnvironment()
File "/usr/local/PerfKitBenchmarker-1.13.0/perfkitbenchmarker/linux_virtual_machine.py", line 248, in PrepareVMEnvironment
self.RecordAdditionalMetadata()
File "/usr/local/PerfKitBenchmarker-1.13.0/perfkitbenchmarker/linux_virtual_machine.py", line 336, in RecordAdditionalMetadata
lscpu_results = self.CheckLsCpu()
File "/usr/local/PerfKitBenchmarker-1.13.0/perfkitbenchmarker/linux_virtual_machine.py", line 321, in CheckLsCpu
return LsCpuResults(lscpu)
File "/usr/local/PerfKitBenchmarker-1.13.0/perfkitbenchmarker/linux_virtual_machine.py", line 1274, in init
lscpu)
ValueError: NUMA Node(s) could not be found in lscpu value:
Architecture: x86_64
CPU 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
1
2
Socket(s): 2
NUMA 1
ID GenuineIntel
CPU 6
63
2
CPU MHz 2394.482
BogoMIPS: 4854.12
Xen
full
L1d 32K
L1i 32K
L2 256K
L3 20480K
NUMA node0 CPU(s): 0-3

2017-11-14 21:54:44,143 4658428b Thread-12 unixbench(1/1) INFO Running: ssh -A -p 2279 [email protected] -2 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o PreferredAuthentications=publickey -o PasswordAuthentication=no -o ConnectTimeout=5 -o GSSAPIAuthentication=no -o ServerAliveInterval=30 -o ServerAliveCountMax=10 -i /root/.ssh/id_rsa sudo dpkg --clear-selections
2017-11-14 21:54:45,008 4658428b Thread-12 unixbench(1/1) INFO Running: ssh -A -p 2279 [email protected] -2 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o PreferredAuthentications=publickey -o PasswordAuthentication=no -o ConnectTimeout=5 -o GSSAPIAuthentication=no -o ServerAliveInterval=30 -o ServerAliveCountMax=10 -i /root/.ssh/id_rsa sudo dpkg --set-selections < /opt/pkb/dpkg_selections
2017-11-14 21:54:45,926 4658428b Thread-12 unixbench(1/1) INFO Running: ssh -A -p 2279 [email protected] -2 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o PreferredAuthentications=publickey -o PasswordAuthentication=no -o ConnectTimeout=5 -o GSSAPIAuthentication=no -o ServerAliveInterval=30 -o ServerAliveCountMax=10 -i /root/.ssh/id_rsa sudo DEBIAN_FRONTEND='noninteractive' apt-get --purge -y dselect-upgrade
2017-11-14 21:54:49,671 4658428b Thread-12 unixbench(1/1) INFO Running: ssh -A -p 2279 [email protected] -2 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o PreferredAuthentications=publickey -o PasswordAuthentication=no -o ConnectTimeout=5 -o GSSAPIAuthentication=no -o ServerAliveInterval=30 -o ServerAliveCountMax=10 -i /root/.ssh/id_rsa sudo rm -rf /opt/pkb
2017-11-14 21:54:50,483 4658428b MainThread unixbench(1/1) ERROR Benchmark 1/1 unixbench (UID: unixbench0) failed. Execution will continue.
2017-11-14 21:54:50,500 4658428b MainThread INFO Benchmark run statuses:

Name UID Status

unixbench unixbench0 FAILED

Success rate: 0.00% (0/1)
2017-11-14 21:54:50,502 4658428b MainThread INFO Complete logs can be found at: /tmp/perfkitbenchmarker/runs/4658428b/pkb.log
2017-11-14 21:54:50,503 4658428b MainThread INFO Completion statuses can be found at: /tmp/perfkitbenchmarker/runs/4658428b/completion_statuses.json

When I execute 'lscpu' on the host being tested, it shows:
qq 201711141542578888
What is the reason? Is it related to the encoding format?
thanks!

Error: log integer 0

Run:943 reported error when trying to log an integer 0.

Situation: ./Run arithmetic

Makefile Error on FreeBSD

I have a received a Makefile error while trying to do ./Run:
$ ./Run
make: "/usr/home/jesse/byte-unixbench-5.1.3/UnixBench/Makefile" line 107: Need an operator
make: "/usr/home/jesse/byte-unixbench-5.1.3/UnixBench/Makefile" line 109: Need an operator
make: "/usr/home/jesse/byte-unixbench-5.1.3/UnixBench/Makefile" line 111: Need an operator
make: Fatal errors encountered -- cannot continue
make: stopped in /usr/home/jesse/byte-unixbench-5.1.3/UnixBench
make: "/usr/home/jesse/byte-unixbench-5.1.3/UnixBench/Makefile" line 107: Need an operator
make: "/usr/home/jesse/byte-unixbench-5.1.3/UnixBench/Makefile" line 109: Need an operator
make: "/usr/home/jesse/byte-unixbench-5.1.3/UnixBench/Makefile" line 111: Need an operator
make: Fatal errors encountered -- cannot continue
make: stopped in /usr/home/jesse/byte-unixbench-5.1.3/UnixBench


Run: "make all" failed; aborting

Does not compile on RISC-V

Hello,

# make
make distr
make[1]: Entering directory '/root/byte-unixbench/UnixBench'
Checking distribution of files
./pgms  exists
./src  exists
./testdir  exists
make[1]: Leaving directory '/root/byte-unixbench/UnixBench'
make programs
make[1]: Entering directory '/root/byte-unixbench/UnixBench'
gcc -o pgms/arithoh -Wall -pedantic -O3 -ffast-math -march=native -mtune=native -I ./src -DTIME -Darithoh src/arith.c 
gcc: error: ‘-march=native’: ISA string must begin with rv32 or rv64
make[1]: *** [Makefile:233: pgms/arithoh] Error 1
make[1]: Leaving directory '/root/byte-unixbench/UnixBench'
make: *** [Makefile:174: all] Error 2

Makefile actually mentions that these switches are not supported on RISC-V, but then goes ahead and try to use them anyway.
Using -mcpu=native -mtune=native did not work either.
Commenting out the entire assignment of -mcpu and -mtune made it compile.

Project makefile is not parallel make safe.

What steps will reproduce the problem?
1. Run make -j 4 (anything > 3 will cause failure)
2. Observe errors about dhry_1.o or dhry_2.o files.

What is the expected output? What do you see instead?

Project should compile without error using parallel make. Instead, project 
fails to compile due to race conditions in the construction and deletion of  
the dhry_1.o and dhry_2.o files.

What version of the product are you using? On what operating system?

All versions as far back as 4.0.1 (at least, probably always). Linux.

Please provide any additional information below.

Attached is a patch file to change the dhry2reg target to compile its versions 
of the dhry_1.o and dhry_2.o files to dhry_1_reg.o and dhry_2_reg.o so that the 
dhry2 target doesn't overwrite them.

Original issue reported on code.google.com by [email protected] on 13 Jan 2011 at 8:11

Attachments:

with unixbench.spec of centos, after unixbench rpm installation, run unixbench and got error

with unixbench.spec file, make rpm file, install and then run,

[root@917-centos66 tmp]# unixbench
make: *** No rule to make target `check'.  Stop.
make: *** No rule to make target `all'.  Stop.

**********************************************
Run: "make all" failed; aborting

unixbench.spec

cat unixbench.spec
Summary: BYTE's UNIX Benchmarks
Name: unixbench
Version: 5.1.3
Release: 1%{?dist}
License: Distributable
Group: Applications/System
URL: http://www.hermit.org/Linux/Benchmarking/
Source: http://www.hermit.org/Linux/Benchmarking/UnixBench%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

%description
This page presents some information on Linux benchmarking; and in particular,
UnixBench Version 5, a version of the venerable Byte benchmarks updated to
handle multi-CPU systems.

%prep
%setup -n UnixBench

### Add old XFree86 library path, add -lm for EL2
#%{__perl} -pi.orig -e 's|(GL_LIBS\s*=\s*)(.*)$|$1 -L%{_prefix}/X11R6/%{_lib} -lm $2|' Makefile

%build
%{__make} %{?_smp_mflags} OPTION="%{optflags}"

%install
%{__rm} -rf %{buildroot}
#sed -i '1767s/.*/#&/' Run
%{__install} -Dp -m0755 Run %{buildroot}%{_bindir}/unixbench

%{__install} -d -m0755 %{buildroot}%{_libdir}/unixbench/
%{__cp} -av pgms/ testdir/ %{buildroot}%{_libdir}/unixbench/

%clean
%{__rm} -rf %{buildroot}

%files
%doc README USAGE WRITING_TESTS
%{_bindir}/unixbench
%{_libdir}/unixbench/

%changelog
* Fri Aug 01 2014 Nux <[email protected]> - 5.1.3-1
- update to 5.1.3

* Wed Dec 10 2008 Dag Wieers <[email protected]> - 5.1.2-1 - 7981/dag
- Updated to release 5.1.2.

* Fri Feb 16 2007 Dag Wieers <[email protected]> - 4.0.1-1
- Initial package. (using DAR)

Run: "Execl Throughput": *** buffer overflow detected ***: terminated; aborting


   #    #  #    #  #  #    #          #####   ######  #    #   ####   #    #
   #    #  ##   #  #   #  #           #    #  #       ##   #  #    #  #    #
   #    #  # #  #  #    ##            #####   #####   # #  #  #       ######
   #    #  #  # #  #    ##            #    #  #       #  # #  #       #    #
   #    #  #   ##  #   #  #           #    #  #       #   ##  #    #  #    #
    ####   #    #  #  #    #          #####   ######  #    #   ####   #    #

   Version 5.1.3                      Based on the Byte Magazine Unix Benchmark

   Multi-CPU version                  Version 5 revisions by Ian Smith,
                                      Sunnyvale, CA, USA
   January 13, 2011                   johantheghost at yahoo period com


1 x Dhrystone 2 using register variables  1 2 3 4 5 6 7 8 9 10

1 x Double-Precision Whetstone  1 2 3 4 5 6 7 8 9 10

1 x Execl Throughput  1sh: line 1: 3016532 Aborted                 (core dumped) "/opt/unixbench/UnixBench/pgms/execl" 30 2>&1 >> "/opt/unixbench/UnixBench/results/localhost.localdomain-2021-02-05-01.log"

**********************************************
Run: "Execl Throughput": *** buffer overflow detected ***: terminated; aborting

[root@localhost ~]# screenfetch 
           /:-------------:\          root@fedora
        :-------------------::        OS: Fedora 
      :-----------/shhOHbmp---:\      Kernel: x86_64 Linux 5.10.11-200.fc33.x86_64
    /-----------omMMMNNNMMD  ---:     Uptime: 3h 7m
   :-----------sMMMMNMNMP.    ---:    Packages: 1265
  :-----------:MMMdP-------    ---\   Shell: bash 5.0.17
 ,------------:MMMd--------    ---:   Disk: 66G / 106G (63%)
 :------------:MMMd-------    .---:   CPU: Genuine Intel 0000 @ 12x 3.6GHz [25.0°C]
 :----    oNMMMMMMMMMNho     .----:   GPU: Intel Corporation UHD Graphics 630 (Mobile)
 :--     .+shhhMMMmhhy++   .------/   RAM: 898MiB / 7789MiB
 :-    -------:MMMd--------------:   
 :-   --------/MMMd-------------;    
 :-    ------/hMMMy------------:     
 :-- :dMNdhhdNMMNo------------;      
 :---:sdNMMMMNds:------------:       
 :------:://:-------------::         
 :---------------------://           

Dont know where is the problem.

Minor: sizeof logname needs to be increased in big.c

gcc generates a warning when compiling big.c because logname is too small and snprintf complains. Its defined as 15 chars, I increased it to 32 and the warning goes away. It probably would be fine at 26 chars but I didn't try it.
I'm using: gcc (SUSE Linux) 9.2.1 20190903 [gcc-9-branch revision 275330]

char        logname[15];    /* name of the log file(s) */

src/big.c: In function ‘dummy’:
src/big.c:196:34: warning: ‘%02d’ directive writing between 2 and 10 bytes into a region of size 5 [-Wformat-overflow=]
  196 |      sprintf(logname, "masterlog.%02d", firstuser/MAXCHILD);
      |                                  ^~~~
src/big.c:196:23: note: directive argument in the range [-178956970, 178956970]
  196 |      sprintf(logname, "masterlog.%02d", firstuser/MAXCHILD);
      |                       ^~~~~~~~~~~~~~~~
src/big.c:196:6: note: ‘sprintf’ output between 13 and 21 bytes into a destination of size 15
  196 |      sprintf(logname, "masterlog.%02d", firstuser/MAXCHILD);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Nonoptimal GCC flags

This is really outdated and even detrimental to performance: -O2 
-fomit-frame-pointer -fforce-addr -ffast-math -Wall

A better combination will be:  -O2 -ffast-math -Wall -march=native

Original issue reported on code.google.com by [email protected] on 7 Mar 2015 at 11:44

unreasonable multiple Whetstone results

What steps will reproduce the problem?
1. ./Run arthrimetic
2. ./Run -c 4 arthrimetic
3. ./Run -c 8 arthrimetic
4. ./Run -c 12 arthrimetic
5. ./Run -c 16 arthrimetic

What is the expected output? What do you see instead?

the system CPU has only 4 cores.

-c 4 ~ 16 should have result slightly less than 4x of single process test 
result.
but, the results are:
4: 3380.9       
8: 6756.2   
12: 10130.1 
16: 13504.2

What version of the product are you using? On what operating system?
unixbench 5.1.3
3.2.0-4-amd64 #1 SMP Debian 3.2.63-2 x86_64 GNU/Linux
one Intel XEON E3-1225

Please provide any additional information below.
also got same kind of result on a Apple MBP, with Core i7 3615, 4C8T

1: 959.8    
4: 3902.9   
8: 7139.1
12: 10673.6
16: 14252.6

Original issue reported on code.google.com by [email protected] on 5 Dec 2014 at 2:38

Graphics Test

Trying to run the UnixBench 5 on my ubuntu system, but i get the error 
[pgms/ubgears] error 1, i know this error is related to setting up the 
variables for Graphics test, but i really dont know how to go about it


Original issue reported on code.google.com by [email protected] on 7 Nov 2013 at 7:19

whetstone measurements issues

What steps will reproduce the problem?
1. configure 1 cpu to the system
2. run 1 copy, 2, 4, copies of whetstone
3. the throughput should be the same as there is only one cpu. The throughput 
scales linearly.

What is the expected output? What do you see instead?
Expected to use wall clock time for calculations instead it uses process time.

What version of the product are you using? On what operating system?
ubuntu 15.04 - latest unixbench

Please provide any additional information below.
I modified the compilation flag from UNIX to GTODay and it fixed the issue. 
GTODay uses wall clock time to calculate the results which is what is needed as 
using process time may result in undue advantages to processors having higher 
single threaded performance while lack in throughput mode ( multiple SMT copies 
). This does not also differentiate a configuration with higher number of cpus.

Original issue reported on code.google.com by [email protected] on 30 Mar 2015 at 1:09

CentOS 7.1 - Double-Precision Whetstone SEGFAULT

UnixBench version: 5.1.3
Operating System: CentOS 7.1

I encounter a Segmentation Fault running UnixBench against CentOS 7.1:

$ ./Run
make all
make[1]: Entering directory `/home/fedora/byte-unixbench/UnixBench'
make distr
make[2]: Entering directory `/home/fedora/byte-unixbench/UnixBench'
Checking distribution of files
./pgms  exists
./src  exists
./testdir  exists
./tmp  exists
./results  exists
make[2]: Leaving directory `/home/fedora/byte-unixbench/UnixBench'
make programs
make[2]: Entering directory `/home/fedora/byte-unixbench/UnixBench'
make[2]: Nothing to be done for `programs'.
make[2]: Leaving directory `/home/fedora/byte-unixbench/UnixBench'
make[1]: Leaving directory `/home/fedora/byte-unixbench/UnixBench'
sh: 3dinfo: command not found

   #    #  #    #  #  #    #          #####   ######  #    #   ####   #    #
   #    #  ##   #  #   #  #           #    #  #       ##   #  #    #  #    #
   #    #  # #  #  #    ##            #####   #####   # #  #  #       ######
   #    #  #  # #  #    ##            #    #  #       #  # #  #       #    #
   #    #  #   ##  #   #  #           #    #  #       #   ##  #    #  #    #
    ####   #    #  #  #    #          #####   ######  #    #   ####   #    #

   Version 5.1.3                      Based on the Byte Magazine Unix Benchmark

   Multi-CPU version                  Version 5 revisions by Ian Smith,
                                      Sunnyvale, CA, USA
   January 13, 2011                   johantheghost at yahoo period com


1 x Dhrystone 2 using register variables  1 2 3 4 5 6 7 8 9 10

1 x Double-Precision Whetstone  1sh: line 1:  8478 Segmentation fault      (core dumped) "/home/fedora/byte-unixbench/UnixBench/pgms/whetstone-double" 2>&1 >> "/home/fedora/byte-unixbench/UnixBench/results/cb-chriskirkland-myopenstack-vm1-unixbench-ai-1-2016-07-20-04.log"

**********************************************
Run: "Double-Precision Whetstone": command returned status 35584; aborting

I can run the same version of UnixBench on Ubuntu 14.x successfully.

Here is the outputted logfile: unixbench-log.txt

unable to run Unixbench on my server

# ./Run -c 1 -c `grep 'processor' /proc/cpuinfo |sort |uniq |wc -l`
gcc -o pgms/arithoh -Wall -pedantic -O3 -ffast-math -march=native -mtune=native -I ./src -DTIME -Darithoh src/arith.c 
src/arith.c:1:0: error: unknown value ‘native’ for -march
 
 ^
src/arith.c:1:0: error: unknown value ‘native’ for -mtune
make: *** [pgms/arithoh] Error 1
make distr
make[1]: Entering directory `/opt/benchmarks/scripts/unixbench/UnixBench'
Checking distribution of files
./pgms  exists
./src  exists
./testdir  exists
./tmp  exists
./results  exists
make[1]: Leaving directory `/opt/benchmarks/scripts/unixbench/UnixBench'
make programs
make[1]: Entering directory `/opt/benchmarks/scripts/unixbench/UnixBench'
gcc -o pgms/arithoh -Wall -pedantic -O3 -ffast-math -march=native -mtune=native -I ./src -DTIME -Darithoh src/arith.c 
src/arith.c:1:0: error: unknown value ‘native’ for -march
 
 ^
src/arith.c:1:0: error: unknown value ‘native’ for -mtune
make[1]: *** [pgms/arithoh] Error 1
make[1]: Leaving directory `/opt/benchmarks/scripts/unixbench/UnixBench'
make: *** [all] Error 2

**********************************************
Run: "make all" failed; aborting

# uname -p
aarch64
# cat /etc/os-release 
NAME="Oracle Linux Server"
VERSION="7.9"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.9"
PRETTY_NAME="Oracle Linux Server 7.9"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:7:9:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"

ORACLE_BUGZILLA_PRODUCT="Oracle Linux 7"
ORACLE_BUGZILLA_PRODUCT_VERSION=7.9
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=7.9

# cat /proc/cpuinfo 
processor	: 0
BogoMIPS	: 50.00
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp ssbs
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x3
CPU part	: 0xd0c
CPU revision	: 1
# cat /proc/version 
Linux version 5.4.17-2136.302.7.2.1.el7uek.aarch64 ([email protected]) (gcc version 7.3.0 20180125 (Red Hat 7.3.0-7) (GCC)) #2 SMP Tue Jan 18 12:03:48 PST 2022

Please let me know if you require additional information.

-q option unsupported, using clang on MacOS

When running ./Run on macOS an error gets thrown, saying that the -q flag isn't recognised.
MacOS uses clang instead of gcc, I suspect that's the reason why.
Everything runs fine (though of course more verbose) after removing this flag on line 113 in UnixBench/Makefile though.

Run: "Process Creation": Fork failed at iteration 25404 Reason: Resource temporarily unavailable; aborting

   Version 5.1.3                      Based on the Byte Magazine Unix Benchmark

   Multi-CPU version                  Version 5 revisions by Ian Smith,
                                      Sunnyvale, CA, USA
   January 13, 2011                   johantheghost at yahoo period com

------------------------------------------------------------------------------
   Use directories for:
      * File I/O tests (named fs***) = /root/byte-unixbench/UnixBench/tmp
      * Results                      = /root/byte-unixbench/UnixBench/results
------------------------------------------------------------------------------


1 x Dhrystone 2 using register variables  1 2 3 4 5 6 7 8 9 10

1 x Double-Precision Whetstone  1 2 3 4 5 6 7 8 9 10

1 x Execl Throughput  1 2 3

1 x File Copy 1024 bufsize 2000 maxblocks  1 2 3

1 x File Copy 256 bufsize 500 maxblocks  1 2 3

1 x File Copy 4096 bufsize 8000 maxblocks  1 2 3

1 x Pipe Throughput  1 2 3 4 5 6 7 8 9 10

1 x Pipe-based Context Switching  1 2 3 4 5 6 7 8 9 10

1 x Process Creation  1 2 3

1 x System Call Overhead  1 2 3 4 5 6 7 8 9 10

1 x Shell Scripts (1 concurrent)  1 2 3

1 x Shell Scripts (8 concurrent)  1 2 3

40 x Dhrystone 2 using register variables  1 2 3 4 5 6 7 8 9 10

40 x Double-Precision Whetstone  1 2 3 4 5 6 7 8 9 10

40 x Execl Throughput  1 2 3

40 x File Copy 1024 bufsize 2000 maxblocks  1 2 3

40 x File Copy 256 bufsize 500 maxblocks  1 2 3

40 x File Copy 4096 bufsize 8000 maxblocks  1 2 3

40 x Pipe Throughput  1 2 3 4 5 6 7 8 9 10

40 x Pipe-based Context Switching  1 2 3 4 5 6 7 8 9 10

40 x Process Creation  1
**********************************************
Run: "Process Creation": Fork failed at iteration 25404
Reason: Resource temporarily unavailable; aborting

parallel copies of tests greater than 16, exit directly

The machine has 2 cpu , each cpu has 8 cores 16 threads. os is debian 11.

./Run
......
32 CPUs in system; running 32 parallel copies of tests
then exit directly.

./Run -c 16 is ok

./Run -c 17 or more ,exit directly.

test 1 x Double-Precision Whetstone never stops

All OSes where i run this tool already had build-essential installed so i just run Run and tests are passed one after another and overall test comleted in a reasonable time always.

Today i tried to run it on debian 8 x64 minimal installation without 'make' command. So i installed build-essential and run ./Run and bench stucked at
1 x Double-Precision Whetstone 1
digit 2 seemed never to be completed.
Second iteration was running around 3 hours, item from top output:
4042 root 20 0 6524 504 428 R 99 0,1 153:03.72 whetstone-doubl : 153 minutes.
I interrupted the whole test and run particular ./pgms/whetstone-double
and it seemed tried to pass infinite count of loops:

# ./pgms/whetstone-double
Calibrate
       0.00 Seconds          1   Passes (x 100)
       0.00 Seconds          5   Passes (x 100)
       0.00 Seconds         25   Passes (x 100)
       0.00 Seconds        125   Passes (x 100)
       0.00 Seconds        625   Passes (x 100)
       0.00 Seconds       3125   Passes (x 100)
^C

it was worked around five minutes, after which i just interrupted it.
On other systems it goes only four counts (until 125 passes) and completes, but in my case it was going and going.

I rebooted the system and run only whetstone-double again and it completed just in 9 seconds. Now i run the whole bench, it passed through all whetstone-double iterations ang go along with other tests successfully (didnt finish yet).

So i don't know what happened. May be i should restarted my debian after installing build-essintial and compiling the bench, but it seems like microsoft shamanizm to me.

May be you know why "passes counter" was broken in whetstone-double and gone infinite way ?

Ubuntu server 14.04

I have installed all this libs: libx11-dev libgl1-mesa-dev libxext-dev perl perl-modules make gcc
It's normal to get this output when executing ./Run?

ubuntu@exp:~/byte-unixbench-5.1.3/UnixBench$ ./Run
gcc -o ./pgms/arithoh -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Darithoh ./src/arith.c
gcc -o ./pgms/register -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum='register int' ./src/arith.c
gcc -o ./pgms/short -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=short ./src/arith.c
gcc -o ./pgms/int -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=int ./src/arith.c
gcc -o ./pgms/long -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=long ./src/arith.c
gcc -o ./pgms/float -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=float ./src/arith.c
gcc -o ./pgms/double -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=double ./src/arith.c
gcc -o ./pgms/hanoi -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/hanoi.c
gcc -o ./pgms/syscall -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/syscall.c
./src/syscall.c: In function ‘main’:
./src/syscall.c:93:21: warning: null argument where non-null required (argument 2) [-Wnonnull]
execl("/bin/true", (char *) 0);
^
gcc -o ./pgms/context1 -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/context1.c
gcc -o ./pgms/pipe -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/pipe.c
./src/pipe.c: In function ‘main’:
./src/pipe.c:52:6: warning: ignoring return value of ‘pipe’, declared with attribute warn_unused_result [-Wunused-result]
pipe(pvec);
^
gcc -o ./pgms/spawn -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/spawn.c
gcc -o ./pgms/execl -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/execl.c
In file included from ./src/execl.c:34:0:
./src/big.c: In function ‘getwork’:
./src/big.c:452:11: warning: variable ‘c’ set but not used [-Wunused-but-set-variable]
char c;
^
./src/big.c: In function ‘fatal’:
./src/big.c:586:5: warning: format not a string literal and no format arguments [-Wformat-security]
fprintf(stderr, s);
^
./src/big.c: In function ‘dummy’:
./src/big.c:112:12: warning: ignoring return value of ‘freopen’, declared with attribute warn_unused_result [-Wunused-result]
freopen("masterlog.00", "a", stderr);
^
./src/big.c:200:13: warning: ignoring return value of ‘freopen’, declared with attribute warn_unused_result [-Wunused-result]
freopen(logname, "w", stderr);
^
./src/big.c:224:6: warning: ignoring return value of ‘dup’, declared with attribute warn_unused_result [-Wunused-result]
dup(pvec[0]);
^
./src/big.c:228:13: warning: ignoring return value of ‘freopen’, declared with attribute warn_unused_result [-Wunused-result]
freopen(logname, "w", stderr);
^
./src/big.c:321:9: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
write(fcopy, cp->line, p - cp->line + 1);
^
cd ./src; gcc -c -DTIME -Wall -pedantic -ansi -DHZ= -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall dhry_1.c
cd ./src; gcc -c -DTIME -Wall -pedantic -ansi -DHZ= -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall dhry_2.c
gcc -o ./pgms/dhry2 -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/dhry_1.o ./src/dhry_2.o
cd ./src; rm -f dhry_1.o dhry_2.o
cd ./src; gcc -c -DTIME -Wall -pedantic -ansi -DREG=register -DHZ= -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall dhry_1.c -o dhry_1_reg.o
cd ./src; gcc -c -DTIME -Wall -pedantic -ansi -DREG=register -DHZ= -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall dhry_2.c -o dhry_2_reg.o
gcc -o ./pgms/dhry2reg -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/dhry_1_reg.o ./src/dhry_2_reg.o
cd ./src; rm -f dhry_1_reg.o dhry_2_reg.o
gcc -o ./pgms/looper -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/looper.c
gcc -o ./pgms/fstime -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/fstime.c
gcc -o ./pgms/whetstone-double -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -DDP -DUNIX -DUNIXBENCH ./src/whets.c -lm
make all
make[1]: Entering directory /home/ubuntu/byte-unixbench-5.1.3/UnixBench' Checking distribution of files ./pgms exists ./src exists ./testdir exists ./tmp exists ./results exists make[1]: Leaving directory/home/ubuntu/byte-unixbench-5.1.3/UnixBench'
sh: 1: 3dinfo: not found

exit the test program when execute multi parallel copies of tests, why?

Hello, I just installed unixBench in my machine. And make ./Run
After 30 mins, I got a result of single process. It seems work well. But for running 64 parallel copies of tests, I just got
------------------------------------------------------------------------ Benchmark Run: Tue Aug 11 2020 16:46:02 - 16:46:02 64 CPUs in system; running 64 parallel copies of tests
and then exit testing.
Could you help me figure out the reason?

Can't take log of 0

What steps will reproduce the problem?
1. ./Run -i 1 int
Also reproducible here for the tests arithoh, short, int, long, float, double 

What is the expected output? What do you see instead?
I am expecting the normal result listing.


What version of the product are you using? On what operating system?
Version 5.1.3


Please provide any additional information below.

Console output:
make all
make[1]: Entering directory 
`/home/scosu/ptestsuite/suite/tests/unixbench/UnixBench'
Checking distribution of files
./pgms  exists
./src  exists
./testdir  exists
./tmp  exists
./results  exists
make[1]: Leaving directory 
`/home/scosu/ptestsuite/suite/tests/unixbench/UnixBench'
sh: 3dinfo: command not found
sh: runlevel: command not found

   #    #  #    #  #  #    #          #####   ######  #    #   ####   #    #
   #    #  ##   #  #   #  #           #    #  #       ##   #  #    #  #    #
   #    #  # #  #  #    ##            #####   #####   # #  #  #       ######
   #    #  #  # #  #    ##            #    #  #       #  # #  #       #    #
   #    #  #   ##  #   #  #           #    #  #       #   ##  #    #  #    #
    ####   #    #  #  #    #          #####   ######  #    #   ####   #    #

   Version 5.1.3                      Based on the Byte Magazine Unix Benchmark

   Multi-CPU version                  Version 5 revisions by Ian Smith,
                                      Sunnyvale, CA, USA
   January 13, 2011                   johantheghost at yahoo period com


1 x Arithmetic Test (int)  1Can't take log of 0 at ./Run line 935.

Original issue reported on code.google.com by [email protected] on 30 Mar 2012 at 1:19

fix: build for AIX

build on aix5.3, 6.1,...
need to fix Run and Makefile
in Makefile, make --> gmake
in Run, fix uname and locale
# Get the language info.
my $lang = getCmdOutput("printenv LANG");
#my $map = getCmdOutput("locale -k LC_CTYPE | grep charmap");
my $map = getCmdOutput("locale charmap");
#$map =~ s/.=//;
#my $coll = getCmdOutput("locale -k LC_COLLATE | grep collate-codeset");
my $coll = getCmdOutput("locale |grep LC_COLLATE");
$coll =~ s/.
=//;

# Get host system data.
$info->{'name'} = getCmdOutput("hostname");
$info->{'os'} = getCmdOutput("uname -o") || getCmdOutput("uname -s");
$info->{'osRel'} = getCmdOutput("uname -r");
$info->{'osVer'} = getCmdOutput("uname -v");
$info->{'mach'} = getCmdOutput("uname -p");
$info->{'platform'} = getCmdOutput("uname -s");

after i test, result is

BYTE UNIX Benchmarks (Version 5.1.3)

System: golddv: AIX
OS: AIX -- 3 -- 5
Machine: powerpc (AIX)
Language: en_US.utf8 (charmap=ISO8859-1, collate="C")
CPU: no details available
11:53AM up 2428 days, 1:25, 5 users, load average: 10.38, 9.80, 10.17; runlevel


Benchmark Run: Thu Jun 29 2017 11:53:18 - 12:23:59
unknown CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables 3395930.6 lps (10.0 s, 7 samples)
Double-Precision Whetstone 1592.4 MWIPS (10.0 s, 7 samples)
Execl Throughput 1250.0 lps (29.7 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 90747.4 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 30937.1 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 99916.0 KBps (30.0 s, 2 samples)
Pipe Throughput 388369.4 lps (10.0 s, 7 samples)
Pipe-based Context Switching 34468.4 lps (10.0 s, 7 samples)
Process Creation 2061.6 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 522.9 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 91.8 lpm (60.5 s, 2 samples)
System Call Overhead 270609.3 lps (10.0 s, 7 samples)

System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 3395930.6 291.0
Double-Precision Whetstone 55.0 1592.4 289.5
Execl Throughput 43.0 1250.0 290.7
File Copy 1024 bufsize 2000 maxblocks 3960.0 90747.4 229.2
File Copy 256 bufsize 500 maxblocks 1655.0 30937.1 186.9
File Copy 4096 bufsize 8000 maxblocks 5800.0 99916.0 172.3
Pipe Throughput 12440.0 388369.4 312.2
Pipe-based Context Switching 4000.0 34468.4 86.2
Process Creation 126.0 2061.6 163.6
Shell Scripts (1 concurrent) 42.4 522.9 123.3
Shell Scripts (8 concurrent) 6.0 91.8 153.0
System Call Overhead 15000.0 270609.3 180.4
========
System Benchmarks Index Score 193.2

Spawn has problem to exit.

When Process creation testing running, it may stuck, especially running at parallel prcoess creation.
I use gdb to see the status.
#0 0x00007fa17f8a912b in __lll_lock_wait_private () from /usr/lib/libc.so.6 #1 0x00007fa17f8a948f in __unregister_atfork () from /usr/lib/libc.so.6 #2 0x00007fa17f7daa69 in __cxa_finalize () from /usr/lib/libc.so.6 #3 0x00005576d2d1e298 in ?? () #4 0x00007ffc93a15480 in ?? () #5 0x00007fa17f9a08de in _dl_fini () from /lib64/ld-linux-x86-64.so.2

Then, I moved exit() from report() to main(). Added a variable to jump out While(1). The process can be stopped normally.

Run only recognize single core on ARM machine, getCpuInfofunction could not identify the correct cores

I tried to run unixbench on my ARM machine, but I found it only run single core score, and then ended.
And the running log shows :
0 CPUs in system; running 1 parallel copy of tests
...
...
System Benchmark Index Score ...
and then ended!

The reason is getCpuInfo function in Run script will read these info from /proc/cpuinfo:

processor : 0
...
model : 85
model name : Intel(R) Xeon(R) Gold ...
...
flags : fpu vme de pse tsc msr pae mce ...
bogomips : 4399.96
...

Bug a typical /proc/cpuinfo on ARM machine will be like:

Processor : ARMv7 Processor rev 2 (v7l)
BogoMIPS : 2007.04
Features : swp half thumb fastmult vfp edsp vfpv3 vfpv3d16
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x2
CPU part : 0xc09
CPU revision : 2

So the getCpuInfo function could not recongnize the correct cores because of the key words "model/model name/flags/bogomips" is not matched on ARM platform!

please don't break GNU tarball packaging conventions

I looked at 5.1.3 tarbal and was sad to see that it broke with the convenient 
name-version.tar.gz scheme (and a tarball containing name-version/ toplevel 
directory) but being some funky camelcase homegrown thing with a 
non-predictable directory inside.

Please read http://www.gnu.org/prep/standards/standards.html#Releases and don't 
change what you don't know, it might have been done properly already and 
distribution packagers like me won't become this grumpy.

Thanks for efforts though!

Original issue reported on code.google.com by [email protected] on 25 Sep 2011 at 1:50

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.