Constant MAX_PARALLELISM
pub const MAX_PARALLELISM: usize = 128;Expand description
The most concurrent trial processes one spike run may hold open.
Concurrency here is not just CPU: each live trial owns a child process and, inside the executor, that child’s two captured pipes plus the two cancellation socket pairs its bounded readers poll — six descriptors and two reader threads per concurrent trial, before the journal, the storage handles and the per-trial config files a spike also keeps open. At this ceiling the outer layer is 768 descriptors; the non-segmented nested train/eval layer can add another 768. The concurrent cap below leaves room for the journal, storage handles, and per-trial config files; above it a run starts failing on descriptor exhaustion in unrelated code, which is the least diagnosable failure this harness can produce.
128 is also far above any machine this spike targets — an oniro trial is a whole training process, so useful parallelism is bounded by cores and GPUs long before it is bounded by this.