Is anybody aware of any GPU-enabled Lattice Boltzmann solvers (preferably on C++/OpenCL and open-source) that would be recommended?

I have found Advanced Simulation Library, but it seems to be very young. Did anybody try to work with it and verify their benchmarks?


2 Answers 2


Sailfish is a great OS LBM solver that meets your needs. Sailfish is developer in the Python language in order to provide a rapid development environment; however, it compiles optimized OpenCL or CUDA via the pyopencl and pycuda libraries.

I have found it to be highly flexible with remarkable computational speeds. Inherently, no computation is performed with Python. The down-side to Sailfish is the very limited user community; however, if you're down the LBM path anyways, you're likely used to that.

  • $\begingroup$ Thank you for this info. My problem with Sailfish is that it is on Python which I do not know. ASL seems also to use run-time code generation techniques, but it does it on C++ which is probably a bit faster, and is more consistent with OpenCL. $\endgroup$ May 27, 2015 at 7:16
  • $\begingroup$ Sailfish only uses Python, essentially, as a means to generate CUDA/OpenCL code - it can be viewed as a wrapper. Python provides you many advantages in development time while all of the computational effort relies STRICTLY on CUDA/OpenCL, which as you said, is C++, so it will be the same or comparable. If you know C++, you will learn Python very quickly. $\endgroup$ May 28, 2015 at 2:11
  • $\begingroup$ Welcome to SciComp! Thank you for contributing an answer to this post! Could you please summarize why the software you link to would be a good fit for the original poster? This summary could be as simple as paraphrasing your comment. Stack Exchange tends to frown upon link-only answers without explanation because it diminishes the utility of the answer (e.g., sometimes the links die after a period of time; without context, it's hard to determine the utility of a link other than by clicking on it and investigating the material directly). $\endgroup$ May 28, 2015 at 3:03
  • $\begingroup$ When I said that ASL is probably faster I meant the generation of the OpenCL code, while the computation itself should be comparable. With regards to the Python's advantages in development time - I'm not sure... Now as I'm digging into ASL, I see that the authors have introduced several abstraction layers, that hide OpenCL completely and allow pretty fast extension/application of the code. And what's for sure - Python is one more dependency (need for the interpreter on the host computer). $\endgroup$ May 28, 2015 at 7:11
  • $\begingroup$ "One more dependency" disadvantage is important if you want to distribute the code you write. $\endgroup$ May 28, 2015 at 7:57

After gaining more experience with ASL I'm convinced that it is the best accelerated open source LBM-solver as of end of 2015. It has following important advantages:

  1. simple C++ API (and only C++ - no need to know OpenCL or Python even for adding new numerical methods (which will automatically become hardware accelerated)!)
  2. remarkable performance
  3. multiphysics: many other physical/chemical phenomena besides CFD (Lattice Boltzmann method is used in ASL)
  4. hardware accelerated, can be deployed on CPU/GPU/FPGA/DSP/APU-clusters
  5. mesh-free, immersed boundary technology allows to move from CAD directly to simulation (important for automated design optimization).
  6. dynamic compilation approach enables an additional layer of optimization at run-time (i.e. for a specific parameters set the application was provided with)
  7. open source: AGPL + optional commercial license for closed-source projects.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.