Octave, ATLAS, and Large Matricies

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Octave, ATLAS, and Large Matricies

evansste
I've been careful to vectorize my programs so that they'll be efficient.  My
computer has lots of RAM (1TB) and many cores (32), but when it comes to
matrix operations, performance is less than what I would expect.

Here's an example of a simple program.

A = rand(162000000,15)>0.5;
B = rand(162000000,15);
C = rand(162000000,15);
tic;
D = ~A&B~=0;
B(D) = B(D)+C(D);
toc;

When I run this program, the "tic/toc" section takes 85.2911 seconds.
Because these are all matrix operations, I expected this to run very
quickly.  However I later learned that Octave doesn't use multiple cores, by
default, and that compiling with ATLAS may allow Octave to use multiple
cores.  Am I correct to believe that compiling Octave with ATLAS would speed
up this program, or would multi-threading not help this situation?

I have no experience with multi-threaded programs.  Am I on the right track?
Would compiling, with ATLAS, improve performance in this scenario?

If anyone has any experience with an ATLAS/Octave installation, I'd love to
hear your thoughts on this.  Thanks for your time.
 



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Octave, ATLAS, and Large Matricies

Dmitri A. Sergatskov


On Mon, Sep 11, 2017 at 12:26 PM, evansste <[hidden email]> wrote:
I've been careful to vectorize my programs so that they'll be efficient.  My
computer has lots of RAM (1TB) and many cores (32), but when it comes to
matrix operations, performance is less than what I would expect.

Here's an example of a simple program.

A = rand(162000000,15)>0.5;
B = rand(162000000,15);
C = rand(162000000,15);
tic;
D = ~A&B~=0;
B(D) = B(D)+C(D);
toc;

When I run this program, the "tic/toc" section takes 85.2911 seconds.
Because these are all matrix operations, I expected this to run very
quickly.  However I later learned that Octave doesn't use multiple cores, by
default, and that compiling with ATLAS may allow Octave to use multiple
cores.  Am I correct to believe that compiling Octave with ATLAS would speed
up this program, or would multi-threading not help this situation?

I have no experience with multi-threaded programs.  Am I on the right track?
Would compiling, with ATLAS, improve performance in this scenario?

If anyone has any experience with an ATLAS/Octave installation, I'd love to
hear your thoughts on this.  Thanks for your time.


​I do not believe those particular operations involve blas/lapack library, so I do not
think using threaded atlas (or openblas) would help.
But you would see a lot of improvements on things like
a\b or a*b


​Dmitri.
--



_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Octave, ATLAS, and Large Matricies

evansste
Thanks, Dmitri.  You just saved me a lot of time, frustration and
disappointment.



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Octave, ATLAS, and Large Matricies

evansste
I've been searching for a software package, similar to ATLAS, which may offer
the type of operations I've described -- particularly matrix indexing.  For
example A(C) = B(C).

I'm also looking for something that allows parallelized matrix replication,
similar to MATLAB's "repmat" function.  For example, B = repmat(A,3,1).

I've noticed that MATLAB has parallelized their repmat function in their
latest versions of MATLAB.  However, I don't believe that matrix indexing
has been parallelized.

I've grown quite fond of Octave, and would love to find a package, similar
to ATLAS, which would allow these types of operations on multiple cores.
Then maybe I could compile that software with Octave, from source, and have
a parallel version of Octave.

Is anyone aware of any software packages that offer anything like this?

I greatly appreciate your time, and any suggestions anyone may have.



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave