dijous, 26 de febrer del 2015

Benchmarking (Linpack)



Linpack on of the most popular benchmarks because it is used to create the Top500 list.

This is one of the first versions that you could run on a single core machine


mkdir linpack
cd linpack
mkdir base
cd base
wget http://www.netlib.org/benchmark/linpackc.new
mv linpackc.new linpack.new.c


Top500 is build using a more complex version

take care that a #define DP is writen in the source, so if you want to use single precision floating point numbers, you should remove that line.

To compile for double precission and single precission, simply type

sed -i '/#define DP/d' ./linpack.new.c
gcc -DDP -O4 -o linpack.new.dp linpack.new.c
gcc -DSP -O4 -o linpack.new.sp linpack.new.c

Fortunatelly there is an OpenMP implementation of the benchmark, although it is not exactly functionally equivalent


cd ..
mkdir omp_base 
cd omp_base
wget http://www.hpcs.cs.tsukuba.ac.jp/omni-compiler/xcalablemp/download/trunk/tests/clinpack/clinpack.c

To compile it, type

gcc -fopenmp -DUNROLL -DDP -DCTimer -DOMPC -DORDER=1000 -O4 -o linpack.omp clinpack.c

The numbers are a little bit puzzling, since it seems that the OpenMP version is slower than the original (?)

dimecres, 25 de febrer del 2015

Benchmarking (ParBoil)

These days, we are trying to find some benchmarks so we can compare the performance that we can get with a many-soft-core, compared to other alternative systems (CPUs, GPUs, etc).

The requirements of this benchmark is that
  • should be written in C/C++
  • would be good to have implementations for alternative target platforms (Cuda, OpenCL, etc.)
  • should allow different size of data, so that we can use the problems sizes that fit into limited memory of the FPGA

Parboil looks like a good candidate

http://impact.crhc.illinois.edu/Parboil/parboil_download_page.aspx

you can also download it from phoronix-test-suite

wget http://www.phoronix-test-suite.com/benchmark-files/pb2.5driver.tgz
wget http://www.phoronix-test-suite.com/benchmark-files/pb2.5benchmarks.tgz
wget http://www.phoronix-test-suite.com/benchmark-files/pb2.5datasets_standard.tgz

you have to decompress the files and organize them into your filesystem

tar -xvf pb2.5driver.tgz
tar -xvf pb2.5benchmarks.tgz
tar -xvf pb2.5datasets_standard.tgz
mv benchmarks/ parboil/
mv datasets/ parboil/

you could have tried to avoid downloading the datasets (because it is a big file) but then the python script fails with an unconsistent error message ("benchmark directory not found")

so, at this point you can list the available benchmarks

cd parboil
./parboil list

to compile the files you first need a Makefile.conf in common directory, we create an empty one to start. And then we compile the base (simple sequencial C) version of an example e.g. bfs

touch common/Makefile.conf
./parboil compile bfs base

after compilation, you just need to specify the dataset to run it

./parboil run bfs base NY

we keep on looking other benchmarks