SimulationSimLab

What is FLAME GPU? A Guide to GPU-Accelerated Agent-Based Modeling

FLAME GPU 2 runs agent-based models on GPU hardware, handling millions of agents in seconds. How the engine works, when to use it, and how it compares to NetLogo and Mesa.

Ryan Bethencourt
April 16, 2026
13 min read

What Is FLAME GPU?

FLAME GPU 2 is a GPU-accelerated framework for running agent-based models at scale. It takes the same conceptual model as NetLogo or Mesa — agents with state, a step function, and local interactions — and compiles the per-agent rules to CUDA kernels so thousands of agents update in parallel on GPU hardware. The result is two to three orders of magnitude more agents per simulation than CPU-based tools can handle.

This is a stub pillar page. The full guide will cover FLAME GPU internals, agent-function programming model, message lists, spatial partitioning, and end-to-end examples. Use the browser demos below to see what GPU-scale ABM can do.

Why GPUs for ABM

Agent-based models are embarrassingly parallel at the per-step level. Each agent reads its own state plus information about a bounded neighborhood, computes its next state, and writes the result. That pattern is a near-perfect fit for GPU SIMT execution. Running 1M agents in parallel on an A100 beats running them sequentially in Python by three orders of magnitude.

The Core Abstractions

  • Agents. Structs of state arrays laid out contiguously for coalesced GPU memory access.
  • Agent functions. Small CUDA kernels that run once per agent per step. They read messages, update local state, and emit new messages.
  • Messages. Broadcast payloads with spatial or network indices, used for neighbor-based interactions without quadratic pair loops.
  • Environments. Global state shared across all agents — parameters, simulation time, tunable constants.

When FLAME GPU Wins

  • Large populations. 100K+ agents is where CPU starts to hurt; 1M+ is FLAME GPU's natural territory.
  • Parameter sweeps. Running an ensemble of 100 configurations in parallel on one GPU instead of 100 sequential CPU runs.
  • Real-time dashboards. Interactive sliders that re-run a simulation every few hundred ms only feel responsive at GPU speed.

Where CPU Frameworks Still Win

For teaching, prototyping, or small-population research (under ~10K agents), the CPU frameworks — NetLogo, Mesa, AgentPy — remain the right choice. The GPU programming model carries fixed overhead that is only worth paying when you need the scale.

SimLab: FLAME GPU as an API

SciRouter's SimLab hosts FLAME GPU 2 as a hosted service. You call simulation.run() with a model name, parameters, and a seed, and we return metrics and trajectory data. No GPU setup, no CUDA version mismatches, no infrastructure to maintain. The browser simulators below are JavaScript reimplementations of the same canonical models you can run at ten million agents through the SimLab API.

Frequently Asked Questions

What is FLAME GPU 2?

FLAME GPU 2 is an open-source GPU-accelerated agent-based modeling framework developed at the University of Sheffield. It compiles agent rules to CUDA kernels so a single GPU can simulate millions of agents with step times measured in milliseconds rather than seconds.

How does FLAME GPU compare to NetLogo and Mesa?

NetLogo and Mesa are CPU-based and practical up to roughly 100K agents. FLAME GPU routinely handles 10M+ agents on a single A100 GPU. The tradeoff is programming model — FLAME GPU requires more setup and C++/Python hybrid code, while NetLogo is pure point-and-click.

Do I need a GPU to use SciRouter's SimLab?

No. SimLab hosts FLAME GPU 2 on SciRouter's infrastructure and exposes it as a simple API. You call simulation.run() with your model and parameters; we run it on our GPUs and return the results. No CUDA, no drivers, no hardware.

What models can FLAME GPU run?

Anything you can express as agents with state, a step function, and message-passing to neighbors. Classic examples: Boids, SEIR, Schelling, Sugarscape. Production examples: urban evacuation, tumor growth, microbial communities, crowd dynamics at stadium scale.

Run this yourself — no GPU, no install

Free for researchers. Pick a tool, paste your input, see results in seconds.