OpenCL Fluid Simulator on GTX480

Hello all,

We’ve been working on a Real Time Particle System library and we now have interactive fluid simulation! It’s SPH implemented purely on the GPU with OpenCL
You can see my latest write up and the code at my blog:

We appreciate feedback and hopefully the code will be useful to someone!

NVIDIA GeForce 9400M with 256MB of DDR3 SDRAM shared with main memory. This means that the Nvidia chip is on the motherboard. The memory allocation is done during boot time so the Nvidia chip communicates with memory as the cpu communicates with memory giving a theoretical throughput of 21 GB/sec. Of course it is slower than GDDR3 but so much slower? You should get into your parameters the architecture of the chip. Are you certain that this very noticeable in the video lag is not also due to OpenGL? Is the rendering done in Software or Hardware? For instance the Nvidia SDK kit is doing software rendering and their particles simulation is terribly slow due to this fact.

Hi Alexander,

You bring up good points, I will have to rethink my conclusions as well as gather more information on what exactly is going slower. I can say that the rendering is not counted in those timings, but even so the OpenCL shares a VBO with OpenGL which draws with a simple drawArrays call. We also have more sophisticated shaders but they were turned off for these timings.

I’ve also found some troublesome bugs since the posting, I certainly have more investigation to do. I’ve been using gDEBugger and have tried the nvidia opencl profiler but it lacks many features present in the CUDA version (at least on linux).