[Insight-users] solving large linear equations
Arnaud Gelas
arnaud_gelas at hms.harvard.edu
Wed Jun 17 11:23:58 EDT 2009
Can you send me this matrix and the corresponding vector in a text file,
or as one image (be sure to include the null element), please?
I'll try to have a look later.
Habib Baluwala wrote:
> Arnaud ,
> It takes around 10 min to solve the linear system of equations. I
> also tried the vnl_sparse_matrix_linear_system but that too takes a long
> time for solving these equations.
>
>
>
>
> Arnaud Gelas wrote:
>
>> Habib,
>>
>> Right, your matrix is not that large and is really sparse...
>> I am curious to know how long it takes to solve your system?
>>
>> I am not so sure about the efficiency of vnl direct solver (LU
>> solver)... (Until recently, sparse iterative solver were really
>> efficient in comparison to direct ones, and this is still a very active
>> field of research!)
>> If you need to solve several times linear systems which involve the same
>> matrix, I would recommend to use a direct solver like LU, LLT, LDLT;
>> else an iterative solution like vnl_sparse_matrix_linear_system.
>>
>>
>> Arnaud
>>
>>
>>
>> Habib Baluwala wrote:
>>
>>> Hi Arnaud,
>>> The size of the matrix is around 40,000 rows and columns
>>> but
>>> the density is around 5 percent which is very small. I am using the
>>> vnl_sparse_matrix for reading the sparse matrix and then using the
>>> vnl_sparse_lu and for solving the equations. I thought that the blas and
>>> lapack libraries are linked with the linear solver but that does not seem
>>> to
>>> be the case or I am currently not using any pointers for the sparse
>>> matrix.
>>> Can this be a reason for the failure????? I look forward to yor reply
>>>
>>>
>>>
>>>
>>>
>>> Arnaud Gelas wrote:
>>>
>>>
>>>> Hi habbib,
>>>>
>>>> How large is your matrix?
>>>> How sparse is your matrix? Do you know the number of non null elements
>>>> in your matrix? Or can you tell me the number of non null elements per
>>>> row (in average)?
>>>>
>>>> Solving sparse linear system highly depends on the sparsity of your
>>>> matrix.
>>>> When you say I am "using VNL sparse system solver", what do you mean?
>>>> which class are you using?
>>>>
>>>> Note that it is not because you use BLAS and LAPACK that the code will
>>>> be fast, it depends how they are used in in the library. For example
>>>> mumps, taucs are also based on blas and lapack and performances are
>>>> really different...
>>>>
>>>> Arnaud
>>>>
>>>> Habib Baluwala wrote:
>>>>
>>>>
>>>>> Hi everyone ,
>>>>> I am currently using a large sparse system of linear
>>>>> equation which is non-symmetric. I tried using VNL sparse system
>>>>> solvers
>>>>> but
>>>>> they are very slow , I can't still understand why they are slow because
>>>>> they
>>>>> are supposed to utilise the BLAS and Lapack libraries to speed up. Can
>>>>> anyone tell me how can I speed up the procedure???? I also tried the
>>>>> release
>>>>> instead of debug. It was able to reduce the time taken but not to a
>>>>> significant effect. Would including the Utilities folder in the
>>>>> CMakeFile.txt help ???
>>>>>
>>>>> I look forward to your reply and sorry for any inconvenience.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>> _____________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>>
>>>> Please keep messages on-topic and check the ITK FAQ at:
>>>> http://www.itk.org/Wiki/ITK_FAQ
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://www.itk.org/mailman/listinfo/insight-users
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>> _____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>>
>>
>
>
More information about the Insight-users
mailing list