### Welcome, Unregistered.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 06-Nov-2007, 17:59 #1 fearsomepirate Dinosaur Hunter   Join Date: Sep 2005 Location: Kentucky Posts: 2,564 Poisson Solver on a GPU Hey all. As part of my grad research, I'm going to eventually need to write a Poisson solver. Now, I've done this a million times for a regular old Pentium in C, but I got to thinking...we mostly just use SLOR, which is a bunch of (mathematically) simple vector operations, so it seems like this is something you could program a GPU to do. However, I know exactly jack diddly squat about how to tell a GPU to do anything, especially since I use g++ in linux. I have Visual Fortran on my Windows box, but I'm not sure I could use Direct X. So the question: a) Is this feasible? b) If yes, can you point me to where I can learn how to program a GPU? Any such resource would preferably include a lot of mathematical explanation. __________________ Don't vote; it just encourages them.
 06-Nov-2007, 18:15 #2 ShaidarHaran hardware monkey   Join Date: Mar 2007 Posts: 3,904 Perhaps you should look into Cg or CUDA or CTM.
 06-Nov-2007, 20:34 #4 Rufus Member   Join Date: Oct 2006 Posts: 214 At first glance it seems that the Poisson equations are somewhat similar to the Navier-Stokes equations (both being complex PDEs). If that's the case this chapter from GPU Gems 3 has a complete writeup of how to solve it.
 06-Nov-2007, 22:08 #5 fearsomepirate Dinosaur Hunter   Join Date: Sep 2005 Location: Kentucky Posts: 2,564 Although I would question the formal accuracy of the methods they're using in the above presentation (one can get qualitatively good-looking solutions w/o actually being all that accurate), they're computationally doing the same general sort of stuff. And if that's all being done on the GPU, there's no reason we need to do anything on the CPU, either. We don't do branching, just lots and lots of for loops on matrices and vectors. __________________ Don't vote; it just encourages them. Last edited by fearsomepirate; 06-Nov-2007 at 22:41.
07-Nov-2007, 05:49   #6
silent_guy
Senior Member

Join Date: Mar 2006
Posts: 1,687

Quote:
 Originally Posted by fearsomepirate We don't do branching, just lots and lots of for loops on matrices and vectors.
In that case, CUDA should be fine, if you're willing to restrict yourself to Nvida GF8 cards. I can highly recommend the Nvidia CUDA forums, as well as the examples in the CUDA SDK.

13-Nov-2007, 04:09   #7
Rufus
Member

Join Date: Oct 2006
Posts: 214

From the Cuda talk at SC07 over the weekend in this presentation: http://www.gpgpu.org/sc2007/SC07_CUDA_3_Libraries.pdf
Quote:
 In this example, we want to solve a Poisson equation on a rectangular domain with periodic boundary conditions using a Fourier-spectral method.

 30-Apr-2008, 15:54 #8 PeterT Member   Join Date: May 2002 Location: Austria Posts: 699 I wrote a GPU-based multigrid Poisson solver using OpenGL as part my master thesis (slightly over a year ago). Except for some (expected) inefficiencies at coarse grid levels multigrid methods are very well suited to GPUs. (Edit: sorry for the very late bump, I just now took a look at the dates of the previous replies. I have recently posted mostly on high traffic forums so I didn't expect a thread on the first page to be many months old)
30-Apr-2008, 21:01   #9
trinibwoy
Meh

Join Date: Mar 2004
Location: New York
Posts: 9,809

Quote:
 Originally Posted by PeterT I have recently posted mostly on high traffic forums so I didn't expect a thread on the first page to be many months old
Welcome to the GPGPU forum at B3D
__________________
What the deuce!?

 30-Apr-2008, 23:21 #10 suryad Senior Member   Join Date: Aug 2004 Posts: 2,454 I am not as knowledgeable as you guys...but if you had an SLI setup...could your code if it can be parallelized using CUDA take advantage of basically what amounts to 2 processors since that is what SLI technically allows?
01-May-2008, 05:11   #11
Tim Murray
chaos dunk

Join Date: May 2003
Location: Mountain View, CA
Posts: 3,274

Quote:
 Originally Posted by suryad I am not as knowledgeable as you guys...but if you had an SLI setup...could your code if it can be parallelized using CUDA take advantage of basically what amounts to 2 processors since that is what SLI technically allows?
An SLI device appears to the system as one GPU, so running a CUDA app on an SLI setup will only use one chip. AFR and SFR don't make sense in the context of CUDA either. However, depending on your algorithm, it is often possible to write code that scales to multiple GPUs--you just can't have them in an SLI setup.

01-May-2008, 18:12   #12
Senior Member

Join Date: Aug 2004
Posts: 2,454

Quote:
 Originally Posted by Tim Murray An SLI device appears to the system as one GPU, so running a CUDA app on an SLI setup will only use one chip. AFR and SFR don't make sense in the context of CUDA either. However, depending on your algorithm, it is often possible to write code that scales to multiple GPUs--you just can't have them in an SLI setup.
Thanks for the explanation. I was of course not thinking about AFR and SFR in this sense but more like how you can imagine a system with 2 CPUs running a multithreaded app. So if you have 2 cards in your system but not have them in SLI, and you have a multithreaded CUDA app, then the app can leverage both the GPUs you are saying right?

01-May-2008, 19:37   #13
Tim Murray
chaos dunk

Join Date: May 2003
Location: Mountain View, CA
Posts: 3,274

Quote:
 Originally Posted by suryad Thanks for the explanation. I was of course not thinking about AFR and SFR in this sense but more like how you can imagine a system with 2 CPUs running a multithreaded app. So if you have 2 cards in your system but not have them in SLI, and you have a multithreaded CUDA app, then the app can leverage both the GPUs you are saying right?
Yeah, basically. Not multithreaded exactly, but takes advantage of multiple CUDA devices--you can enumerate the list of CUDA devices easily and select which device will run a kernel. So, you can take the Tesla D870 (2 G80s in a deskside unit connected via PCIe 2) or the Tesla S870 (4 G80s in a 1U rack connected via PCie 2), connect that to a machine, and given an appropriate algorithm, you can get a linear (or nearly linear) speedup over a single GPU. But, this is a different model than your normal multicore system, as you don't have a single shared memory space--each card has its own memory and can't easily access that of others. This is more like the message-passing model that is used in supercomputing clusters and such.

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home News Forums     Beyond3D News         Press Releases         Beyond3D Articles Core Forums     3D Architectures & Chips         3D Beginner's Questions     3D Technology & Algorithms         3D Programming & Tools     3D Hardware, Software & Output Devices         Video Technology, Displays, & HTPC     3D & Semiconductor Industry     GPGPU Technology & Programming Embedded 3D Forums     Console Forum         Console Technology         Console Games             PC Games     Handheld Gaming     Handheld Technology     CellPerformance@B3D PC Forums     Hardware & Software Talk         Politics & Ethics of Technology         Unix, Mac, & BSD (3D)     Processor & Chipset Technology     Purchase Decisions Help     PC Games         Console Games Site Forums     General Discussion     Folding For Beyond3D Team #32377     Industry Jobs     Site Feedback Beyond3D Hall of Fame     Pre-release GPU Speculation     General 3D Technology     Consoles     Other

All times are GMT +1. The time now is 08:07.

 -- vB3D -- vBulletin Default Style Contact Us - Beyond3D - Archive - Top