[SciPy-dev] simple UMFPACK wrapper added

Robert Cimrman cimrman3 at ntc.zcu.cz
Tue Dec 6 07:25:59 CST 2005


I just added a simple swig-generated wrapper of UMFPACK sparse linear 
solver to the SciPy sandbox. It is very small and does not depend on any 
other package except scipy.base and scipy.sparse. Below you can find its 
performance compared with the current SuperLU-based implementation 
(scipy.sparse.solve()) on matrices corresponding to the Poisson equation 
(e.g. temperature distribution). The test script is included in the 
sandbox, too.

The brave and interested  can test it, but first you will have to edit 
the setup.py (a very basic one, needs scipyfication), since the paths to 
umfpack and scipy are hardcoded.

Awaiting your feedback,
r.

**************************************************
url: mtxAA
file: mtxAA
format: triplet
reading...
ok
size              : (240, 240) (2682 nnz)
umfpack           : 0.00 s
||Ax-b||          : 5.25488472447e-17
||x - x_{exact}|| : 2.10942374679e-15
Use minimum degree ordering on A'+A.
sparse.solve      : 0.01 s
||Ax-b||          : 1.04615897916e-16
||x - x_{exact}|| : 4.44366678924e-15
**************************************************
url: mtxBB
file: mtxBB
format: triplet
reading...
ok
size              : (2706, 2706) (34664 nnz)
umfpack           : 0.12 s
||Ax-b||          : 1.3700207406e-13
||x - x_{exact}|| : 1.75496026659e-14
Use minimum degree ordering on A'+A.
sparse.solve      : 1.18 s
||Ax-b||          : 3.5072700769e-13
||x - x_{exact}|| : 7.46831110403e-14
**************************************************
url: mtxCC
file: mtxCC
format: triplet
reading...
ok
size              : (33718, 33718) (482570 nnz)
umfpack           : 36.68 s
||Ax-b||          : 3.17661662319e-15
||x - x_{exact}|| : 4.91723530478e-14
Use minimum degree ordering on A'+A.
Can't expand MemType 0: jcol 26067
       -> SIGSEGV after about 1 hour (on 2 GB RAM).
sparse.solve      : infinity




More information about the Scipy-dev mailing list