[SciPy-User] scipy 64bit cannot handle very large matrix (integer overflow)

ICool devfreedom@gmail....
Mon Jan 28 21:47:21 CST 2013

Hi All,

I am using arpack package for a eigen problem.  The matrix is very sparse
but also very big.  The dimension is even out of the UINT32 range.  I use
shift-invert to find the minimal eigenvals and associated eigenvalues. The
code crashes and returns the follow error message:

I found that '1434729898' is a UINT32 number overflowed from '5729697194'.
Looking at the code, it seems that the error is from the Fortran function
'gmresrevcom', where it is still using 32-bit integer as the input
parameter. I am using 64bit python.  Why is the Fortran function 32bit?
Will it be a general issue for other Fortran functions?  Is there anyway to
fix it?

0-th dimension must be fixed to 1434729898 but got 5729697194
Traceback (most recent call last):
  File "BigMatrixEigen.py", line 108, in <module>
  File "BigMatrixEigen.py", line 97, in main
    vals, vecs = eigsh(**sigsh_params)
line 1557, in eigsh
line 565, in iterate
    self.workd[yslice] = self.OPa(self.workd[Bxslice])
  File "E:\code\lib\site-packages\scipy\sparse\linalg\interface.py", line
123, in matvec
    y = self._matvec(x)
line 960, in _matvec
    b, info = self.ifunc(self.M, x, tol=self.tol)
  File "<string>", line 2, in gmres
  File "E:\code\lib\site-packages\scipy\sparse\linalg\isolve\iterative.py",
line 82, in non_reentrant
    return func(*a, **kw)
  File "E:\code\lib\site-packages\scipy\sparse\linalg\isolve\iterative.py",
line 446, in gmres
    revcom(b, x, restrt, work, work2, iter_, resid, info, ndx1, ndx2, ijob)
_iterative.error: failed in converting 4th argument `work' of
_iterative.dgmresrevcom to C/Fortran array
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20130128/f0bae132/attachment.html 

More information about the SciPy-User mailing list