This folder contains a simple matrix-multiplication routine to test the performance of 5 BLAS implementations - ACML , ATLAS , EIGEN , MKL and OpenBLAS. All the libraries are assumed to be already installed in the system.
- Go inside each folder.
- Open compile.sh and put in the appropriate paths.
- sh compile.sh
This will product two executables in each folder
-
a.out This is the single-threaded version of matrix-multiplication.
-
ap.out This is the multithreaded version of matrix-multiplication. The number of threads can be controlled by setting OMP_NUM_THREADS variables.
Note that the number of threads for the ATLAS library is determined at compile time and cannot be dynamically changed. The OMP_NUM_THREADS variable has no effect on ATLAS
There are three shell scripts,
-
run_single_cpu.sh
Computes the average matrix-multiplication time (over 5 runs) for each implementation on progressively increasing sizes of the matrices.
-
run_multiple_cpu.sh
Computes the average matrix-multiplication time (over 5 runs) for each implementation on progressively increasing sizes of the matrices and increasing number of threads.
-
run_scaling.sh
Computes the average matrix-multiplication time (over 5 runs) for each implementation on a 5000x5000 matrix with increasing number of threads.
Some handy plotting tools based on R are provided in the graphics folder