[SciPy-user] Trouble with linsolve

Robert Cimrman cimrman3 at ntc.zcu.cz
Wed Nov 29 04:47:35 EST 2006


Nils Wagner wrote:
> Robert Cimrman wrote:
>> Nils Wagner wrote:
>>   
>>> With UMFPACK 4.4 and a dense RHS I get
>>>
>>>     x = spsolve(K_dyn, f)
>>>   File "/usr/lib64/python2.4/site-packages/scipy/linsolve/linsolve.py",
>>> line 65, in spsolve
>>>     return umf.linsolve( umfpack.UMFPACK_A, mat, b, autoTranspose = True )
>>>   File
>>> "/usr/lib64/python2.4/site-packages/scipy/linsolve/umfpack/umfpack.py",
>>> line 566, in linsolve
>>>     sol = self.solve( sys, mtx, rhs, autoTranspose )
>>>   File
>>> "/usr/lib64/python2.4/site-packages/scipy/linsolve/umfpack/umfpack.py",
>>> line 508, in solve
>>>     self._numeric, self.control, self.info )
>>>   File
>>> "/usr/lib64/python2.4/site-packages/scipy/linsolve/umfpack/_umfpack.py",
>>> line 214, in umfpack_di_solve
>>>     return __umfpack.umfpack_di_solve(*args)
>>> ValueError: object too deep for desired array
>>>     
>>>>>> K_dyn
>>>>>>           
>>> <71987x71987 sparse matrix of type '<type 'numpy.float64'>'
>>>         with 3083884 stored elements (space for 3083884)
>>>         in Compressed Sparse Column format>
>>>
>>> Any idea ?
>>>     
>> I use umfpack on a 32 bit system regularly without problems, so it may 
>> be a 64-bit issue. I have yet to set up a 64-bit installation of scipy 
>> to test it, though, so I cannot tell you more immediately.
>>
>> Did you also check your inputs to spsolve?
>>
>> r.
>> _______________________________________________
>> SciPy-user mailing list
>> SciPy-user at scipy.org
>> http://projects.scipy.org/mailman/listinfo/scipy-user
>>   
> Robert,
> 
> Just now I have filed two tickets. I hope someone can reproduce my results.
> 
> http://projects.scipy.org/scipy/scipy/ticket/318
> http://projects.scipy.org/scipy/scipy/ticket/319
> 
> I have tried SuperLU on 32 and 64 bit machines - the segfault persists.
> I have installed UMFPACK on a 64 bit machine.
> 
> Any pointer would be appreciated.
> 
> Thanks in advance.

Nils, it was easy :) Both tickets can be resolved by:

b = io.mmread('sherman2_rhs1.mtx').squeeze()

in your test scripts. The rhs vector must be 1d array...

I will update linsolve to do it automatically, but for now just squeeze 
the extra dimensions.

cheers,
r.



More information about the SciPy-User mailing list