Page **1** of **1**

### gesv method

Posted:

**Thu Aug 16, 2012 12:13 am**
by **upesh**

i am almost at the end of my project and now i need to solve a 576*576 linear system , i have tried matrix inversion and multiplication in cuda but it is not solving my problem . then i tried cusp and now i am learning cula to solve my problem . i found the method gesv() will anyone explain a sample program using cualSgesv() . see this is a crucial step in my whole project and i will be thankful to you

### Re: gesv method

Posted:

**Thu Aug 16, 2012 10:40 am**
by **john**

The example called "systemSolve" should be quite helpful to you here. You will need to make the system dense by populating a full 576x576 matrix with your data, but you'll find it should be fairly fast.

### Re: gesv method

Posted:

**Fri Aug 17, 2012 8:30 am**
by **upesh**

thank you sir , i observed the example systemsolve() but let me tell you one more problem i faced when i installed cula in ubuntu 12.04 even if i set the path for cula libraries , the systemsolve example is not running it says lapack.h no such file or directory . i am using cuda 4.2 , is it the problem . now i am going to uninstall the entire os and cuda and trying again , if you don't mind please tell me the installation procedure in ubuntu 11.10

thank you .

### Re: gesv method

Posted:

**Fri Aug 17, 2012 1:29 pm**
by **john**

There is a makefile in that folder that should demonstrate clearly how to compile.

### Re: gesv method

Posted:

**Sat Aug 18, 2012 5:38 am**
by **upesh**

sir i forgot to tell you one thing that the 576*576 matrix is sparse such that a row contains only 4 elements can i solve it with cula dense or should i use cula sparse . one more doubt sir , what about the compatibility of cula to cuda versions

### Re: gesv method

Posted:

**Sat Aug 18, 2012 7:01 am**
by **kyle**

For a matrix that is over 99% sparse, you certainly want to explore

iterative sparse methods such as the routines found in CULA Sparse.

However, these iterative methods are conceptually a little more complex than the dense routine, xGESV, which uses a simple LU decomposition. There are many different iterative routines and additional concepts such as preconditions all used to solve sparse systems.

For more information about the mathematics behind these methods, I'd suggest reading Yousef Saad's freely available book, "

Iterative methods for sparse linear systems."

### Re: gesv method

Posted:

**Sat Aug 18, 2012 9:24 pm**
by **upesh**

sir is there any examples along with cula sparse examples folder to solve linear system , will they give exact result . If this works well we would like to by the premium version , we have enough funding on this project

Thank You