Installing Numeric with ATLAS and LAPACK

D

drife

Hello,

Could someone please provide instructions for install Numeric
with ATLAS and LAPACK?

I've actually done this correctly, I think. But I don't see any
difference in the speed.

I'm calculating eigenvalues for a 3600 X 3600 covariance matrix.

Calculating the eigenvalues for this matrix requires a mere 7 min
in Matlab 6.5...which uses ATLAS and LAPACK.


Thanks,


Daran
 
D

Diez B. Roggisch

Could someone please provide instructions for install Numeric
with ATLAS and LAPACK?

No idea - but telling us what os and versions of python and numeric you use
might make others comment on that.
 
C

Carl

drife said:
Hello,

Could someone please provide instructions for install Numeric
with ATLAS and LAPACK?

I've actually done this correctly, I think. But I don't see any
difference in the speed.

I'm calculating eigenvalues for a 3600 X 3600 covariance matrix.

Calculating the eigenvalues for this matrix requires a mere 7 min
in Matlab 6.5...which uses ATLAS and LAPACK.


Thanks,


Daran

What functions from ATLAS and LAPACK are you using?

Carl
 
J

John Hunter

drife> Hello, Could someone please provide instructions for
drife> install Numeric with ATLAS and LAPACK?

Locate libcblas.a and add that dir to the setup.py library_dirs_list.
Eg on my system, /usr/local/lib/ATLAS/lib/Linux_P4SSE2_2/libcblas.a

setup.py:

library_dirs_list = ['/usr/local/lib/ATLAS/lib/Linux_P4SSE2_2']

Do the same for cblas.h and add it to the include_dirs var in
setup.py, on my system it is /usr/local/lib/ATLAS/include/cblas.h, so
in setup.py

include_dirs = ['/usr/local/lib/ATLAS/include/', '/usr/include/atlas']

Then python setup.py install *should* work.

JDH
 
D

drife

Thanks John. Those are the steps I followed, and to no avail.

Interestingly, I downloaded and installed SciPy, and ran the
same eigenvector problem. SciPy greatly speeds up the
calculation...was 1.5 hours using Numeric, now only 15 min
with SciPy.

Unfortunately, SciPy only solves ordinary and generalized
eigenvalue problems of a square matrix. They do not test
to see if the matrix is symmetric, then call the appropriate
routine from LAPACK.


Daran
 
J

John Hunter

drife> Thanks John. Those are the steps I followed, and to no
drife> avail.

Make sure you get a clean build by rm -rf ing the build dir before you
build again. Then capture the output of your build to a file. When
you say "to no avail" what do you mean -- that the calculation was
slower. If you still have troubles, post again to the
numpy-discussion list listing what you did and the output of the build
process.

Good luck!
JDH
 
F

Fernando Perez

drife said:
Thanks John. Those are the steps I followed, and to no avail.

Interestingly, I downloaded and installed SciPy, and ran the
same eigenvector problem. SciPy greatly speeds up the
calculation...was 1.5 hours using Numeric, now only 15 min
with SciPy.

Unfortunately, SciPy only solves ordinary and generalized
eigenvalue problems of a square matrix. They do not test
to see if the matrix is symmetric, then call the appropriate
routine from LAPACK.

Note that scipy exposes most of lapack, so you could make the call you need
directly:

In [3]: scipy.linalg.lapack.get_lapack_funcs?
Type: function
Base Class: <type 'function'>
String Form: <function get_lapack_funcs at 0x40402c6c>
Namespace: Interactive
File: /usr/lib/python2.3/site-packages/scipy/linalg/lapack.py
Definition: scipy.linalg.lapack.get_lapack_funcs(names, arrays=(), debug=0,
force_clapack=1)
Docstring:
Return available LAPACK function objects with names.
arrays are used to determine the optimal prefix of
LAPACK routines.
If force_clapack is True then available Atlas routine
is returned for column major storaged arrays with
rowmajor argument set to False.

Cheers,

f
 
D

drife

Hi John,

When I built Numeric with ATLAS and LAPACK, the eigenvalue
calculation took the same amount of time.

Per your suggestion, I will capture the output of the build and post
it to the Numpy discussion group.


Thanks,


Daran
 
D

drife

Could you clarify this please?

Let's say that I want to make a call to the LAPACK
routine sspevd, and pass it a matrix, and get the result. How do I
accomplish this?


Thanks,


Daran
 
F

Fernando Perez

drife said:
Could you clarify this please?

Let's say that I want to make a call to the LAPACK
routine sspevd, and pass it a matrix, and get the result. How do I
accomplish this?

I just had a quick look, and it seems that sspevd is NOT one of the already
wrapped LAPACK functions. Try

dir(scipy.linalg.flapack)

and

dir(scipy.linalg.clapack)

to see what's been already wrapped. From what I understand, wrapping more of
lapack is rather easy, it's just that nobody has committed the time to 100%
coverage.

But this question is much better posed on the scipy list, where the people who
wrote the lapack wrapping code can give you a better answer (I didn't).

Cheers,

f
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top