By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,841 Members | 840 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,841 IT Pros & Developers. It's quick & easy.

Installing Numeric with ATLAS and LAPACK

P: n/a
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

Jul 18 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
> 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.

--
Regards,

Diez B. Roggisch
Jul 18 '05 #2

P: n/a
drife wrote:
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

Jul 18 '05 #3

P: n/a
>>>>> "drife" == drife <da*******@yahoo.com> writes:

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
Jul 18 '05 #4

P: n/a
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

Jul 18 '05 #5

P: n/a
>>>>> "drife" == drife <da*******@yahoo.com> writes:

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
Jul 18 '05 #6

P: n/a
drife wrote:
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

Jul 18 '05 #7

P: n/a
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

Jul 18 '05 #8

P: n/a
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

Jul 18 '05 #9

P: n/a
drife wrote:
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

Jul 18 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.