help-octave
[Top][All Lists]
Advanced

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

Re: question on parallel processing


From: Joshua Rigler
Subject: Re: question on parallel processing
Date: Wed, 18 Oct 2006 10:20:01 -0600
User-agent: Thunderbird 1.5.0.7 (X11/20060913)

Jurzitza, Dieter wrote:
> Dear listmembers, is there any way for octave to do a parallel
> processing (i. e. when multiplying matrices, start 4 lines processing
> in parallel on 4 cpus), and if so, is there a pointer to a RTFM some
> kind person could point me to? Many thanks in advance, take care
>
>
> Dieter Jurzitza


Dieter,

In order to speed up certain matrix operations on shared memory multi-cpu systems, you can use ATLAS' posix threaded blas libraries (libptcblas.a, libptf77blas.a, and libatlas.a) instead of the default blas libraries. You may be able to download these precompiled, or you might have to compile them yourself...this email won't cover that process, which can be a bit tedious if you have a non-standard system.

If that all goes smoothly (BIG "if"), you should have threaded blas libraries for both C and F77. My notes are old, but they seem to agree with the config.log file I found in my old Octave source code directory. My configure invocation appears to have been (should be all on one line):

./configure --enable-shared --enable-dl --enable-lite-kernel --with-blas=-lptcblas -lptf77blas -latlas -lpthread --with-lapack=/usr/local/lib/liblapack.a

You'll note that I had to link explicitly to my own lapack library too. This was because I forced the "-fPic" option when compiling lapack.a in order to make it compatible with posix threads and the ATLAS libraries. Fedora, at the time, was compiling lapack with the "-fnoPic" option by default. Note also that this all assumes that your shiny new threaded blas libraries are already in the dynamic linker's default path, or you must append "LDFLAGS=-L/path/to/libs" to the command above. You might also be required to append "CPPFLAGS=-I/path/to/headers" so the compiler can find the necessary .h files.

Keep in mind that I did all of this well over a year ago, when the 2.9 snapshots were only a gleam in JWE's eyes. FWIW, I have since migrated to using the latest Octave and Octave-Forge packages available through Fedora Extras, which are NOT compiled to link to parallel blas libraries as far as I know. The hassle of recompiling everything every time a new version came out outweighed the improvements in performance I saw for only a handful of Octave matrix operations. I'd say that unless you have something you want to put into a production environment, it's not really worth all the trouble.

-EJR



reply via email to

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