[SciPy-Dev] ERROR: test_arpack.test_hermitian_modes

Nils Wagner nwagner@iam.uni-stuttgart...
Sun Jun 19 03:10:52 CDT 2011


On Sun, 19 Jun 2011 01:54:51 +0000 (UTC)
  Pauli Virtanen <pav@iki.fi> wrote:
> On Sat, 18 Jun 2011 23:42:44 +0200, Nils Wagner wrote:
>> Thank you for very much for the extension to generalized 
>>eigenvalue
>> problems.
> 
> You should thank Jake V. instead, I just merged his 
>work.

O.k. I wasn't aware of that. Thanks a lot Jake for 
implementing GEWP !
> 
> [clip]
>> ======================================================================
>> ERROR: test_arpack.test_hermitian_modes(True, 
>><gen-hermitian>, 'F', 2,
>> 'SM', None, None, <function aslinearoperator at 
>>0x2640a28>)
>> ----------------------------------------------------------------------
> [clip]
>> ValueError: Error in inverting M: function gmres did not 
>>converge (info
>> = 60).
> 
> Check that you have a working GMRES: try e.g.
> 
> import numpy as np
> import scipy.sparse.linalg
> A = np.random.rand(6, 6) + 1j*np.random.rand(6, 6)
> b = np.random.rand(6) + 1j*np.random.rand(6)
> x, info = scipy.sparse.linalg.gmres(A, b)
> y = np.linalg.solve(A, b)
> print abs(x - y).max()
> 
The example works for me. However, if I increase the 
dimension of the random matrix to 60,
the residual is of order 10^0.
  
> I've noticed that at gfortran 4.5.2 miscompiles Scipy's 
>gmres routine
> with -O0.
> 
>> FAIL: test_arpack.test_hermitian_modes(True, 
>><gen-hermitian>, 'D', 2,
>> 'LM', None, None, <function aslinearoperator at 
>>0x2640a28>)
>> ----------------------------------------------------------------------
> 
> This one looks like a precision issue. Can you try 
>increasing the
> `1000` prefactor e.g. to `2000` for the _rtol and _atol 
>values for
> float64 in test_arpack.py, to see how large it needs to 
>be for your 
> system.
> 
The problem persists if I increase the prefactor to 2000. 
i.e.


======================================================================
ERROR: test_arpack.test_hermitian_modes(True, 
<gen-hermitian>, 'F', 2, 'SM', None, None, <function 
aslinearoperator at 0xe12e60>)
----------------------------------------------------------------------
Traceback (most recent call last):
   File 
"/home/nwagner/local/lib64/python2.6/site-packages/nose-0.11.2.dev-py2.6.egg/nose/case.py", 
line 183, in runTest
     self.test(*self.arg)
   File 
"/home/nwagner/git/scipy/scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py", 
line 168, in eval_evec
     eval, evec = eigs_func(ac, k, bc, **kwargs)
   File 
"/home/nwagner/local/lib64/python2.6/site-packages/scipy/sparse/linalg/eigen/arpack/arpack.py", 
line 1425, in eigsh
     OPinv=OPinv)
   File 
"/home/nwagner/local/lib64/python2.6/site-packages/scipy/sparse/linalg/eigen/arpack/arpack.py", 
line 1251, in eigs
     params.iterate()
   File 
"/home/nwagner/local/lib64/python2.6/site-packages/scipy/sparse/linalg/eigen/arpack/arpack.py", 
line 727, in iterate
     self.workd[yslice] = self.OP(self.workd[xslice])
   File 
"/home/nwagner/local/lib64/python2.6/site-packages/scipy/sparse/linalg/eigen/arpack/arpack.py", 
line 641, in <lambda>
     self.OP = lambda x: Minv_matvec(matvec(x))
   File 
"/home/nwagner/local/lib64/python2.6/site-packages/scipy/sparse/linalg/interface.py", 
line 123, in matvec
     y = self._matvec(x)
   File 
"/home/nwagner/local/lib64/python2.6/site-packages/scipy/sparse/linalg/eigen/arpack/arpack.py", 
line 945, in _matvec
     % (self.ifunc.__name__, info))
ValueError: Error in inverting M: function gmres did not 
converge (info = 60)
  

Nils


More information about the SciPy-Dev mailing list