[SciPy-user] calling scipy methods from fortran code...
fred
fredmfp@gmail....
Tue Jul 3 11:20:29 CDT 2007
Dominique Orban a écrit :
> fred wrote:
>
>> Dominique Orban a Ã©crit :
>>
>>> Fred,
>>>
>>> The de-facto standard for solving symmetric indefinite linear systems is a
>>> package called MA27 from the Harwell Subroutine Library. This one is available
>>> for free for non-commercial and research projects
>>> (http://hsl.rl.ac.uk/archive/hslarchive.html).
>>>
>>>
>>>
>> Dominique,
>>
>> I read on the nlpy page that MA27 is for sparse matrices.
>> My matrices are not sparse, but dense.
>> Should I still use it ?
>>
>
> If they are not too large, you certainly can use it. Otherwise, you can try
> Lapack routines that perform a Bunch-Parlett (or Bunch-Kaufmann) factorization.
> That factorization is often written L B L^T, by contrast with L D L^T which is
> the Cholesky factorization. The differences between the two are that
>
> 1) there is no sense trying to compute the L D L^T factorization of a symmetric
> indefinite matrix. This Cholesky factorization is only defined for symmetric
> positive definite matrices.
>
Yes, I know that.
I have initiated a thread about it a few months ago.
The Cholesky factorization is faster (~<2 times) than the LU, but does
not work for
my symmetric indefinite matrices. So I kept my code with the LU
version, until now.
The cvxopt is faster than LU (2 times) and work fine on my matrices. So
I'm quite happy.
Thanks to Nils.
Anyway, I got an issue.
cvxopt.lapack.sytr? only work on float64 matrices.
Mine are generally float32.
So I got a try with
foo = asarray(self.KM, dtype='d')
KM = matrix(foo)
but it complains about my matrices are not contiguous.
What's wrong ?
--
http://scipy.org/FredericPetit
More information about the SciPy-user
mailing list