This is a place where people can discuss massiv and possibly other array libraries in Haskell.
hmatrix is using many cores?
Ye sit does
is it compiled with openblas?
Yes it is.
I thought standard blas/lapack is single core only
It is definitely multicore. It can be turned off of course: https://github.com/NixOS/nixpkgs/blob/b3d6fd4a09265b6777f02ee06ed1763d67a970bb/pkgs/development/libraries/science/math/openblas/default.nix#L13
you need a flag to hmatrix to use it, too
you mean this one, right? https://github.com/lehins/massiv-benchmarks/blob/b1ba02436e1ff66100efeb887395356d9bd0a279/hmatrix-bench/stack-ghc-8.4.yaml#L17-L19
openblas
makes hmatrix just a little bit slower. I don't remember how I got "orders of magnitude" difference, but in my defence it has been a while since I looked at it:benchmarking HMatrix/MxM Double - (500x800 X 800x500)/Par
time 9.140 ms (4.980 ms .. 12.18 ms)
0.527 R² (0.349 R² .. 0.651 R²)
mean 4.794 ms (2.775 ms .. 6.977 ms)
std dev 5.082 ms (3.646 ms .. 5.969 ms)
variance introduced by outliers: 98% (severely inflated)
benchmarking HMatrix/MxM Float - (500x800 X 800x500)/Par
time 6.678 ms (4.953 ms .. 8.027 ms)
0.743 R² (0.519 R² .. 0.907 R²)
mean 6.208 ms (5.417 ms .. 6.890 ms)
std dev 1.838 ms (1.391 ms .. 2.718 ms)
variance introduced by outliers: 94% (severely inflated)
benchmarking Massiv/MxM P Double - (500x800 X 800x500)/Par
time 6.874 ms (6.559 ms .. 7.147 ms)
0.991 R² (0.987 R² .. 0.995 R²)
mean 7.485 ms (7.157 ms .. 8.063 ms)
std dev 1.246 ms (789.7 μs .. 1.867 ms)
variance introduced by outliers: 79% (severely inflated)
benchmarking Massiv/MxM P Float - (500x800 X 800x500)/Par
time 6.783 ms (6.671 ms .. 6.896 ms)
0.997 R² (0.993 R² .. 0.999 R²)
mean 6.832 ms (6.766 ms .. 6.933 ms)
std dev 238.9 μs (168.5 μs .. 365.5 μs)
variance introduced by outliers: 16% (moderately inflated)
98% (severely inflated)
taht's normal for multi core benchmarks
-N
since it uses parallelization on C side
we are talking results without openblas now, right?
openblas or blas
Cause it seems hmatrix
uses either or:
if flag(openblas)
if !flag(disable-default-paths)
extra-lib-dirs: /usr/lib/openblas/lib
extra-libraries: openblas
else
extra-libraries: blas lapack