Run under Dragon¶
Under Dragon each population is a Dragon process of its own, with RHAPSODY's native backend for its
simulations, the store is RaDEX, and the tool services are Dragon processes. The script asks for it
with CampaignConfig(runtime="dragon"); the example mini-app with --runtime dragon. The mini-app's
own engine must then run on RHAPSODY's native Dragon backend, which starts the populations. Dragon and
RaDEX must be installed where the run starts: see Getting started.
Not run for this page
The commands on this page need Dragon on a cluster's nodes, and were not run for this page. The same settings ran under Dragon 0.15 on 24 Nov 2026: on one node, and across two and three nodes.
One node¶
Run the mini-app under dragon -s (one node, a single-node runtime):
python -m dragon -s examples/miniapp.py --runtime dragon --populations 2 --workers 52 \
--model openai --endpoints-file FLEET/endpoints --api-key-file FLEET/api-key
--workersis each population's pool workers: give the populations the node's cores between them.--model openaicalls model servers in a job of their own: see Model servers. Without it the stub model answers.- The store is
CampaignConfig.store_managersRaDEX managers (4) ofstore_manager_gib(2 GiB) each, with the timeoutstore_timeout_s(10 s): see The store's timeout. --kill-graceis how long a population's process may take to exit after its result before RHAPSODY kills it (RHAPSODY's default is 2 s).
Across nodes¶
Start one Dragon runtime over the job's nodes, with the cluster's workload manager, the TCP transport,
and the network the nodes reach each other on (--network-prefix, a regular expression of interface
names):
dragon -w slurm -t tcp --network-prefix '^(ib|eth|en|bond)\w*$' examples/miniapp.py \
--runtime dragon --populations 6 --workers 12 --model openai --endpoints-file FLEET/endpoints ...
The campaign places the populations over the nodes: see Placement. Before you start:
- Populations with CPU workers need RHAPSODY's native backend with
hosts=, from RHAPSODY 0.8.0. Without it the campaign refuses several nodes, unless every population is GPU-only (workers=0). - The run directory and the directory you start in must be on a filesystem every node shares.
- Pick
--network-prefixto match the fast network: a node may have several interfaces, and the prefix decides which one Dragon uses. - Under Dragon, RHAPSODY's telemetry samples every node for each backend. Across nodes the populations
leave this to the mini-app's engine (
--node-samplers auto, the default).
The store's timeout¶
CampaignConfig.store_timeout_s (10 s) is the store's timeout, Dragon's DDict timeout. Dragon 0.15
gives it to every manager, and to the client that creates the store, and it bounds two things:
- Each of a manager's sends and receives. A manager whose reply waits on a client that stopped
reading, as on a slow or stuck node, gives up on it after 10 s and answers its other clients. Without
a timeout (
None, Dragon's default) it waits forever, and every client of that manager waits with it. - The store's start. Each manager waits that long for the other managers to start, and
start_servicesthat long for all of them; past it,start_servicesraisesTimeoutError. Dragon has no separate bound for the start. Under Dragon 0.15 it took 0.9 to 1.2 s on one node and 1.2 to 1.9 s on three, with 4 or 8 managers on each. A start that takes more than half of the timeout is logged as a warning: on a larger allocation, raisestore_timeout_sif it does. A start that fails leaves the store's orchestrator, and the managers that had started, running until the Dragon runtime ends, which then stops them: RHAPSODY keeps no handle to them. A new start in the same runtime works beside them.
It does not change the clients' own timeout: Flowgentic's RadexStore waits 30 s for each of its
operations. The managers' 10 s are shorter, so that a manager stuck on one client frees itself before
the clients waiting behind it give up. Keep store_timeout_s below 30 s when you change it.
An idle store is not affected: a manager waits for its next request without a timeout. With a 2 s timeout, a store left idle three times for 10 s, on one node and on three, kept every value and answered at once.
The tests under Dragon¶
The framework's Dragon tests start their own runtime, so run them on a node with Dragon, outside
dragon:
| Variable | Adds |
|---|---|
AUTONMI_DRAGON_TEST=1 |
the Dragon tests, and the conformance kit's dragon step |
AUTONMI_DRAGON_GPU=<id> |
the GPU test, on a GPU Dragon lists |
AUTONMI_DRAGON_GPUS=<id>,<id> |
the test on two GPUs |
AUTONMI_DRAGON_LAUNCH |
the dragon options for tests/test_nodes.py's run, such as -w slurm -t tcp --network-prefix RE in a job of several nodes (default -s) |
AUTONMI_DRAGON_POPULATIONS |
the populations of that run: 4 on CPUs, 2 on GPUs |
AUTONMI_DRAGON_NODE_GPUS=1 |
its test on GPU nodes |
AUTONMI_DRAGON_AGENTS |
agents in the Dragon run of tests/test_autonmi.py (100) |
AUTONMI_DRAGON_CUDA |
1 (the default): the GPU tests' simulations also ask PyTorch what CUDA sees, where PyTorch is installed. 0: no PyTorch |
AUTONMI_KILL_GRACE |
the kill_grace of the mini-app's backend in tests/test_nodes.py's runs |
On Slurm¶
jobs/ holds job scripts for a Slurm cluster. The cluster's paths and account stay out of the
repository, in jobs/local.env, which git ignores. Copy jobs/local.env.example to jobs/local.env
and fill it in:
# Copy to jobs/local.env (ignored by git) and fill in for your cluster.
# Paths
AUTONMI_VENV=/path/to/venv # Python 3.12 with AUTONMI installed (requirements.txt, -e .), Dragon and RaDEX; vLLM for the model job
AUTONMI_OVERLAY= # optional: directories put first on PYTHONPATH (e.g. newer RHAPSODY, RaDEX)
AUTONMI_RUNS=/path/to/runs # run directories, on a file system the nodes share
AUTONMI_MODEL=${AUTONMI_MODEL:-/path/to/Qwen3-8B} # the model's weights; another model's from the environment
AUTONMI_CUDART= # optional: on LD_LIBRARY_PATH, so that Dragon sees the GPUs
# The model's settings: optional, Qwen3-8B's when unset. Set them here or in the environment of
# `jobs/submit model`, and give the campaign the same name (the example mini-app's --model-name).
# For NVIDIA Nemotron 3 Nano: AUTONMI_MODEL_NAME=Nemotron-3-Nano AUTONMI_TOOL_PARSER=qwen3_coder
# AUTONMI_REASONING=nemotron_v3.
# AUTONMI_MODEL_NAME=Qwen3-8B # the served name
# AUTONMI_TOOL_PARSER=hermes # vLLM's tool-call parser
# AUTONMI_REASONING=qwen3 # vLLM's reasoning parser, for the reasoning knob; unset: thinking off
# AUTONMI_REASONING_START='<think>' # what starts and ends the thinking, for the budget
# AUTONMI_REASONING_END='</think>'
# AUTONMI_TP=1 # GPUs per vLLM server (tensor parallel), for a model larger than one GPU
# export NCCL_P2P_DISABLE=1 # with AUTONMI_TP > 1, where GPU peer-to-peer transfers hang (README); exported, for vLLM
# AUTONMI_VLLM_ARGS="--disable-custom-all-reduce" # there too: vLLM's own all-reduce hangs after a few minutes
# Slurm
SLURM_ACCOUNT=
SLURM_CPU_PARTITION=
SLURM_GPU_PARTITION=
SLURM_GPU_GRES=gpu:1
The job scripts read jobs/local.env, but pass on only what is exported. Then:
The job runs every test with AUTONMI_DRAGON_TEST=1, then the conformance kit's Dragon run on the two
toys, and writes their output into AUTONMI_RUNS/framework-dragon-<job>/. Options after -- go to
pytest. Its exit status is 0 when every step passes.
- One Dragon runtime per node: the job stops at once on a node where another running job of yours has "dragon" in its name.
- Each step ends by its own timeout, two minutes before the job's time limit, so that Slurm never
kills a Dragon runtime; when the job ends, it removes the files it left in
/dev/shm, when no other job of yours runs on the node. jobs/submit modelstarts the model servers: see Model servers.
When a run hangs¶
AUTONMI_STACKS=<s> writes every thread's stack every s seconds: in the example mini-app's process, to
RUN/launcher-stacks.txt, and in each population's process once the population has returned, to
RUN/populations/p<index>/stacks.txt. A population's process should exit right after it returns, so a
stack there shows what holds it.