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.
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.
- Python
>= 3.7
- CUDA
>= 11.0
and a Compute Capability>= 3.5
NVIDIA GPU. - pyflamegpu - the python bindings for FLAME GPU
>= 2
pyflamegpu
is currently available as pre-built python binary wheels, or can be built from source.
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
:
- Download the appropriate
.whl
for the Latest Release - Optionally create and activate a python
venv
or Conda environment - Install the wheel locally via pip. See the release notes for details.
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.
- Clone the main FLAMEGPU/FLAMEGPU2 git repository or download an archived release.
- Create a build directory and navigate to it.
- Configure CMake with
FLAMEGPU_BUILD_PYTHON
set toON
.- See the main FLAMEGPU/FLAMEGPU2 repository for further information on CMake configuration options
- Build the
pyflamegpu
target - Optionally create and activate a python
venv
or Conda environment - Install the wheel (from
build/lib/<config>/python/dist/
) locally via pip
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
For general information on FLAME GPU, Usage of FLAME GPU >= 2
and support see: