On 15.10.2019 12:49, Marcin Błażejowski wrote:
On 15.10.2019 12:31, Artur Tarassow wrote:
Am 15.10.19 um 12:18 schrieb Marcin Błażejowski:
Hi,

I'd like to compare speed of algebra operations when gretl uses
OpenBlas+openmp or OpenBlas+pthreads or Atlas and I'm looking for a
simple and effective script for such comparison.

9 years ago Alling posted 'matmult_test.inp', is this code sufficient
for my task?

Marcin
Hi Marcin,

is the matrix_perf package something for you?
Looks like, thaks Artur!!!

Best,
Marcin

Ok, I conducted the following "research":

Scenario: two BLAS/LAPACK libraries available in Debian, i.e. Atlas or OpenBlas.
Libraries were either taken from repo (Atlas and OpenBlas with pthreads) or recompiled with agressive optimisation (OpenBlas with pthreads and OpenBlas with OpenMP)*.

Environment: three generations of CPUs: 'ancient' AMD Phenom II, 'middle ages' Intel i5-4th gen and 'industrial' Intel i7-8th gen**.

Comparison: TOPSIS like analysis and ratio of being the best (in terms of max(Gflops)).

Robustness: each test was ran just ones, unfortunately.

* agressive optimisation means '-march=MY_CPU_BRENCH -O3' flags for gcc/g++/gfortran compilers and in case of OpenBLAS 'target=MY_CPU_FAMILY'.
** 'industrial' CPU was tested with and without Hyper-Threading (HT).


Results: detailed results in attached spreadsheet, but I can say that:

1. Hyper-Threading is a hindrance mostly.
2. Never use Atlas, but if you have to, turn on Hyper-Threading.
3. In case of 'ancient' CPU, OpenBlas with pthreads wins, so warning "gretl is built using OpenMP, but is linked against..." does not hurt.
4. In case of '
middle ages' CPU, OpenBlas with OpenMP slightly wins, so warning "gretl is built using OpenMP, but is linked against..." may hurt.
5. In case of '
industrial' CPU, OpenBlas with OpenMP beats the rest, so warning "gretl is built using OpenMP, but is linked against..." hurts.

Marcin

-- 
Marcin Błażejowski