[SciPy-dev] lobpcg eigenvalue solver
Nils Wagner
nwagner@iam.uni-stuttgart...
Tue May 22 08:27:23 CDT 2007
Robert Cimrman wrote:
> 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...
>
>
O.k. The next problem is
Traceback (most recent call last):
File "test_lobpcg.py", line 17, in <module>
eigs,vecs = lobpcg.lobpcg(X,A,B)
File
"/usr/local/lib64/python2.5/site-packages/scipy/sandbox/lobpcg/lobpcg.py",
line 287, in lobpcg
gramYBY, blockVectorBY, blockVectorY )
UnboundLocalError: local variable 'gramYBY' referenced before assignment
Nils
>> 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.
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-dev
>
More information about the Scipy-dev
mailing list