How to repeat forward and backward solve using cuSolver by CUDA?

Recently I developed a new method. The new method works perfect with CUDA (at 20 to 40FPS) and I have already tested it successfully. The problem comes when I try to make a comparison with an old method. The old method was implemented on CPU. It does LU decomposition A=LU first, and then runs forward+back steps to solve (LU)x=b. The very nice thing about the old method is that A does not change, so LU decomposition can be done only once and the overhead is just the forward+backward solve. A is sparse and symmetric positive definite. (I believe this is a fairly common practice in many problems, e.g., fluid simulation in a fixed domain.)

To make my comparison fair, I want to implement the old method on GPU. But I didn't find any sparse LU decomposition in cuSolver or cuSparse. Am I supposed to calculate it by some other libraries? Shall I use cusolverRfSolve() for solve? If so, why L and U are not input, but P and Q are input to this function? Is there any working example similar to what I am trying to do?

Even if the old method runs slower on GPU, I would love to see it, which makes my new method really useful.

From the documentation, it looks like the intended use of `cusolverRfSolve` requires the following previous calls:

• `cusolverRfCreate`
• `cusolverRfSetup[Host/Device]` <-- this takes as input already a matrix `L`, `U`, `P` and `Q`
• `cusolverRfAnalyze`
• `cusolverRfRefactor`

and then you only call `cusolverRfSolve` (again with `P` and `Q`). The previous calls analyse the given matrices and determine the parallelism strategy.

Given the examples from the cuSOLVER documentation, it looks like they intentionally outsourced the LU factorisation, so you need to provide the factorised matrices to the library.

I am currently working on interfacing scipy in python (`scipy.sparse.linalg.splu`) with cuSOLVER in order to provide the LU factorisation `Pr * A * Pc = L * U`. cuSOLVER will need `P = Pr.T` and `Q = Pc.T`. You can use the `cusolverRfSetupHost` function to let cuSOLVER take care of GPU memory allocation and transfer.

