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

Pauli Virtanen pav@iki...
Tue Jan 29 11:51:46 CST 2013

29.01.2013 19:46, Pauli Virtanen kirjoitti:
> 29.01.2013 05:47, ICool kirjoitti:
>> 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?
> Fortran integers are usually 32-bit. Fixing this issue would then
> require changes in the Fortran code.

You can file an enhancement request here for this:


However, I'm not promising to work on this in the near future, so unless
you want to tackle this yourself, it may take time before someone
volunteers to fix it.

I'm not fully sure how this is best fixed --- probably needs to use a
custom kind for the integer types, and it should be determined on
compile time whether the correct width is 4 or 8.

Pauli Virtanen

More information about the SciPy-User mailing list