[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #58926] Octave gives wrong results with intel-

From: Archisman Panigrahi
Subject: [Octave-bug-tracker] [bug #58926] Octave gives wrong results with intel-mkl when diagonalizing large matrices
Date: Thu, 13 Aug 2020 12:27:10 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0

Follow-up Comment #32, bug #58926 (project octave):

Re comment #31, I have an entry level Intel i3 (4 cores) CPU.
I am using precompiled OpenBLAS libraries from the Ubuntu repositories. Will
compiling OpenBLAS in my machine significantly improve results? 

There are many threads about it in internet, some advise to compile OpenBLAS
and then compile Octave using that OpenBLAS, while some advise to compile
OpenBLAS and make it the default BLAS, and Octave (precompiled, from Ubuntu
repositories) will automatically use it. 

Can someone suggest which among these two methods will give better results?
Also, what kind of flags should be used while compiling OpenBLAS?

@Dmitri: Is OMP_NUM_THREADS somehow related to OpenBLAS? What is the best
practice for specifying the number of threads? (= number of cores?)

Anyway, here are my results with the precompiled OpenBLAS from default

octave:1> format long g
octave:2> clear all; n = 500; C = sin((1:n)' + (1:n).^2); for i = 100:-1:1,
tic; val(i) = max(eig(C)); t(i) = toc; end; clear i; assert(range(val)==0);
assert(all(abs(val - 16.914886497930) <= 1e-12)); [min(t), mean(t), median(t),
max(t), range(t), std(t)]
ans =

 Columns 1 through 3:

     0.417322158813477     0.441691470146179     0.441818952560425

 Columns 4 through 6:

     0.512679100036621    0.0953569412231445    0.0211517261113866

Here are the results with MKL and the environment variable workaround, for the
same code.

ans =

 Columns 1 through 3:

     0.136284112930298     0.148864336013794      0.13891065120697

 Columns 4 through 6:

     0.232420921325684    0.0961368083953857    0.0211357759595586


Reply to this item at:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]