Alternatively one could make use of suitesparse (http://faculty.cse.tamu.edu/davis/suitesparse.html) in C++.

Category:cuda Views:1 Time:2017-10-10
Tags: cuda gpu cusolver

Related post

• How to traverse forward and backwards in NSBrowser? 2011-07-07

I am trying to create something similar to the OS X finder. How can I go backwards and forwards like in OS X finder? I'm not sure which methods to call to do this. --------------Solutions------------- Normally the user clicks to navigate. To do it pr

• Gaussian elimination forward and backward - parallelization? 2011-03-31

is there any way how to make gaussian elimination backwards? I mean, I solved with forward Gaussian elimination half of a matrix (under matrix there are zeros under diagonal) and then I have made backward substitution. But for future MPI parallelizat

• drag progress bar forward and backward 2010-11-11

I have a div that acts like a progress bar, moving and displaying the status of a current song that is being played. How can I drag that "progress bar" forward and backward to allow a person top seek through a song? --------------Solutions-----------

• The cursor jumps one or two lines both forward and backwards. 2013-02-25

There is no + sign in my device manager. I use Windows 7 64 bits. I suppose that my cursor jumps because touching some key or maybe the touch pad during typing. I just activated "show pointer when typing". The cursor jumps one or two lines both forwa

• Dragging to arrange layers 'forward and backward' in timeline? 2015-01-07

I'm confused as to why you can't drag the layers up and down on the timeline to arrange them 'forwards and backwards'. I can click through the sub-menu to move forward and backwards. Is this something you intend to add? --------------Solutions-------

• How to identify binary and text files using Smalltalk 2011-08-12

I want to verify that a given file in a path is of type text file, i.e. not binary, i.e. readable by a human. I guess reading first characters and check each character with : isAlphaNumeric isSpecial isSeparator isOctetCharacter ??? but joining all t

• Is XForms able to define multi-part forms in which a user can move forward and backward, and which can contain logic to display or hide sections? 2012-02-20

Is XForms able to define multi-part forms in which a user can move forward and backward, and which can contain logic to display or hide sections? Or is this beyond the scope of what XForms is meant to do? --------------Solutions------------- If you a

• How to track .gif and flash banners using google analytics 2013-04-17

I'm Using in page analytics option in google analytics to track my wordpress site. i can track all my contents and links apart from .gif and flash banner.i can't understand how to track .gif and flash banners using google analytics. Following is the

• How do I move forward and backward between commits in git? 2011-07-20

I am doing a git bisect and after arriving to the problematic commit, I am now trying to get a step forward/backward to make sure I am in the right one. I know of HEAD^ to go backwards in history but is there another shortcut to get me forward (towar

• Setting to skip over punctuation when moving forwards and backwards words 2011-06-29

When I'm using vim I generally never want to move to a punctuation mark when I press w or b to go forwards or backwards. So I'm wondering if there's a setting or something to change this functionality? e.g. If I've got some code like object.method(ar

• About the forward and backward a word behaviour in Emacs 2010-01-16

I don't know if there's something wrong with my settings but when I press M-f (forward a word) it doesn't matter where I am, it never place the cursor in the next word (just between words). This doesn't happen with M-b which place my cursor in the be

• PHP forward and backward for loop verse 2011-05-27

I could make first verse to write but I want next verse to be written backwards however I can't do it. <?php \$russian[]="En"; \$russian[]="liten"; \$russian[]="vektor"; \$russian[]="ar"; \$russian[]="ett"; \$russian[]="exempel"; \$russian[]="pa"; \$russi

• video file: fast forward and backward doesn't work 2012-02-05

I have a few video clip in both flv and mp4 formats which don't fast forward or backward to arbitrary spots (time indexes). Basically each video clip has 4 or 5 spots to which you can backward or forward, but you can't forward or backward to arbitrar

• How to add lyrics and album art using windows media player 12 on Windows 7 ?? 2014-01-11

When i am using windows xp with WMP 11, adding lyrics, album art and even synchronized lyrics is so easy, just right click the song, then select advanced tag editor. The Advanced Tag Editor (ID3 tag editor), which allows users to edit information, is

• PHP - moving forwards and backwards through mysql rows 2009-07-22

I have a page that displays a row depending on the id given in the browser bar (page.php?id=1). I am trying to use forward and back buttons to display the corresponding next or previous row on the page. So essentially the prev and next buttons will j

• How to fast-forward and rewind audio in j2me / blackberry (midp) application? 2009-08-26

I want to fast-forward and rewind recorded audio in a j2me and Blackberry application. Is there any sample code available? How do I do it? --------------Solutions------------- As a starting point, read the specification of JSR-135: http://www.jcp.org

• how to zip folder and its content using zlib under cocoa framework 2010-04-30

How can i zipped folder and its content using zlib 1.2.3 under cocoa framework. It seems that zlib is used for only zipping files and not folder(with reference from other mailing list), else is there any possibility to do so in cocoa application. Tha

• How to create password and confirmation when using form_for? 2010-10-25

I am using form_for, but I'm not sure how to create the password and password confirmation using the helpers? I have so far: <%= form_for :user, @user, .... do |f| %> <%= f.text_field :user_name, :class .... %> password?? <% end %>

• how to Insert ,Edit and Update data using gridview in asp.net3.5,c#.net 2011-02-15

please help me how to do my task.. i want to insert customer information using gridview and need to Edit and update those details.. So please try to help how to insert,Edit and update the data in grid View in Asp.Net3.5,c#.net.. thanking you --------

• How to count yes and no answers using radio buttons 2011-06-02

I don't know if this was asked or not (I searched a little but no result) but I'm kinda time pressed and I need help I've been developing an application in Android and I've only started under this platform for 3 months I have a choice test with diffe

• How do I forward and print an email? 2012-09-20

Please advise how to forward email. My Outlook does not show the forward button on the task bar. Also, how do I print all pages of an email I received. I am only able to print first page. Thank you, Madeline Original title: How do I forward an email.

• how do I forward and reply on email. Typical microsoft making things harder 2013-07-03

all I want to be able to do is forward and/or reply to emails. Very easy in Hotmail, impossible with Outlook. Outlook is useless. --------------Solutions------------- Outlook.com is new. Since it a new and a different system the fastest way to learn

• How do you forward and email as attachment in OWA when forward as attachment option is not available? 2014-06-29

attaching email in OWA how to forward and email as attachment in OWA when forward as attachment option is not available? --------------Solutions------------- Hi, I would suggest you to post the issue in this forum and check if it helps: http://answer

• How to update created and modified fields using the repository design pattern? 2008-11-22

I am currently working on my first asp.net mvc application. I am trying to drink the kool-aid of all the the sample projects I see and trying to use the repository design pattern. I have a interface called IUserRepository that looks like the followin