Giter Club home page Giter Club logo

flamegpu2-model-template-python's Introduction

FLAME GPU 2 Template for Python3

This repository can be used as a template for creating your own FLAME GPU 2 simulations or ensembles using the Python3 interface, using NVRTC, or the experimental native python approach.

For details on how to develop a model using FLAME GPU 2, refer to the userguide & API documentation.

C++ (CUDA) Interface

FLAME GPU 2 also provides a python-based interface for writing models. If you wish to use this instead of the python2 interface, see FLAMEGPU/FLAMEGPU2-model-template-cpp.

Dependencies

Getting pyflamegpu

pyflamegpu is currently available as pre-built python binary wheels, or can be built from source.

Pre-compiled pyflamegpu

Pre-built python wheels are available for Windows and Linux, for a range of Python versions on x86_64 systems. It is not currently available through any python package repositories.

To install a pre-built version of pyflamegpu:

  1. Download the appropriate .whl for the Latest Release
  2. Optionally create and activate a python venv or Conda environment
  3. Install the wheel locally via pip. See the release notes for details.

Building pyflamegpu

If the available python wheels are not appropriate for your system, or you wish to build with different CMake configuration options (i.e. FLAMEGPU_SEATBELTS=OFF for improved performance with reduced safety checks) you can build your own copy of pyflamegpu.

  1. Clone the main FLAMEGPU/FLAMEGPU2 git repository or download an archived release.
  2. Create a build directory and navigate to it.
  3. Configure CMake with FLAMEGPU_BUILD_PYTHON set to ON.
    • See the main FLAMEGPU/FLAMEGPU2 repository for further information on CMake configuration options
  4. Build the pyflamegpu target
  5. Optionally create and activate a python venv or Conda environment
  6. Install the wheel (from build/lib/<config>/python/dist/) locally via pip

Usage

Once pyflamegpu is installed into your local python installation or activated virtual environment, you can invoke the example model via:

python3 model.py <arguments>

Use -h/--help to see what command line arguments are available for the Simulation or Ensemble within the model

python3 model.py --help

Documentation and Support

For general information on FLAME GPU, Usage of FLAME GPU >= 2 and support see:

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.