[SciPy-User] Using LU Decomposition from UMFPACK?

Skipper Seabold jsseabold at gmail.com
Fri Mar 22 17:39:53 EDT 2013


On Fri, Mar 22, 2013 at 5:04 PM, Skipper Seabold <jsseabold at gmail.com>wrote:

> On Fri, Mar 22, 2013 at 4:50 PM, Skipper Seabold <jsseabold at gmail.com>wrote:
>
>> I thought I built scipy with UMFPACK support but I can't seem to get this
>> to work. I would like to do a sparse LU decomposition and recover the U
>> matrix.
>>
>> I built SuiteSparse so long ago, so might there have been a build issue I
>> haven't noticed until now?
>>
>> scipy.test() does not show any errors, though there are 28 skipped tests.
>>
>> Does this work for anyone?
>>
>> [~/]
>> [1]: from scipy import version
>>
>> [~/]
>> [2]: version.full_version
>> [2]: '0.13.0.dev-61f05fe'
>>
>> [~/]
>> [3]: from scipy.sparse.linalg.dsolve import umfpack
>>
>> [~/]
>> [4]: umf = umfpack.UmfpackContext()
>> Exception AttributeError: "'UmfpackContext' object has no attribute
>> '_symbolic'" in <bound method UmfpackContext.__del__ of
>> <scipy.sparse.linalg.dsolve.umfpack.umfpack.UmfpackContext object at
>> 0x56c0b10>> ignored
>>
>> ---------------------------------------------------------------------------
>> ImportError                               Traceback (most recent call
>> last)
>> <ipython-input-3-2e28850f247d> in <module>()
>> ----> 1 umf = umfpack.UmfpackContext("di")
>>
>> /usr/local/lib/python2.7/dist-packages/scipy/sparse/linalg/dsolve/umfpack/umfpack.pyc
>> in __init__(self, family, **kwargs)
>>     279                    a warning is issued (default: 1e12)"""
>>     280         if _um is None:
>> --> 281             raise ImportError('Scipy was built without UMFPACK
>> support. '
>>     282                               'You need to install the UMFPACK
>> library and '
>>     283                               'header files before building
>> scipy.')
>>
>> ImportError: Scipy was built without UMFPACK support. You need to install
>> the UMFPACK library and header files before building scipy.
>>
>> [~/]
>> [5]: from scipy import show_config
>>
>> [~/]
>> [6]: show_config()
>> amd_info:
>>     libraries = ['amd']
>>     library_dirs = ['/home/skipper/atlas_build2/lib']
>>     define_macros = [('SCIPY_AMD_H', None)]
>>     swig_opts = ['-I/home/skipper/atlas_build2/include']
>>     include_dirs = ['/home/skipper/atlas_build2/include']
>> umfpack_info:
>>     libraries = ['umfpack', 'amd']
>>     library_dirs = ['/home/skipper/atlas_build2/lib']
>>
>>     define_macros = [('SCIPY_UMFPACK_H', None), ('SCIPY_AMD_H', None)]
>>
>>     swig_opts = ['-I/home/skipper/atlas_build2/include',
>> '-I/home/skipper/atlas_build2/include']
>>
>>     include_dirs = ['/home/skipper/atlas_build2/include']
>> atlas_threads_info:
>>     libraries = ['lapack', 'ptf77blas', 'ptcblas', 'atlas']
>>     library_dirs = ['/home/skipper/atlas_build2/lib']
>>     define_macros = [('NO_ATLAS_INFO', -1)]
>>     language = f77
>>     include_dirs = ['/home/skipper/atlas_build2/include']
>> blas_opt_info:
>>     libraries = ['ptf77blas', 'ptcblas', 'atlas']
>>     library_dirs = ['/home/skipper/atlas_build2/lib']
>>     define_macros = [('NO_ATLAS_INFO', -1)]
>>     language = c
>>     include_dirs = ['/home/skipper/atlas_build2/include']
>> atlas_blas_threads_info:
>>     libraries = ['ptf77blas', 'ptcblas', 'atlas']
>>     library_dirs = ['/home/skipper/atlas_build2/lib']
>>     define_macros = [('NO_ATLAS_INFO', -1)]
>>     language = c
>>     include_dirs = ['/home/skipper/atlas_build2/include']
>> lapack_opt_info:
>>     libraries = ['lapack', 'ptf77blas', 'ptcblas', 'atlas']
>>     library_dirs = ['/home/skipper/atlas_build2/lib']
>>     define_macros = [('NO_ATLAS_INFO', -1)]
>>     language = f77
>>     include_dirs = ['/home/skipper/atlas_build2/include']
>> lapack_mkl_info:
>>   NOT AVAILABLE
>> blas_mkl_info:
>>   NOT AVAILABLE
>> mkl_info:
>>   NOT AVAILABLE
>>
>> Skipper
>>
>
> Ah, might it be this? From SuiteSparse/AMD/Doc/ChangeLog
>
> Jun 1, 2012: version 2.3.0
>
>     * changed from UFconfig to SuiteSparse_config
>

I suppose not. Also, does this look right? Should they be shared objects?
(I'm just about out of my depth)

[~/src/SuiteSparse]
|27 $ ls ~/atlas_build2/lib/
libamd.a    libcholmod.a     liblapack.a     libptlapack.a  libtstatlas.a
libatlas.a  libf77blas.a     libptcblas.a    libsatlas.so   libumfpack.a
libcblas.a  libf77refblas.a  libptf77blas.a  libtatlas.so

I have the -fPIC flag set when building SuiteSparse.

Skipper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20130322/954a7a39/attachment.html>


More information about the SciPy-User mailing list