Roy Longbottom’s PC Benchmark Collection comprises numerous FREE benchmarks and reliability testing programs, for processors, caches, memory, buses, disks, flash drives, graphics, local area networks and Internet. Original ones run via DOS and later versions under all varieties of Windows. Most have also been converted to run under Linux on PCs. and many to run via Android on tablets and phones. Some of the Linux variety C/C++ source code was changed slightly to compile for execution on the Raspberry Pi.
After reading that compilation time on the Raspberry Pi was painfully slow, the programs were compiled on a Linux Ubuntu 12.04 based PC via Rasbian Toolchain using instructions downloaded from www.xappsoftware.com. This allows programs to be compiled from a Terminal window. Using this, the C/C++ code can be firstly compiled to run on the Linux driven PC, then transferred to the Raspberry Pi via LAN or a USB flash drive. In order to execute after transferring, a change to Properties, Permissions is needed to make executable. One complication is that setting the path to the cross compiler did not work as suggested by xappsoftware. Below are examples of commands used for the two executable files – note the path for gcc:
cc whets.c cpuidc.c -lm -O3 -o whetstoneIL ~/toolchain/raspbian-toolchain-gcc-4.7.2-linux32/bin/arm-linux-gnueabihf-gcc whets.c cpuidc.c -lm -O3 -march=armv6 -mfloat-abi=hard -mfpu=vfp -o whetstonePiA6 Command to execute - ./whetstonePiA6
The last three parameters (-march to -mfpu) made no difference to performance, but others are likely to be needed to take advantage of later ARM floating point functions. Note, the first four benchmark programs were compiled later on the Raspberry Pi itself. Both the above cc and gcc (with no Toolchain path) commands were used for compilation. These and the PC based files all produced the same numeric results and mainly the same performance. Compilation time was acceptable at between 8 and 36 seconds.
The benchmarks and source codes can be downloaded in Raspberry_Pi_Benchmarks.zip. This includes the executables compiled, as above, to run on Intel CPUs via Linux and the versions compiled on the Raspberry Pi. To download the benchmarks, click on the Raspberry_Pi_Benchmarks.zip link, select Save to download to Home (assume /home/pi). Open File Manager and right click on zip file and select Extract here.
To enable execution of the programs, a security setting is required. Double click on Raspberry_Pi_Benchmarks folder to open, right click on each executable (dhrystonePiA6, linpackPiA6, linpackPiSP, liverloopsPiA6, memspeedPiA6, whetstonePiA6), select Properties, Permissions, tick Make the file executable. The new program titles mainly end in PiA7.
To run, open LX Terminal, type cd Raspberry_Pi_Benchmarks to enter the directory, type ls to ensure the path is correct and to list files, then execute for example using ./dhrystonePiA6. Information will be displayed as the benchmarks are running and results will be saved in log files, example Dhry.txt.