[SciPy-user] umfpack installation (and dsolve error)

Nils Wagner nwagner@iam.uni-stuttgart...
Mon Mar 23 12:26:54 CDT 2009


On Mon, 23 Mar 2009 16:41:02 +0000 (UTC)
  Eric Friedman <ejf27@cornell.edu> wrote:
> Hi, sorry for the newbie question.
> 
> I'd like to install umfpack, but am confused on what to 
>do. I downloaded
> easy_installer, but where do I get the full umfpack etc.
> 
> btw, the reason for this is that I'm having a problem 
>with dsolve which I think
> is a bug, but may just be my error.
> 
> for example:
> 
> a=matrix([[1,1],[1,1]])
> b= matrix([.5,.5]).T
> dsolve(a,b)
> yields [.5,.5]
> which is not a solution of ax=b  - I think...
> (I also entered the matrix as sparse)
> 
> any ideas what's going on here?
> 
> thanks,
> Eric
> 
Hi Eric,

You may use

svn co http://svn.scipy.org/svn/scikits/trunk/umfpack

to download the scikits package "umfpack".

cd umfpack
rm -rf build
python setup.py install --prefix=$HOME/local 
--single-version-externally-managed --record=/dev/null

You will need the libraries libumfpack.a and libamd.a

Please not that your (dense) matrix is singular.

from scikits import umfpack as um
from scipy.sparse import csr, csr_matrix
import numpy as np
a = csr_matrix(np.matrix([[1,1],[1,1.]]))
b = np.array([.5,.5])
umfpack = um.UmfpackContext()
sol = umfpack( um.UMFPACK_A, a, b, autoTranspose = True )


python -i eric.py
warning: singular matrix
zeroing nan and inf entries...
warning: (almost) singular matrix! (estimated cond. 
number: inf)

I am using opensuse11.1 which comes with the corresponding
libraries libumfpack.a and libamd.a

Nils


rpm -qi amd
Name        : amd                          Relocations: 
(not relocatable)
Version     : 2.2.0                             Vendor: 
packman.links2linux.de
Release     : 0.pm.1                        Build Date: Fr 
12 Dez 2008 14:58:29 CET
Install Date: Mi 11 Feb 2009 21:10:18 CET      Build Host: 
pmbs
Group       : System/Libraries              Source RPM: 
amd-2.2.0-0.pm.1.src.rpm
Size        : 185753                           License: 
LGPL
Signature   : DSA/SHA1, Fr 12 Dez 2008 14:59:11 CET, Key 
ID f899f20d9a795806
Packager    : Andrea Florio <andrea@links2linux.de>
URL         : http://www.cise.ufl.edu/research/sparse/amd/
Summary     : Approximate minimum degree ordering
Description :
AMD is a set of routines for ordering a sparse matrix 
prior to Cholesky
factorization (or for LU factorization with diagonal 
pivoting). There are
versions in both C and Fortran.

Note that this software has nothing to do with AMD the 
company.
Distribution: openSUSE 11.1 (x86_64)


rpm -qi libumfpack5_2_0
Name        : libumfpack5_2_0              Relocations: 
(not relocatable)
Version     : 5.2.0                             Vendor: 
packman.links2linux.de
Release     : 2.pm.1                        Build Date: Fr 
12 Dez 2008 15:03:53 CET
Install Date: Mi 11 Feb 2009 21:10:16 CET      Build Host: 
pmbs
Group       : System/Libraries              Source RPM: 
umfpack-5.2.0-2.pm.1.src.rpm
Size        : 748639                           License: 
GPL v2 or later
Signature   : DSA/SHA1, Fr 12 Dez 2008 15:04:57 CET, Key 
ID f899f20d9a795806
Packager    : Andrea Florio <andrea@links2linux.de>
URL         : 
http://www.cise.ufl.edu/research/sparse/umfpack/
Summary     : Library of routines for solving unsymmetric 
sparse linear systems
Description :
UMFPACK provides a set of routines for solving unsymmetric 
sparse
linear systems Ax=b using the Unsymmetric MultiFrontal 
method. It is
written in ANSI/ISO C. Note that "UMFPACK" is pronounced 
in two
syllables, "Umph Pack"; it is not "You Em Ef Pack".

This package contains the library needed to run programs 
dynamically
linked against UMFPACK.
Distribution: openSUSE 11.1 (x86_64)



More information about the SciPy-user mailing list