Sparse Matrix how can read from file

Dear all,

I have Geforce 6200 turbo cache and I sucess to run CUDA examples include matrix multiplication and the output is " Test Pass" . I want to know how can I use this to multiply my matrix data and output the result(which format canI prepare my data to use), and ability to solve AX=Y for X where A is large sparse matrix.
I hope to get help to do my work?
Thanks much
and if any one can send me help on
Thanks again

You should not bother using the CUDA matrix multiplication, because you are currently running on the emulator which is much slower than a pure CPU implementation. There are two options for you:

  1. get a G80 to run in hardware, then consider hooking up the code to your routines
  2. google for a good CPU implementation and use that one


Dear Peter

Thanks much for your reply

My question is how can I insert the attached matrix and vector to MatrixMul(or any example in CUDA examples)

please, I want to know in which (*.cu or *.h or *.cpp) can I add some instruction to read from these files to allow me multiply matrix by vector. If you have any ready to use sparse matrix soultion that read data from external files wrote in CRS format kindly send them to me.

Thanks again

If any one need to help me please send to me

The CUDA examples are all structured the same way. The main() is in the file doing the work in the runTest() function. The GPU kernel is in the file. So you would load the matrix in the host code runTest() function.

Your matrix is given in plain text, so just use fscanf (or std::ifstream if you do C++) to read it. Your matrix is sparse, so you would need to fill it up to the full matrix when you use the CUDA matrixMul example.

For public sparse matrix code for CPU processing, just Google. I personally prefer C++. Some examples are SparseLib++ Blitz++ or POOMA if you want to go parallel.