[SciPy-user] Building 64bit scipy with ATLAS/LAPACK/UMFPACK in Fedora core 8

Antonino Ingargiola tritemio at gmail.com
Fri Jul 24 06:09:45 EDT 2009


Hi David,

2009/7/24 David Cournapeau <david at ar.media.kyoto-u.ac.jp>:
[cut]
>> I can I check if this scipy is correctly using the fast
>> atlas/lapack/umfpack libraries?
>>
>
> You can check as follows:
>    >>> import scipy
>    >>> scipy.show_config()
>    >>> import scipy.linalg.atlas_version
>
> To check the speed, you can just use numpy.dot. Basic blas vs. optimized
> ATLAS can be one order of magnitude different for large matrices (say
> 1000x1000, for example).

I get this:

    import numpy, scipy
    a=numpy.random.rand(1000,1000)
    b=numpy.random.rand(1000,1000)
    time c = numpy.dot(a,b)
    CPU times: user 0.55 s, sys: 0.01 s, total: 0.56 s
    Wall time: 0.56 s

so it seems is using the fast lapack? (On an Ubuntu machine in which
sfepy is very fast I get the same in 0.6 s)

Furthermore scipy.show_config() gives:

    amd_info:
        libraries = ['amd']
        library_dirs = ['/usr/lib64']

    umfpack_info:
        libraries = ['umfpack', 'amd']
        library_dirs = ['/usr/lib64']
        define_macros = [('SCIPY_UMFPACK_H', None)]
        swig_opts = ['-I/usr/include/suitesparse']
        include_dirs = ['/usr/include/suitesparse']

    atlas_threads_info:
      NOT AVAILABLE

    blas_opt_info:
        libraries = ['f77blas', 'cblas', 'atlas']
        library_dirs = ['/usr/lib64/atlas']
        define_macros = [('ATLAS_INFO', '"\\"3.6.0\\""')]
        language = c
        include_dirs = ['/usr/include/atlas']

    atlas_blas_threads_info:
      NOT AVAILABLE

    lapack_opt_info:
        libraries = ['lapack', 'f77blas', 'cblas', 'atlas']
        library_dirs = ['/usr/lib64/atlas']
        define_macros = [('ATLAS_INFO', '"\\"3.6.0\\""')]
        language = f77
        include_dirs = ['/usr/include/atlas']

    atlas_info:
        libraries = ['lapack', 'f77blas', 'cblas', 'atlas']
        library_dirs = ['/usr/lib64/atlas']
        language = f77
        include_dirs = ['/usr/include/atlas']

    lapack_mkl_info:
      NOT AVAILABLE

    blas_mkl_info:
      NOT AVAILABLE

    atlas_blas_info:
        libraries = ['f77blas', 'cblas', 'atlas']
        library_dirs = ['/usr/lib64/atlas']
        language = c
        include_dirs = ['/usr/include/atlas']

    mkl_info:
      NOT AVAILABLE

is it ok?

>> Are there any pitfalls on fedora core 8 regarding the numerical
>> libraries? I've read that some libraries are broken...
>>
>
> Generally, problems are with the packaged versions - ATLAS in particular
> is very hard to package correctly. If you build them by yourself
> correctly, there should be no problem. Just make sure you use the last
> released ATLAS (3.8.3 I believe at this time), and avoid LAPACK 3.2.0
> (i.e. use 3.1.1).

Given the above results the packages version of ATLAS/LAPACK should work fine.

How about testing if UMFPACK is used... maybe I should test a dot
product between sparse matrices but I don't know how to do it.

> cheers,
>
> David

Thanks,

   Antonio



More information about the SciPy-User mailing list