Independent simulation repetitions
Repeat checked task functions locally or on enrolled CPU processes, preserve deterministic iteration seeds and ordered numeric results, and inspect bounded storage and explicit CSV export.
ImplementedAner 0.1.0 or newerThe matching source build SDK also supports a narrower compiled typed task path. That path enrolls the matching compiled program as its worker and never uses the source/session interpreter protocol described by the installed runtime examples below. Keep the two execution and worker identities distinct; choosing a cluster context alone does not establish that its task was compiled.
parallel.repeat runs one checked, directly named Aner function repeatedly from the same initial parameters. Each iteration owns private mutable parameter and local state, shares immutable FrozenArray and completed OutputResults payloads, receives its zero based identity and deterministic seed, and contributes one numeric output row or typed region. A bounded native executor schedules local CPU threads, or an explicit CPU cluster uses persistent local/SSH Aner processes with their own worker threads. Results retain iteration order even when workers finish in a different order. Native cluster repetitions require matching Aner 0.0.4 or newer runtimes on every node; older releases can reject that execution context.
A worker here is a native execution thread, not a physical core or logical CPU. The operating system schedules these threads on eligible logical CPUs: workers can time share the same logical CPU, run simultaneously on different logical CPUs, or migrate between them. Aner bounds worker admission using the discovered CPU budget; it does not reserve a core or pin a worker to a CPU.
This is a focused API guide within aner.parallel. Keep import aner.parallel; there is no separate repetition submodule to import. Use the root guide for CPU allocation, execution policies and internal CLI benchmark jobs, or distributed neural training for the separate Dense replica contract.
For compatible packages, verified SSH enrollment, a two computer setup and adding more nodes, follow the native cluster guide. Its complete counting example uses the same checked CPU repetition API.
Start with independent stochastic growth paths
Download the local repetition program, then check and run it from your checkout or binary bundle:
aner check examples/parallel/repeat_local.aner
aner examples/parallel/repeat_local.anerThe program performs 1,000 independent paths of a synthetic multiplicative growth process. Its identical initial parameters are an initial level, per step drift, noise scale and a fixed number of steps. Each task maintains its own level and peak, and returns two dimensionless outputs: final relative change and largest relative decline from a previous peak. It requires no service, data download, credentials or accelerator and writes no file by default.
The fixture illustrates the execution API with simple model arithmetic. Researchers can replace the task body with their scientific model and explicitly validate its units, assumptions and numerical behavior. The returned statistics describe this configured synthetic process; they do not establish model validity.
Each step uses level = level × (1 + drift + noise_scale × shock), where shock is the seeded standard normal draw for that step. The initial level is an abstract quantity with no domain calibration. Column zero is final_level/initial_level − 1; column one is the largest (previous_peak − level)/previous_peak along the path. Both outputs are dimensionless.
The central call is:
let initial_parameters = List(100000.0, 0.0002, 0.01, 64)
let results = parallel.repeat(iterations: 1000, task: simulate_growth_path,
parameters: initial_parameters, execution: parallel.local(), seed: 42)
print(results.mean(column: 0))
print(results.std(column: 0, sample: true))This fragment belongs to the complete downloaded source; simulate_growth_path must be declared there. The source uses automatic local worker allocation so it also runs with a one slot CPU budget. When the discovered budget admits at least four workers, request four explicitly:
let results = parallel.repeat(iterations: 1000, task: simulate_growth_path,
parameters: initial_parameters,
execution: parallel.local(workers: 4), seed: 42)A request above the discovered CPU budget fails rather than silently clamping the worker count. parallel.inventory() describes that admission policy; its CPU slots are budget units, not reserved CPU identities. Four workers request concurrency; they do not guarantee four simultaneously running tasks or four times the speed.
The first two output lines are 1000 and 2. The later lines show measured column statistics, the first derived seed and a JSON execution summary. These values describe the configured fixture and native build; elapsed time varies by machine. The task's two numeric columns remain in the documented order.
Continue with a spatial research model
Heat diffusion with uncertain material and source parameters develops a complete one dimensional transient model. It runs 1,000 independent realizations from the same initial temperature field, advances a heterogeneous spatial grid, and returns peak, final center, final spatial mean and threshold outputs. Its guide states the equations, units, explicit stability bound and Monte Carlo interpretation. It uses the same checked task API and requires at least four admitted CPU slots.
The measured heat solver CPU benchmark compares 10,000 realizations on one and four workers, verifies every output cell and seed, and publishes three paired trials with their timing boundaries and build provenance. The current Philox benchmark source uses different sampled values from that historical record; it is substantial CPU work and requires at least four admitted CPU slots.
Parallelize only the dice loop
Download the complete balanced and weighted dice example. It keeps setup and post analysis serial and places only the 1,000 paired rolls between BEGIN PARALLEL and END PARALLEL comments. These comments mark the example's execution boundary; the parallel.repeat call selects parallel execution.
aner check examples/parallel/repeat_dice.aner
aner examples/parallel/repeat_dice.anerThis program requires the updated native engine and at least four admitted CPU slots. Checking starts no repetitions. Running needs no external data, network, credentials or service and creates no file by default.
- Serial setup defines balanced weights
List(1.0, 1.0, 1.0, 1.0, 1.0, 1.0)and unbalanced weightsList(50.0, 10.0, 10.0, 10.0, 10.0, 10.0). Every iteration receives a private copy of these same two Lists. - The checked
roll_pairtask uses cumulative relative weights to select faces 1 through 6. It requestsrandom.uniform(seed: seed, draw: 0)for the balanced die and a separatedraw: 1for the unbalanced die, then returns one two value List. Workers do not append to a shared output List; the executor collects one row per iteration. - After the call completes, serial code reads the two result columns, calculates means and builds an
Array<Int64>face count histogram for each die. Each histogram sums to 1,000; there are 1,000 paired rows, rather than 1,000 rolls divided among the workers.
The complete source declares roll_pair and initial_parameters; its parallel section is:
let results = parallel.repeat(iterations: 1000, task: roll_pair,
parameters: initial_parameters,
execution: parallel.local(workers: 4), seed: 42)Results have 1,000 rows and two columns. Faces returned as Int64 are stored exactly as native Float64 values; results.column(column: 0) and results.column(column: 1) export the balanced and unbalanced rolls in iteration order. The theoretical means are 3.5 and 2.5 respectively, because the second die gives face 1 probability 0.5 and each other face probability 0.1. Sample averages and face counts vary with the seed. The probability distributions match the supplied weights. Aner’s seeded generator determines the reproducible sample sequence.
Only the paired roll task runs on workers. Setup, printing and histograms execute on the caller after all results are available. Two small weighted selections per task may be too cheap to benefit from four workers: private copying and scheduling can cost more than the useful work. Treat this example as a partial parallel execution pattern, then measure a representative workload before claiming a speedup.
Declare a checked task
A task is the direct, unquoted name of a top level function with exactly these input types:
import aner.random
fn simulate(parameters: List, iteration: Int64, seed: Int64) -> Float64 {
let center = cast<Float64>(parameters.get(0))
let spread = cast<Float64>(parameters.get(1))
return center + spread * random.normal(mean: 0.0, stddev: 1.0, seed: seed, draw: 0)
}A scalar task can return Number, any of the eight fixed width integer types, Float32, or Float64. A multivariate task returns a List containing only finite numeric values. Every iteration must return the same nonempty width. Decimal results require the four parameter OutputRegion task form; the three parameter overload rejects them. Results use native Float64 storage: Float32 values widen exactly, Float64 values retain their represented precision, and every integer output must be exactly representable as Float64. All integers from -9007199254740992 through 9007199254740992 qualify, as do some larger values; inexact conversions fail rather than silently rounding. Convert explicitly with Float64(...) inside the task only when that rounding is intentional. A task cannot return a Quantity/Point directly or inside its numeric output List. Use an explicit .value() at the result boundary, retain the corresponding unit in the model documentation, and normalize compatible source units before that export.
ParallelTask appears in the signature reference as an internal argument contract. It is not a general source value, closure, String identifier or function pointer that can be stored in a variable. Write task: simulate, rather than task: "simulate", task: simulate(...) or a function alias. The native checker resolves the declared function and its allowed call graph before execution.
Pass scenario inputs through parameters. A task cannot capture a global variable, including an outer variable holding those inputs. Local variables and supported numeric/collection/class operations belong to the task's private execution. Supported nested mutable values are copied, with their relationships preserved inside that copy. Mutating one task's parameters does not mutate another task or the caller's originals. Each repetition begins again from the submitted initial state; worker reuse does not accumulate a previous repetition's state.
The initial snapshot is bounded to 16 MiB, including copied descriptors and payloads, in addition to the runtime's existing heap, collection, array and execution quotas. That budget is separate from result storage. The admitted task slice rejects print, I/O, network/database/API/credential operations, development/visual recording, nested parallel execution and neural/Tensor/Dataset/ML/data/context operations. Explicitly seeded samplers from aner.random, pure aner.math calls and scalar unit operations are explicitly admitted. Immutable Quantity/Point values can be copied within the bounded parameter graph and used by checked helpers; the clone preserves their declared unit and magnitude. Clock reads such as DateTime.now and Duration.monotonic are rejected; pass an intended time value explicitly instead. Checked named helper functions and supported local class methods follow the same effect and capture constraints. General shared closures and unrestricted callbacks remain outside this API. The cluster route transports a narrower numeric/Bool/String/FrozenArray/OutputResults/List parameter tree and top level helper graph, as described below; the full local snapshot and class method contract does not imply remote support for those values or declarations.
Checking a complete source with aner check validates the task call and allowed source graph without running the repetitions. Runtime shape, finite value, copy, allocation and task execution failures still require execution to detect.
Run checked tasks on enrolled CPU workers
Use the same task with an explicit CPU cluster context. With simulate declared above:
let results = parallel.repeat(iterations: 1000, task: simulate,
parameters: List(1.0, 0.1),
execution: parallel.cluster(config: "private.repeat.cluster"), seed: 42)
print(results.summary())Prepare the private configuration on the submitting computer using the existing native schema. Replace the executable paths and SSH alias with your installed full Aner engines:
ANER_CLUSTER 1
worker "Atlas-01" local "-" "/absolute/path/to/aner" 4
worker "Atlas-02" ssh "enrolled-peer" "/absolute/path/to/aner" 4On POSIX, the file must be an owner owned, owner only regular file (chmod 600 private.repeat.cluster). Relative configuration paths resolve from the command's working directory. SSH enrollment uses existing batch authentication and strict host key verification. No new worker listener or network discovery is introduced. See cluster setup and CPU admission. aner check checks source without reading the private file or connecting to workers.
The initial native repetition contract is CPU only: at most 32 configured processes, at most 256 aggregate admitted CPU threads, and each host's discovered allocation. At least one task is required per selected process. One initial task establishes each node's participation and output width; subsequent bounded batches go to processes as they become ready. Faster nodes can accept more tasks. The source level context exposes no batch size argument. Native request sizing also respects output width and the transport budget; group sufficiently substantial work inside each checked task.
The coordinator ships the checked task and its reachable named top level helper declarations, not the original script's top level setup. Workers recheck the generated program and execute local CPU tasks. Original global iteration indices, derived task seeds, private initial parameters and ordered row identities are preserved. Numeric result and complete accounting checks are the same as local execution; CPU placement does not imply GPU execution.
Remote parameters admit fixed width integers, finite Float32/Float64, Decimal, Bool, String, explicit FrozenArray inputs, completed OutputResults<T> inputs and nested Lists forming a tree. Immutable aliases reuse registered backing and preserve their native type. Shared List aliases, cycles, mutable input arrays, nominal classes, Quantity/Point and other runtime objects remain rejected. Remote task/helper graphs cannot require nominal class declarations or methods. A task may construct its own private local arrays and use admitted built ins. Parameter source serialization is limited to 512 KiB and 64 nesting levels; retained helper declaration source is limited to 768 KiB. Calls without immutable numerical inputs and with the legacy scalar/List result retain their existing 1 MiB request/response guard. The immutable input or typed output route uses dedicated bounded numerical frames as described below. These guards are separate from the 16 MiB local snapshot and the caller's result budget.
Each native session operation has a fixed 120 second deadline. Remote task/cell execution retains the one million step session limit; raising the submitting command's --max-steps does not raise that guard. Keep tasks and batches within those limits. Compatible nodes must pass version, parallel source contract fingerprint, random engine and addressed random probe admission. The contract fingerprint includes the interpreter/frontend and sampling implementation used by this path, but it is not a complete binary/dependency identity; build every architecture from the same reviewed source revision and record numerical library provenance. Transcendental platform differences still require appropriate tolerances.
Native worker startup/transport failures provide conditional dependency guidance when a known cause is observed. Local execution and all local clusters perform no SSH dependency check. An explicitly selected SSH connection can distinguish a missing host client, refused service, authentication, host key or network failure; refusal alone does not establish that openssh-server is missing. Worker path/library failures point to the matching complete Aner package. Hints never auto install packages or print raw captured stderr; the main executable cannot report a loader failure that prevents Aner from starting.
Any task, compatibility, transport, deadline or malformed result failure aborts the group and publishes no partial result. Worker processes are stopped on failure. Retry, durable task leases, coordinator recovery and detached source repetition jobs are not implemented.
Immutable inputs and typed output on a cluster
The same typed output task works with parallel.cluster:
import aner.parallel
fn simulate(parameters: List, iteration: Int64, seed: Int64,
output: OutputRegion<Float32>) -> Unit {
let input = cast<FrozenArray<Float32>>(parameters.get(0))
output[0] = input[iteration % input.len()]
output[1] = Float32(iteration)
}
let input = Array<Float32>(64, Float32(1.0)).snapshot()
let results = parallel.repeat(iterations: 100, task: simulate,
parameters: List(input), output_shape: List(2),
execution: parallel.cluster(config: "private.repeat.cluster"), seed: 2026)
print(results[99, 1]) // Float32 value 99.0Run the complete cluster example after preparing the private worker configuration. Replacing the execution policy with parallel.local(1) keeps the same task, shape and values. A three parameter task may also use frozen inputs and retains its SimulationResults result, Float64 conversion rules, reductions and argument defaults.
A FrozenArray input, completed result input or typed output call selects a dedicated native repetition session. After normal CPU/version/source/random admission, the coordinator sends checked task/helper declarations and registers each distinct immutable numerical backing once per worker process. Aliased immutable descriptors reuse that payload; later batches send assignments rather than resending inputs. A completed OutputResults<T> backed by sealed native shared memory can supply its original read only descriptor to compatible workers on the coordinator's host. Those workers map the existing payload directly: no restaging, numerical transport, payload copy, second input segment or coordinator numerical wire cache is needed. The worker can retain that immutable input for later calls, so a subsequent cache hit needs neither another descriptor transfer nor input registration payload.
FrozenArray and private completed result inputs use one new native read only segment per compatible host. The coordinator sends each payload to the first worker once; that worker copies it into the segment, and peers attach without per worker numerical payload copies. Different hosts receive their own segments. Unsupported platforms, isolated namespaces and unavailable descriptor capability resources retain bounded transport or private imports automatically. A mapped source supplies a borrowed numerical span when transport is necessary, avoiding a coordinator serialization buffer. Current call bindings release when the call ends; eligible immutable backings remain in the bounded worker cache for later calls. Mutable List state is still cloned for each iteration. Completed inputs retain their exact type, shape and original producer seed/worker/timing/summary metadata. They can be chained through later local or cluster repetitions without an explicit snapshot. Local clones share the completed native allocation. Native cluster imports map only the numerical payload and retain producer metadata separately; they allocate no new completed result coverage or row controls. Private fallback imports retain the previous native allocation behavior. See completed output reuse. Scalar/List tasks also use the same worker cohort and keep their existing result API.
The interpreter keeps one admitted worker cohort across parallel.repeat calls with the same ordered worker definitions, including worker identities, transport, endpoint, executable and CPU slots. A configuration file path is not the pool identity; identical definitions from another path can reuse the cohort. Changing the definitions replaces it. Tasks, helper source, parameters, shapes, iteration counts and master seeds may change without restarting workers. Each call starts a fresh checked worker session: previous functions, mutable parameters, globals and result roots are cleared. Only validated immutable input cache entries and explicitly retained immutable resident output shards survive. At most 32 worker processes and 256 aggregate CPU slots are retained. A cohort idle for 300 seconds is discarded when the next cluster call begins unless live resident output handles pin its owners.
The pool belongs to one standalone program execution or native Session, including notebook cells in that session. Successful calls park workers after every task joins and every writer mapping is revoked; retaining a worker cannot leave a writable view of a published result. Returning from program execution, resetting or destroying the native session closes and reaps parked workers. Static parse/check errors preserve the pool because no run began. A task failure, lost process, invalid response or cancellation discards the complete cohort and publishes no partial result. The next valid execution can create a fresh cohort. This does not create a cross program daemon or detached job.
Each worker caches at most 64 immutable backing entries and 64 MiB of native retained input storage, with at most 1 MiB of serialized producer metadata. The cache uses least recently used eviction; a new entry may evict older entries and an input too large for the cache remains available only for its current call. Cache identity includes input kind, exact dtype, shape, numerical payload and complete producer metadata. Equal numerical values with different shape, type or provenance cannot select a stale entry. Aliases and distinct source descriptors with the same cache identity can bind one retained numerical backing. Cache hit counts and avoided byte counters count successful bindings, while retained/native mapping counters deduplicate that backing within a process. A hit binds the existing immutable storage without numerical or producer metadata transfer, shared segment staging or numerical payload copy, including on another host reached through its still live worker session. The ordinary active input admission remains independently bounded to 64 MiB per worker, so active inputs and cached entries can conservatively retain up to 128 MiB per worker, plus native page padding and fixed interpreter/allocator metadata. Current call input counters and end of call cache snapshots can refer to the same allocations and must not be added as separate physical memory.
Typed worker tasks write disjoint OutputRegion<T> sections. Compatible workers sharing a native host namespace map one output payload per host and write directly into assigned global ranges. A batch keeps private initialization coverage and task lease controls, then joins its writers and releases its mutable mapping before replying. Workers sharing the coordinator's namespace use its final retained payload; their completion responses contain row identities and accounting without serializing or transporting numerical output. The coordinator validates and commits those rows without a numerical payload copy. Other hosts stream completed mapped ranges through bounded canonical output frames without allocating a numerical serialization buffer. Unavailable platforms or isolated namespaces retain private batch payloads and the bounded binary output path. The coordinator validates the run token, dtype, region shape, assigned range, complete worker accounting and finite values; binary replies also require the exact payload length and digest. UInt64 values retain their full range; floating payloads retain represented bits, including signed zero and subnormals. Worker completion order never changes the published iteration order or derived seeds. Empty regions and shaped results retain their axes. There is no conversion through Float64 for typed outputs.
For the default collected mode, the complete coordinator output buffer is admitted against max_bytes before worker launch. Each worker admits at most 4,094 distinct immutable descriptor bindings and 64 MiB of combined retained immutable storage. Initial admission conservatively includes FrozenArray payload and completed result payload, coverage and row controls so private fallback remains possible; native completed result mappings retain only numerical payload. The dedicated transport limits each numerical payload to 64 MiB, each completed input's serialized producer metadata and each response summary to 16 KiB, and headers to 512 bytes. Generated source retains the existing 1 MiB guard. Checked shape/product limits, parameter-source/declaration budgets, one million step remote guards and 120 second operation deadlines still apply. Batches are sized against typed output width and transport capacity; the caller does not configure their size. Task local workspace, remote batch storage and transport buffers are additional allocations, reported separately from the coordinator result budget.
Native segments use unpredictable names and owner only access. Workers verify ownership, size and protocol capabilities before accepting a mapping. Immutable input mappings are read only, and new input segment names are unlinked after registration and before tasks start. Reused outputs stay anonymous: their names remain unlinked and a private, per submission native capability broker transfers only read only descriptors to admitted workers. Workers validate descriptor access, ownership, native header, exact size and declared shape; the broker closes before tasks run. Output mappings are writable only inside the checked runtime while an assigned batch runs; tasks receive scoped regions with no raw address. Completed batches surrender those mutable mappings before acknowledgement. When every output writer has finished, the coordinator seals the retained output read only and unlinks its segment name before immutable publication. Successful completion clears all writable output mappings before workers park. Failed initialization and cancellation close sessions and release mappings and cached inputs. Input segment name cleanup uses live workers and bounded reconnection to the approved host; cleanup on an unreachable host is best effort. Any failed task, incomplete region, malformed reply, incompatible worker, lost session or cancellation closes the worker sessions and publishes no partial SimulationResults or OutputResults<T>. The default mode provides ordered collection after completion; resident typed outputs defer that collection explicitly; it does not expose cross computer pointers, live partial results or mutable caller array access from remote tasks.
Resident typed outputs across calls
For a typed cluster call, resident: true keeps completed native output shards on their producing workers and returns an OutputResults<T> descriptor without numerical collection. Later parallel.repeat calls can take that result directly in their parameter List, binding the same immutable worker allocations without redistributing them. The default remains resident: false. Resident inputs also work with collected output: omit resident: true on a consuming call to collect only its new result.
Resident pipelines use balanced contiguous partitions in configured process order. Every consumer must keep the same global iteration count, cohort generation and partition layout; multiple resident inputs must be co partitioned. Tasks use global input indices and may read only their worker's resident rows. Access outside that shard fails rather than issuing a hidden network request. Ordinary immutable FrozenArray and collected inputs may accompany resident inputs. Original producer metadata remains available in the worker's fresh checked state.
result.is_resident() reports its storage mode. A resident result's metadata readers remain available on the coordinator, while numerical reads require result.collect(). Explicit collection gathers exact typed shards in global iteration order and leaves the source resident result reusable. Collecting an ordinary result returns an alias without numerical copying. See resident output pipelines and the complete example.
Each worker has a separate authoritative store bounded to 64 resident shards, 64 MiB native payload/coverage/control storage and 1 MiB local worker summary metadata. Live handles pin their entries and prevent idle expiry; admission never evicts live results. Actual managed heap collection of the final alias queues releases for the next worker pool acquisition. Session cell boundaries perform collection; source scope exit alone does not. A standalone loop can therefore reach pinned entry capacity before collection or teardown. Configuration replacement, worker failure/loss, cancellation, Session reset/destruction and program return release owners and invalidate resident capabilities. Reusing or collecting a stale result fails explicitly. These bounds are independent of the immutable input LRU cache and active input admission.
Cluster memory accounting
Immutable input and typed output cluster summaries make input accounting available and add the following logical counters. Process pool counters are available for scalar/List calls as well; zero immutable input counters mean that call registered no immutable inputs. These fields measure managed payload, source and transport allocations, rather than RSS or a total distributed memory quota.
| Field | Meaning |
|---|---|
shared_input_bytes / shared_input_buffers | Unique coordinator FrozenArray and completed result numerical payload bytes/backings, deduplicated across aliases. |
shared_input_retained_bytes | Unique coordinator native input retention: FrozenArray payload and completed result payload, coverage and row controls. |
parameter_snapshot_bytes / parameter_snapshot_array_copy_bytes | Coordinator's initial copied descriptor/private payload storage and its array payload subset; immutable backing is excluded. |
task_array_copy_bytes | Copied mutable array payload across worker iterations; immutable backing is excluded. |
cluster_worker_processes | Number of admitted worker processes. |
cluster_worker_process_starts | Worker processes newly started and admitted for this call. |
cluster_worker_process_reuses | Already admitted processes leased from the owning interpreter's cohort for this call. |
cluster_worker_pool_evictions | Previously retained worker processes discarded before this call because definitions changed, the cohort expired or a parked worker exited. |
cluster_worker_pool_retained_processes | Live worker processes retained after the call has completed and revoked its writers. |
cluster_input_cache_hits / cluster_input_cache_misses | Existing immutable backing entries successfully bound / absent in the worker cache, summed across processes. |
cluster_input_cache_stores / cluster_input_cache_skips | Newly retained backing entries / entries kept only for the current call because they cannot be cached. |
cluster_input_cache_hit_bytes | Numerical payload bytes reused from cached entries, summed across successful binding hits. Equal content descriptors can add hits without another native backing; these bytes required no new numerical transfer or copy. |
cluster_input_cache_store_bytes | Native retained bytes admitted into cache during this call, including private completed result coverage and controls when present. |
cluster_input_cache_retained_bytes | Native immutable cache storage retained after the call, summed across processes; bounded to 64 MiB per process. |
cluster_input_cache_retained_entries | Cache backing entries retained after the call, bounded to 64 per process. |
cluster_input_cache_peak_bytes | Sum of per process peak native cache storage observed during this call; this is not measured simultaneous RSS. |
cluster_input_cache_evictions | Immutable cache entries released by least recently used replacement during this call. |
cluster_input_cache_retained_metadata_bytes | Serialized producer metadata retained in cache after the call; bounded to 1 MiB per process, separate from native cache bytes. |
cluster_input_cache_peak_metadata_bytes | Sum of per process peak serialized cache metadata observed during this call. |
cluster_input_cache_retained_allocation_bytes | Retained cache allocation extents: native page rounded shared mappings or private native retained storage. Different cached views and processes can share physical pages. |
cluster_resident_output_stores | Newly retained typed output shards, summed across workers. |
cluster_resident_output_bytes | Numerical payload bytes in newly retained output shards. |
cluster_resident_output_retained_bytes | Snapshot of authoritative worker output storage, including retained coverage and row controls; at most 64 MiB per worker. |
cluster_resident_output_retained_entries | Snapshot of authoritative resident shard entries, at most 64 per worker. |
cluster_resident_output_allocation_bytes | Snapshot of actual native allocation extents for authoritative outputs, including private controls. |
cluster_resident_output_releases | Authoritative worker shards freed by flushed owner releases. |
cluster_resident_input_bindings | Successful attachments of an existing resident shard as an immutable input. |
cluster_resident_input_bytes | Logical numerical shard bytes reused by resident input attachments; these bytes are not transferred or copied. |
cluster_resident_collected_bytes | Numerical bytes transferred by explicit resident collection. |
cluster_resident_output_metadata_bytes | Snapshot of stored local worker summary metadata; at most 1 MiB per worker. Global original producer metadata is sent separately on attachment, bounded to 16 KiB per binding and counted by cluster_input_metadata_bytes. |
cluster_input_payload_bytes | Numerical payload bytes sent to workers: once per shared host segment, or once per private fallback import. |
cluster_coordinator_input_wire_bytes | Unique owned serialized input payload retained on the coordinator during the run. Direct or transported mapped sources need no numerical wire allocation. |
cluster_coordinator_input_borrowed_bytes | Unique existing mapped numerical spans retained for submission without a serialization copy. These are views of source storage, not new physical payload allocations. |
cluster_worker_peak_input_wire_bytes | Sum of each process's largest incoming input metadata plus payload frame. Attaching to an existing segment carries no numerical payload. |
cluster_coordinator_input_metadata_bytes | Unique serialized producer metadata retained for completed result inputs during submission. |
cluster_input_metadata_bytes | Producer metadata bytes sent during worker input registrations, including attempts that fall back to a private import. Cache hits send none. |
cluster_worker_input_retained_bytes | Sum of visible native immutable input storage per process: shared mapping bytes plus private fallback allocations. This counts a shared segment again for every process mapping it. |
cluster_input_transfers | Number of payload bearing registration attempts: shared segment creations plus private fallback imports, including empty backings and creation attempts that fall back. |
cluster_input_shared_host_bytes | Unique numerical payload bytes in newly created input segments, counted once per backing per host. Existing source storage reused through descriptors is excluded. |
cluster_input_shared_segments | Number of newly created host owned input segments, including empty backings. |
cluster_input_shared_allocation_bytes | New shared input allocation including its native header and operating system page padding, counted once per segment. |
cluster_input_shared_mappings | Number of owning backing mappings across processes, including reused source views; descriptor aliases do not add mappings. |
cluster_input_shared_mapping_bytes | Sum of numerical mapping lengths across processes; these are virtual views of the shared host storage. |
cluster_input_shared_mapping_allocation_bytes | Sum of full mapped allocation extents across processes, including native headers and page padding. |
cluster_input_shared_reused_bytes | Unique numerical payload in existing completed output storage successfully reused through read only descriptors, counted once per backing per submission. |
cluster_input_shared_reused_allocation_bytes | Existing reused source allocation including its native header and page padding. This storage is already included in coordinator input retention. |
cluster_input_shared_reused_buffers | Unique completed output backings directly reused, including empty backings. |
cluster_input_shared_reused_mappings | Worker views of directly reused backings; a subset of cluster_input_shared_mappings. |
cluster_input_shared_reused_mapping_bytes | Numerical lengths of directly reused worker views, a subset of all shared mapping bytes. |
cluster_input_shared_reused_mapping_allocation_bytes | Full native allocation extents of reused worker views, a subset of all shared mapping allocation bytes. |
cluster_worker_private_input_bytes | Retained private input allocations on fallback workers, including completed result coverage and controls. |
cluster_worker_input_payload_copy_bytes | Numerical payload copied into private fallback input allocations; zero for native shared imports. |
cluster_input_shared_staging_copy_bytes | Numerical payload copied once into each host segment during creation. |
cluster_input_bindings | Unique immutable descriptor bindings across workers; repeated references to one descriptor reuse a binding. |
cluster_initialization_source_bytes | Source bytes sent to initialize fresh checked call state, summed across workers; process reuse does not retain old task globals. |
cluster_batch_source_bytes | Generated assignment source bytes sent across all task batches. |
cluster_received_output_bytes | Accepted packed numerical output bytes collected through binary frames; direct shared output adds zero numerical transport bytes. Framing and metadata are excluded. |
cluster_peak_response_bytes | Largest single accepted response summary plus payload buffer; protocol headers are excluded. |
cluster_peak_transport_bytes | Peak coordinator input payload and metadata caches plus concurrently held response summary plus payload buffers; generated source and protocol headers are excluded. |
cluster_worker_peak_output_bytes | Sum of each process's largest logical batch output footprint: payload, coverage and controls. A shared payload remains part of this logical view; private allocations are reported separately below. This is not a measured simultaneous cluster peak. |
cluster_worker_peak_wire_bytes | Sum of each process's largest numerical wire allocation; this is not a measured simultaneous cluster peak. |
cluster_output_shared_host_bytes | Full numerical output payload capacity allocated once per native host segment, including the coordinator's shared result payload. This can exceed bytes written on a host because assignments retain global row offsets. |
cluster_output_shared_allocation_bytes | Page rounded native output allocations, including segment headers, counted once per host segment. |
cluster_output_shared_segments | Number of native output segments, including the coordinator result segment and empty payload capabilities. |
cluster_output_shared_batches | Accepted worker batches that wrote through native output mappings. |
cluster_output_shared_mappings | Worker processes that mapped a native output payload; repeated batches reuse this accounting identity. |
cluster_output_shared_mapping_bytes | Full numerical output mapping extent counted once per worker process/backing. Repeated batches and transient read-only/writable aliases do not add another view. This is not a measured VMA peak. |
cluster_output_shared_mapping_allocation_bytes | The same deduplicated process/backing extents, including native headers and page padding. |
cluster_output_shared_written_bytes | Accepted assigned range numerical bytes written through native output mappings, across all hosts. |
cluster_output_direct_committed_bytes | Accepted numerical bytes already in the coordinator's shared payload; no numerical output frame or collection copy is needed. |
cluster_worker_output_payload_copy_bytes | Numerical bytes copied into private fallback serialization buffers. Native workers stream from completed mappings or acknowledge direct completion, so add zero. |
cluster_coordinator_output_payload_copy_bytes | Numerical bytes copied from accepted binary replies into final rows; equal to cluster_received_output_bytes. |
cluster_worker_peak_private_output_bytes | Sum of each process's largest private batch coverage/control allocation, plus numerical payload when native output is unavailable. |
cluster_worker_parameter_snapshot_bytes | Sum of logical worker batch parameter snapshot storage. |
cluster_worker_parameter_snapshot_array_copy_bytes | Array payload subset of worker batch parameter snapshots. |
cluster_worker_task_array_copy_bytes | Aggregate mutable array payload copied into worker iteration heaps. |
cluster_batches | Number of accepted worker batch responses. |
For example, one 1 MiB frozen buffer submitted under three aliases to four compatible processes on one host reports shared_input_bytes: 1048576, shared_input_buffers: 1, cluster_input_payload_bytes: 1048576, cluster_input_transfers: 1, cluster_input_shared_segments: 1 and cluster_input_shared_mappings: 4. Its shared payload is 1 MiB and its summed virtual payload mapping lengths are 4 MiB; private input copy bytes are zero. Iteration and batch counts do not change these input totals. Distinct hosts require distinct segments, and a fallback process receives its own payload copy. A recoverable shared memory registration failure can add bounded input payload or metadata traffic before private import; the transfer counters include those attempts.
If that 1 MiB source is an already sealed shared memory backed OutputResults<T>, the same four local workers report cluster_coordinator_input_wire_bytes: 0, cluster_coordinator_input_borrowed_bytes: 1048576, cluster_input_shared_reused_bytes: 1048576, cluster_input_shared_reused_buffers: 1, cluster_input_shared_reused_mappings: 4 and cluster_input_shared_reused_mapping_bytes: 4194304. New input segment count, input payload transport, segment staging copies and worker payload copies are all zero. On its first registration, producer metadata is still sent to each worker. The existing 1 MiB source remains part of retained coordinator input; adding its four virtual views does not mean allocating another 4 MiB of numerical storage. Empty sources count the reused backing and worker capabilities with zero payload or native allocation bytes.
Repeating that input in the same interpreter and unchanged cluster definitions can hit each parked worker's cache: cluster_worker_process_starts: 0, cluster_worker_process_reuses: 4, cluster_input_cache_hits: 4 and cluster_input_cache_hit_bytes: 4194304. The consuming call sends no numerical input or producer metadata, creates no new input segment and performs no shared staging or worker numerical payload copy. Direct descriptor reuse counters are zero on this hit path because that capability is no longer transferred. Current call mapping counters still describe the four active views; cache retention counters describe the storage kept after those bindings are cleared.
For ordinary collected typed results, result_bytes, coverage_bytes, region_control_bytes, managed_bytes and retained_output_bytes describe the coordinator's retained output. Resident numerical storage is reported separately by cluster_resident_output_* fields; bytes() still gives the complete logical numerical result size. Resident input bindings transfer bounded original producer metadata, counted by cluster_input_metadata_bytes, while numerical input and output transport remain zero until explicitly collected. Resident attachments also contribute their actual shard allocation once per distinct resident identity and worker to cluster_worker_input_retained_bytes and cluster_worker_private_input_bytes. Those views overlap cluster_resident_output_retained_bytes; binding does not create another native allocation. task_output_copy_bytes: 0 means tasks write their own native regions directly. Compatible workers on the coordinator's host write the retained payload through native mappings, with zero numerical output transport. Other host and private fallback collection is counted by cluster_received_output_bytes. The coordinator retains a canonical numerical wire cache only for immutable inputs without an existing mapped span; mapped result inputs retain a borrowed source view. Owned wire caches are additional payload allocations, while borrowed spans reuse the original input retention. Coordinator output, input wire caches, registered worker inputs, worker batches and bounded transport can coexist, so max_bytes is not a process wide or distributed job memory ceiling. Shared host/mapping payload counters use logical numerical lengths. The shared allocation counters include segment headers and operating system page padding; kernel bookkeeping remains outside these counters. Fixed metadata, allocator overhead, interpreter task heaps, task created arrays and unrelated native workspace remain outside these counters.
API reference
The first three arguments are required. Execution, master seed and result budget have defaults and may be supplied independently by name. Defaults are automatic local execution, master seed 42 and 67108864 bytes (64 MiB):
| Call | Result | Contract |
|---|---|---|
parallel.repeat(iterations: Int64, task: ParallelTask, parameters: List) | SimulationResults | Default local allocation, master seed and result budget. |
parallel.repeat(iterations: Int64, task: ParallelTask, parameters: List, execution: ParallelContext) | SimulationResults | Explicit local or admitted cluster CPU policy, default seed and result budget. |
parallel.repeat(iterations: Int64, task: ParallelTask, parameters: List, execution: ParallelContext, seed: Int64) | SimulationResults | Explicit CPU policy and master seed, default result budget. |
parallel.repeat(iterations: Int64, task: ParallelTask, parameters: List, execution: ParallelContext, seed: Int64, max_bytes: Int64) | SimulationResults | Explicit execution, master seed and result allocation budget. |
The table shows the ordinary positional forms. Named settings can skip preceding defaults, for example:
let results = parallel.repeat(iterations: 1000, task: simulate_growth_path,
parameters: initial_parameters, seed: 42, max_bytes: 67108864)No explicit context is needed in that call. Named labels do not make the first three arguments optional; unknown or duplicate labels remain errors. Use parallel.local(...) for local threads or parallel.cluster(...) for the admitted CPU cluster contract above. Neural device contexts remain rejected by repeat.
| Results method | Result and contract |
|---|---|
results.rows() -> Int64 | Number of completed repetitions. |
results.cols() -> Int64 | Common numeric output width; a scalar task has one column. |
results.value(iteration: Int64, column: Int64) -> Float64 | One stored value with zero based indices. |
results.row(iteration: Int64) -> List | Detached numeric row copy. |
results.column(column: Int64) -> List | Detached numeric column copy in iteration order. |
results.mean() -> Float64 | Mean of column zero. |
results.mean(column: Int64) -> Float64 | Mean of the selected numeric column. |
results.variance() -> Float64 | Population variance of column zero. |
results.variance(column: Int64) -> Float64 | Population variance of the selected column. |
results.variance(column: Int64, sample: Bool) -> Float64 | Population variance when false; sample variance when true. |
results.std() -> Float64 | Population standard deviation of column zero. |
results.std(column: Int64) -> Float64 | Population standard deviation of the selected column. |
results.std(column: Int64, sample: Bool) -> Float64 | Population or sample standard deviation. |
results.seed() -> Int64 | Submitted master seed. |
results.seed(iteration: Int64) -> Int64 | Derived positive task seed for the selected iteration. |
results.workers() -> Int64 | Admitted local threads, or the sum of configured admitted cluster thread slots; neither a CPU/core count nor live utilization. |
results.seconds() -> Float64 | Local: executor scheduling, private copying/evaluation and row commits, excluding context startup and final publication. Cluster: initial connections/admission or process reuse, fresh call initialization, work and call cleanup. Both exclude subsequent statistics and CSV export; the timing boundaries are not interchangeable. |
results.summary() -> String | JSON shape, seed, allocation, timing, managed storage accounting, backend, peak scope and per node participation. |
results.save_csv(path: String) -> Unit | Write a new private CSV file; refuse an existing destination. |
Module forms include the first result argument, for example parallel.mean(result: results, column: 0) and parallel.row(result: results, iteration: 0). Results share immutable retained storage when handles are copied. Exported Lists are independent values; changing one does not rewrite the result.
The summary labels local execution backend: "native-cpu-threads" and peak_active_scope: "native-task-calls"; its nodes array is empty. Cluster execution reports backend: "native-cpu-cluster" and peak_active_scope: "node-requests": the global peak counts simultaneous node requests, not remote native tasks or CPU utilization. Each node records id, target, cpu_slots, completed iterations/tasks, native compute seconds, observed task peak_active, device: "cpu" and backend: "native-cpu-threads". Node counts refer to function invocations, not scientific samples processed inside one invocation. Per node compute seconds sum local executor times; global cluster seconds additionally include admission or cohort reuse, fresh call initialization and call cleanup.
Population variance divides by n, and sample variance divides by n - 1. Sample variance and standard deviation require at least two repetitions. Named sample: true can omit the column and uses column zero: results.std(sample: true) or results.variance(sample: true). An explicit column remains available, such as results.std(column: 1, sample: true). A positional Bool alone is not a column argument; use the named sample setting. Mean uses bounded exponent binned compensated summation; variance and standard deviation use scale normalization with compensated/Welford accumulation in fixed row order. Mean scratch storage is a fixed set of 2,099 bins (tens of KiB, depending on native long double), rather than another iterations sized result buffer. A nonzero statistic outside finite Float64 representation fails explicitly. A standard deviation is computed without first requiring its squared variance to fit Float64.
Direct typed output
A task with a fourth parameter out: OutputRegion<T> and result Unit selects the typed output overload for local or cluster CPU execution. Supply output_shape: List(...) to allocate one disjoint region per iteration; workers write disjoint numerical regions directly, and the call publishes immutable OutputResults<T> only after every cell is written. The typed only optional resident: Bool = false flag keeps cluster output on its producing workers for later owner affine input reuse; collect() performs explicit ordered collection. Existing three parameter tasks continue to return SimulationResults. See typed output methods, bounds, and memory accounting and the complete example.
Share immutable numerical inputs
Call .snapshot() on a numerical Array, DynamicArray, or NDArray to create a FrozenArray<T>. It copies live data once and preserves NDArray shape. Pass the snapshot in the usual parameters List; local tasks share its const backing while keeping their mutable parameter objects private. The original array remains mutable, and its aliases cannot alter the snapshot. Existing programs keep their current isolation behavior.
Frozen snapshots expose checked numerical reads and shape metadata, with no mutation methods. They support fixed width integers, Float32/Float64 and Decimal. Decimal wire payloads use 24 byte coefficient/exponent slots; receiving frozen arrays decode into owned immutable handles with honest storage accounting. Cluster workers on a compatible host share each frozen backing through native read only mappings; other hosts or private fallback imports receive their own backing. Read immutable numerical inputs and run the complete shared input example.
The local result summary adds shared_input_bytes, shared_input_buffers, shared_input_retained_bytes, parameter_snapshot_bytes, parameter_snapshot_array_copy_bytes, and task_array_copy_bytes, with an explicit input_accounting_scope. Shared backing is counted once across aliases. Completed OutputResults<T> may be supplied directly, without taking a new snapshot. These counters separate retained immutable input from copied mutable arrays; they exclude interpreter workspace, allocator overhead and RSS. Existing result max_bytes and managed_bytes keep their previous meanings. Immutable input cluster runs report the same coordinator input fields and additional cluster counters; scalar/List calls without immutable inputs also report worker pool accounting, with zero immutable input registrations.
Deterministic addressed random draws
Random distributions belong to aner.random; import that module in task source. The current examples use Philox addressed sampling. Their seed/draw assignments remain stable across worker counts; their sampled values differ from earlier keyed recipes.
| Call | Result and contract |
|---|---|
random.uniform(seed: Int64, draw: Int64 = 0) -> Float64 | Uniform value on the finite 53 bit grid in [0, 1). |
random.normal(mean: Float64, stddev: Float64, seed: Int64, draw: Int64 = 0) -> Float64 | Normal approximation with finite mean and finite nonnegative standard deviation. |
Both seed and draw inputs must be nonnegative Int64 values; the default draw is zero. The repeat master seed also must be nonnegative. These helpers are stateless: the same seed and draw repeat the same value, and another task cannot consume their shared sequence. Inside a task, use its supplied seed and a deliberate draw identity such as the loop step. Using a constant draw in every loop iteration deliberately repeats that one shock. When different random decisions share a step, give each decision a distinct draw identity rather than accidentally reusing it.
Task seeds derive from the master seed and zero based iteration identity and are nonzero positive 63 bit integers. Worker assignment and completion order do not change them. The bounded seed space does not guarantee unique seeds for every possible master/iteration pair. These are simulation streams and are not suitable for credentials or cryptographic randomness.
random.normal uses Philox inputs from its own distribution domain and a Box Muller transform. Specify mean: 0.0, stddev: 1.0 for a standard normal draw. Transcendental math libraries can differ across builds and platforms, so bitwise normal draw or simulation result equality across different libm implementations is not promised. Worker count comparisons use the same checked source, engine build, inputs and seed; numerical portability comparisons should state their tolerance and build provenance.
Run 10,000 repetitions per scenario
The complete scenario program runs two scenarios separately, each with 10,000 repetitions and one identical initial parameter set. It changes only the declared noise scale between scenarios:
let execution = parallel.local()
let lower_noise = parallel.repeat(iterations: 10000, task: simulate_growth_path,
parameters: List(100000.0, 0.0002, 0.01, 64), execution: execution, seed: 42)
let higher_noise = parallel.repeat(iterations: 10000, task: simulate_growth_path,
parameters: List(100000.0, 0.0002, 0.025, 64), execution: execution, seed: 42)The fixed master seed deliberately matches the stochastic paths across those two parameter comparisons. The supplied per iteration seed is the same for equal iteration identities; the resulting outputs can differ because the parameters differ. This is common random number experimental control, not extra independence between matched scenarios. Change the master seed when separate streams are intended. Different seeds select another stream; they do not prove statistical independence.
aner check examples/parallel/repeat_scenarios.aner
aner examples/parallel/repeat_scenarios.anerThe source prints each scenario's row count, relative change statistics, seed equality check and execution summary. It is a larger CPU workload than the first example. Keep all 10,000 rows when analyzing the output distribution; a mean or standard deviation alone does not preserve the tails or per run identity.
Save outputs deliberately
After computing a result, select a new output file:
results.save_csv("growth-results.csv")The CSV header is iteration,seed,value_0,value_1 for the two column growth fixture. Rows follow iteration order. Seeds are exact decimal integers; numeric outputs use locale independent Float64 max_digits10 precision for round trip reading. Column meanings still belong in the scenario's model documentation; this API does not infer names or units from a returned List.
The parent directory must already exist. Creation is exclusive, so an existing file, directory or leaf symlink fails. POSIX output files are owned by the current user with mode 0600; Windows uses a protected owner only ACL in the native implementation. Choose a new name for another export. The downloaded examples keep CSV writes commented so rerunning them does not fail because of an earlier output file.
This export stores completed output, not a durable simulation job checkpoint. A failed or interrupted repetition batch does not publish a partial SimulationResults. Recovery and source level detached repetition jobs are not implemented. Checked native CPU cluster transport is available under the bounded contract above; unrestricted remote callbacks remain unsupported.
Limits, errors and observation
The scalar/List SimulationResults limits follow. Typed output layout and admission are specified in Typed output regions.
| Admission limit | Behavior |
|---|---|
| 1 through 1,000,000 iterations | Every admitted row must complete before a result is published. |
| 1 through 4,096 numeric columns | The first completed valid row establishes width; every row must match it. |
max_bytes from 1 through 1,073,741,824 | Default 64 MiB. Counts allocated dense Float64 capacity plus per iteration completion flags. |
| Private initial parameter snapshot at most 16 MiB | Shared immutable numerical payload is excluded from this copy quota. FrozenArray storage keeps its 64 MiB per heap array budget; completed result retention is separately bounded to 1 GiB per local submitted parameter graph. Separate from result allocation. Existing object/collection quotas and task limits apply. |
| CPU worker allocation | Local policy or explicit CPU cluster: at most 32 processes and 256 aggregate threads, with every host allocation checked. Excess requests fail. |
| Native cluster transport | Numeric/Bool/String/FrozenArray/OutputResults/List-tree parameters; 1 MiB generated source and legacy response guards, 64 MiB numerical payloads and 64 MiB retained immutable input per process; one million step remote task/cell limit and fixed 120 second operation deadline. |
| Finite Float64 outputs and statistics | Nonnumeric, empty, changing width or nonfinite outputs fail visibly. Unrepresentable nonzero statistics fail. |
For n iterations and c columns, the dense numeric payload is 8 × n × c bytes. Completion flags also need admission space; allocator capacity can exceed the logical payload. summary() distinguishes retained result_bytes from the peak managed allocation managed_bytes. Fixed metadata, allocator overhead, copied task heaps, interpreter state and executor workspace are outside max_bytes; it is not a total process memory quota.
Runtime repetition, RNG, accessor, statistical and CSV failures use source located R2803. Invalid checked task signatures, forbidden effects and global captures use E2803. Invalid task shape, capture or effect use is rejected before execution when statically knowable. A task exception stops publication and is reported as failure; the API never treats missing, duplicate or invalid rows as successful zeros. Bounds failures do not silently select another row or column. Row/column List exports also respect the caller's existing 262,144 field aggregate heap limit; keep a large result in its native representation or export CSV when a complete List would exceed that budget. CLI interruption and native executor cancellation stop the run rather than returning a partial success.
Development and production keep the same tasks, parameters, seed derivation and result ordering. Development may inspect outputs after the call; tasks cannot emit their own Dev captures or print from worker execution. Production disables development recording without changing the admitted task or scientific computation. A notebook cell waits until repetition completes; live worker timelines and streaming observations are not part of this slice.
Time, space and performance
Let n be repetitions, c returned columns, p admitted workers, h initial copied parameter storage, and T_i/W each task's work/working storage. The native executor provides bounded CPU concurrency locally or within each enrolled cluster process; the current engine still interprets checked Aner task source in its native runtime. Cluster execution adds fresh call source serialization, initial process/SSH setup or cohort reuse, bounded request scheduling and numeric transport; local span estimates exclude those costs and heterogeneous final batch effects. This API does not compile arbitrary task functions ahead of time or turn an ordinary source loop into a vectorized GPU kernel.
| Operation | Time | Additional space |
|---|---|---|
| Repeat all tasks and collect rows | O(sum of T_i + n h + n c) | O(n c + p (h + W)), plus bounded scheduling/interpreter state |
| Read shape, allocation, time, seed or one stored value | O(1) | O(1) |
| Copy one row | O(c) | O(c) returned List |
| Copy one column | O(n) | O(n) returned List |
| Mean, variance or standard deviation of one column | O(n) | O(1) auxiliary numeric state |
| Export CSV | O(n c) numeric formatting plus bytes written | O(c) row formatting, excluding retained results |
Recorded optimized CPU comparison
On October 14, 2026 UTC, an optimized native engine was measured on Atlas-01 / C04, an Apple M2 Max with 12 CPU cores, using the archived measured benchmark source. The current Philox benchmark example changes the sampled values and has not been measured in this record. The final updated engine was verified separately as Atlas-01 / C05; the new binary fingerprint creates a new configuration revision on the same platform. Each run evaluated 10,000 paths × 200 scalar steps, with initial parameters List(100.0, 200, 0.01, 0.2), master seed 2026, and two outputs (final value and peak value). The same engine, source task, parameters and seeds were used for one versus four local workers. All output cells and derived per iteration seeds matched exactly in every trial. Trial 2 ran the four worker case first to vary ordering.
| Configuration and trial | One worker executor seconds | Four worker executor seconds | Measured ratio | Whole source wall seconds |
|---|---|---|---|---|
Atlas-01 / C04, trial 1 | 0.906059 | 0.234270 | 3.87× | 1.159093 |
Atlas-01 / C04, trial 2, reverse order | 0.914239 | 0.234032 | 3.91× | 1.176138 |
Atlas-01 / C04, trial 3 | 0.913887 | 0.230783 | 3.96× | 1.162710 |
Atlas-01 / C05, final quiet verification | 0.898869208 | 0.235901375 | 3.81036× | 1.153540042 |
The C05 verification ran after other development checks and local source packaging completed, with ordinary operating-system/background activity outside the experiment's control. It again checked every output cell and derived iteration seed and retained exact parity between one and four workers. C04's three measured trials remain their own record; the one final C05 verification is not a three trial estimate.
Reproduction identities are SHA-256 content fingerprints, not digital signatures:
| Material | SHA-256 |
|---|---|
| Checked benchmark source, C04 and C05 | 6abea8f562a7e897278e32c0f79d29736071cb9602cc7c9b7a8f66bb8ab5a181 |
Native executable, Atlas-01 / C04 | 9e045c106cbbb822e0df5ba0ce9528016203b92b3653045f6fc20b5051d6fe80 |
Native executable, Atlas-01 / C05 | dfd628c32ee7a9c3feed1fb1a4498da5b9c66869daa52d420d33574f6d6c4f21 |
Both native configurations use the receipt recorded Release build with Apple clang 21.0.0, C++20, -O3, -DNDEBUG, -fno-fast-math and -ffp-contract=off. The verified machine record is arm64 macOS 26.7.1 (build 25G241), 12 logical/physical CPU cores and 64 GiB installed RAM. Capacity is not measured process memory or proof of dedicated CPU utilization. An engine or hardware change requires another immutable configuration revision.
Executor timings use the results.seconds() boundary above. Each whole source wall measurement includes both worker configurations, source checking, row/seed equality checks and statistics; it is not an individual four worker latency. This is a measured synthetic same engine scaling comparison. The timing applies to the recorded workload and allocation; it does not establish scientific model validity or guarantee a universal four worker speedup.
Compare one and four workers with the same task, parameters, repetition count and master seed. Verify stored rows and seeds before comparing elapsed time, then report multiple measured trials on the admitted CPU allocation. Initial admission/snapshot, context/thread startup and final publication are outside results.seconds() and belong in a separate end to end wall time measurement. Task cloning, short tasks, result copies, task arithmetic and resource contention can dominate. More workers may be slower for small workloads. No universal speedup or task completion estimate is implied.
The current Philox benchmark program compares 10,000 repetitions of the same task on one and four admitted CPU workers, checks all seeds/output rows, and prints measured timing. It requires at least four allocated CPU slots and is a larger CPU workload; measured results belong with their build, task and hardware record.
Continue with the aner.parallel root guide, development observations, and the complete local source.
Concise checked task code
Aner 0.0.4 or newer supports Range loops, numeric compound updates and checked Array/NDArray bracket access in admitted isolated tasks. Pure scalar functions from aner.math and immutable scalar arithmetic from aner.units are also admitted. These conveniences retain private state, transitive effect and ordered publication checks. See the concise research guide and the updated heat source.
Task parameters remain List transport, with supported private nested values including Quantity/Point, and successful outputs remain numeric scalars or Lists. A directly typed configuration parameter API, named typed output columns, records, general closures and Result returning repetition tasks are planned; they are not enabled by postfix Result propagation in ordinary functions.
Explicit public sampler
Tasks can use aner.random with an explicit seed and draw identity. Acquire an OS generated seed with random.seed() before parallel.repeat, then pass it in the parameters; entropy acquisition inside a task is rejected. Mutable RandomGenerator construction, methods and parameter transport are also rejected; keep the seed once generator workflow in ordinary code and use addressed draws in isolated tasks. Use global sample identities rather than worker indices when comparing worker counts. This summary metadata layout describes the current development source. Published 0.0.3 archives retain their original summary fields. Iteration seed derivation is unchanged. Result summary RNG fields distinguish this derivation from the supported Philox sampler contract; rng_task_usage: not-observed means the summary does not track which samplers the task actually calls. Retain the task source, random.engine() and draw schedule.