All examples
Scientific computing

Compiled tasks on enrolled CPU processes

Run the matching compiled task binary through an explicit private worker configuration; preserve global task identities and ordered typed output without interpreter sessions.

native_cluster.aner
// Build this file first, then point native-cluster.conf at matching compiled workers.
// Run from the directory containing that explicitly prepared configuration.
import aner.parallel

fn square(parameters: List, iteration: Int64, seed: Int64, output: OutputRegion<Int64>) {
    let bias = cast<Int64>(parameters.get(0))
    output[0] = iteration * iteration + bias
    output[1] = seed
}

let results = parallel.repeat(16, square, List(3), output_shape: List(2), execution: parallel.cluster("native-cluster.conf"), seed: 2026)
var ordered = true
for iteration in Range(results.rows()) {
    if results[iteration, 0] != iteration * iteration + 3 { ordered = false }
    if results[iteration, 1] != results.seed(iteration) { ordered = false }
}
print(ordered)
print(results.rows())
print(results.value(15, 0))
print(results.summary())

Make it your experiment.

Use the matching development source-build compiler SDK and C++20 toolchain. Save this program as examples/parallel/native_cluster.aner inside a folder for your experiment. Open a terminal in that folder, then check, build and execute the compiled program.

Choose fresh output paths and retain the generated C++ and JSON build manifest. Compiled local workers use the selected OS process backend. Windows workers require the matching development build. POSIX SSH commands and registered native SSH subsystems for remote Windows hosts use the explicit enrollment contracts in the guide. Use the native enrollment command for fresh private records and run native preflight before an explicit task run; preflight sends no scientific parameters or task callbacks. Building and the information command start no tasks.

Prepare the private native-cluster.conf with matching compiled workers using the compiled parallel guide before the final run line. Invoke the compiled executable with that explicit worker configuration.

Terminal
aner check examples/parallel/native_cluster.aner
aner build examples/parallel/native_cluster.aner -o native-cluster
./native-cluster --aner-native-info
# Prepare native-cluster.conf using the compiled parallel guide before running.
aner parallel native preflight --program ./native-cluster --config native-cluster.conf --receipt native-cluster.preflight.json
./native-cluster

Windows PowerShell:

PowerShell
aner check examples/parallel/native_cluster.aner
aner build examples/parallel/native_cluster.aner -o native-cluster.exe
.\native-cluster.exe --aner-native-info
# Prepare native-cluster.conf using the compiled parallel guide before running.
aner parallel native preflight --program .\native-cluster.exe --config native-cluster.conf --receipt native-cluster.preflight.json
.\native-cluster.exe

Select the matching aner compiler and SDK described in the native build guide; downloaded runtime packages do not provide a usable native SDK.

Requires the matching development source build compiler SDK and C++20 toolchain, then explicitly enrolled copies of the same compiled program in a private cluster configuration. Downloaded runtime packages do not include a usable native compiler SDK. Building starts no workers; running uses the guide’s documented process/SSH platform boundary.

This numerical example uses the development source-build compiler SDK. Retain its source, generated C++, build manifest and execution observations together when comparing results.

Read the native compiler contract
Install Aner