[SciPy-dev] lobpcg eigenvalue solver

Robert Cimrman cimrman3 at ntc.zcu.cz
Tue May 22 08:36:34 EDT 2007


Nils Wagner wrote:
> Traceback (most recent call last):
> 
>   File "test_lobpcg.py", line 17, in ?
>     w = lobpcg.lobpcg(X,A,B)
>   File
> "/usr/lib64/python2.4/site-packages/scipy/sandbox/lobpcg/lobpcg.py",
> line 148, in lobpcg
>     residualTolerance = sqrt( 1e-15 ) * n
> NameError: global name 'sqrt' is not defined

Thanks, it should be nm.sqrt...

> Cheers,
>                    Nils
> 
> P.S. Is there a specific reason why you have used a pure python
> implementation ?

Because otherwise I would have to take care of providing optimized
BLAS/LAPACK functions to the abstract LOBPCG core. This way I get the
optimized dot, cholesky, etc. for free, without the gory details of
detecting the right libraries myself... It is also better for future
extensibility.

The current implementation works and gives the same results as the
reference matlab version by the LOBPCG algorithm author(s), but it is
slower, so some optimization/profiling will be required. BTW. the matlab
version is much faster than a naive implementation in C (without BLAS) ...

cheers,
r.



More information about the SciPy-Dev mailing list