chaimbaskin / cusp-library

Automatically exported from code.google.com/p/cusp-library
Apache License 2.0
0 stars 0 forks source link

Conjugate Gradient method cannot solve a non-symmetric sparse matrix #82

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Simply run the attached source code. Input data are attached as well.
2.
3.

What is the expected output? What do you see instead?
>> We expect the A*x=b problem can be solved by CG method successfully and very 
quickly.

What version of the product are you using? On what operating system?
>> The testing environment is as follows:
CUDA: NVIDIA CUDA Toolkit 4.0(32 bit)
SDK: NVIDIA GPU Computing SDK 4.0
CUSP: cusp v0.2.0
GPU: NVIDIA GeForce GTX465(1G)
CPU: Intel(R) Core(TM) i5-2500 CPU @3.30GHz 
         Memory(RAM): 4G
Windows: Windows 7 Ultimate Service Pack 1-32bit

Please provide any additional information below.

>> We are using cusp in a research project to solve linear system of equations, 
ie, A*x=b. A is non-symmetric sparse matrix. CUSP works fine for small size of 
A (eg, 180*180). But when we test it for medium-sized A (eg, 5237*5237 with 
33703 non-zero elements), the BiConjugate Gradient Stabilized method does not 
converge. The GMRES method converges yet very slowly. We intend to use the 
BiConjugate Gradient Stabilized method, however, we don't know how the 
pre-conditioner should be set. Any advice on that will be appreciated.

Some additional information: the same problem has been tested on MATLAB, where 
Conjugate Gradient method can solve but very slowly. Back slash (\) operator 
however can solve the equations in no time. I believe in our case, underneath 
back slash operator, MATLAB used LU decomposition as the internal solver.

Attached are the matrix A and vector b in mtx format, as well as the CUSP 
source code used for testing. I appreciate if you can look into the issue and 
help us solve it. Thanks!

Original issue reported on code.google.com by rbo2...@gmail.com on 22 Nov 2011 at 6:20

Attachments: