Coder Social home page Coder Social logo

parautofluid's Introduction

Parallel, auto-tuning fluid simulations

by Olafs Vandans

OpenCL can't be statically linked, you have to get it and install the relevant ICD for your system.

Included files and directories

  • fluid2d
    An early implementation of the 2D fluid solver, following Jos Stam's paper on stable fluids. Calling "make" should compile it if gcc is present. Density is added with the left mouse button, velocity - with the right.

  • GPUTracer-0.01.zip
    GPUTracer served as the basis for the raycaster component of this project. It is written in C# and OpenCL, but the relevant CL file is the archive's src/GPUCaster/GPUCaster/RayCaster.cl

  • fluid3d
    The finished implementation, as described in the project. Refer to the implementation section of the report for compiling notes, command line arguments and keyboard controls. Generally, just calling "make" should compile it fine under GCC. For OpenCL 1.1, call "make opencl11". There are dependencies on GLFW (http://www.glfw.org/) and any OpenCL SDK (though only AMD and nVidia were tested). The architecture of the program is relatively simple and explained well by the names of the components. Code comments should provide extra guidance on what the program does.

  • fluid3d/scripts
    Python and gnuplot scripts used to generate the graphs for the test runs. Log files from some of the test runs are in the fluid3d/scripts/archive directory. To generate a graph, you would run the program with logging turned on (default). This would output two files in the current directory - frames.log and profile.log, containing a history of frame times and kernel calls. These files can be piped into the relevant python script, which generates a corresponding .dat file for gnuplot, and then calls gnuplot with the correct parameters.

Scripts (for generating pretty pictures)

  • kernels.py - draw a histogram of kernel execution times
$ kernels.py < ../profile.log			- outputs just the .dat file
$ kernels.py < ../profile.log -draw		- draws on the x11 or png terminal (specify in kernels.gp)
$ kernels.py < ../profile.log -draw -normalize	- draws a normalized version
  • normalize.py - draw the same as above, but normalized; this is usually called by the above script, not directly

  • param.py - draws and fits a graph of frame times (y-value), taking 20 frame intervals per parameter (x-value). The gp files are param_resolution.gp and param_precision.gp with different model functions.

$ param.py < ../frames.log
  • fractions.py - outputs the aggregate times the simulation has spent on the CPU and GPU for both memory operations and actual processing. This is used in calculating the sequential fraction of the computation. You'd need to run the program with COMPUTE_PROFILE=1 and COMPUTE_PROFILE_CSV=1 in the environment.
$ fractions.py < ../opencl_profile_0.log

Documentation

Not every referenced paper is included, only the most important ones. Among them are:

parautofluid's People

Stargazers

KYY avatar

Watchers

James Cloos avatar Olafs Vandans avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.