This repository acts as an example to be used as a template for creating standalone FLAMEGPU2 projects runnning ensemble experiments of python(SWIG) based models.
FLAMEGPU2 is downloaded via CMake and configured as a dependency of the project.
Currently, it uses the version of FLAMEGPU2 from master, this can be changed locally by setting the CMake variable FLAMEGPU2_Version to point to a different git branch or tag. You can also change it for all users, by changing cmake/flamegpu2.cmake:5 which provides the default value.
The dependencies below are required for building FLAME GPU 2.
Only documentation can be built without the required dependencies (however Doxygen is still required).
- CMake >= 3.12
- CMake 3.16 is known to have issues on certain platforms
- CUDA Toolkit >= 9.0
- git: Required by CMake for downloading dependencies
- Linux:
- Windows:
- Visual Studio 2015 or higher (2019 preferred)
FLAME GPU 2 uses CMake, as a cross-platform process, for configuring and generating build directives, e.g. Makefile or .vcxproj. This is used to build the FLAMEGPU2 library, examples, tests and documentation.
Below the core commands are provided, for the full guide refer to the main FLAMEGPU2 guide.
Under Linux, cmake can be used to generate makefiles specific to your system:
mkdir -p build && cd build
cmake ..
make -j8
The option -j8 enables parallel compilation using upto 8 threads, this is recommended to improve build times.
By default a Makefile for the Release build configuration will be generated.
Alternatively, using -DCMAKE_BUILD_TYPE=, Debug or Profile build configurations can be generated:
mkdir -p build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Profile
make -j8
Note: If installing CMake on Windows ensure CMake is added to the system path, allowing cmake to be used via cmd, this option is disabled within the installer by default.
When generating Visual studio project files, using cmake (or cmake-gui), the platform must be specified as x64.
Using cmake this takes the form -A x64:
mkdir build && cd build
cmake .. -A x64
ALL_BUILD.sln
An ensemble of boids models can be found at /examples/boids_ensemble with variables: ENSEMBLE_RUNS to alter the number of models simulated; POPULATION_SIZE to set boid agent population size; and STEPS to specify how many simulation steps each model in to be run for.
To perform an ensemble experiment a batch file run_boids_ensemble.bat has been provided. Alternatively a call to boids_ensemble.py within a python environment should be made.