octave-bug-tracker
[Top][All Lists]
Advanced

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

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


From: anonymous
Subject: [Octave-bug-tracker] [bug #58926] Octave gives wrong results with intel-mkl when diagonalizing large matrices
Date: Mon, 10 Aug 2020 15:10:41 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0

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

BTW, independent of the BLAS and OMP question, you can speed up the rest of
your code with vectorization:


octave:21> clear a b c d
octave:22> tic; for a = 1:500, for b = 1:500, c(a,b) = sin(a + b^2); endfor;
endfor; toc
Elapsed time is 0.85335 seconds.
octave:23> tic; d = sin((1:500)' + (1:500).^2); toc
Elapsed time is 0.00294185 seconds.
octave:24> assert(all(all(c==d)))
octave:25> 


It's roughly 290 times faster to avoid the for-loops in this case (853 ms vs 3
ms).

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58926>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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