solprop.calibration.child#

A calibration child: one candidate’s process settings, timed on request (SEP 46).

The controller starts one child per candidate process setting, with the setting in its environment. main() (python -m solprop.calibration.child CPUS) pins the process to its CPUs (pin()) before the native runtime starts, then serve() answers JSON-line requests on standard input and output (prepare, time, sizing, capture, regions, exit), one reply line each, through a _Session that holds the built problems and a backend per workspace record. A child never calibrates and never reads a profile. The request protocol is in docs/dev/backends.md (section 3.4a).

Functions

main([argv])

Pin, then serve the controller on the process's standard streams.

pin(cpus)

Pin this process to cpus before the native runtime starts.

serve(requests, replies)

Answer requests until exit or the end of input.

solprop.calibration.child.main(argv=None)[source]#

Pin, then serve the controller on the process’s standard streams.

The protocol keeps a private copy of standard output; anything else the process or the native runtime prints goes to standard error.

Parameters:
argvsequence of str or None, optional

[CPUS]; the process’s own arguments when None.

Returns:
int

Zero.

solprop.calibration.child.pin(cpus)[source]#

Pin this process to cpus before the native runtime starts.

Linux sets its affinity mask; Windows its process affinity mask (CPUs of the first processor group); macOS has no affinity, and is left alone.

Parameters:
cpussequence of int

Logical CPUs; empty leaves the process as it is.

solprop.calibration.child.serve(requests, replies)[source]#

Answer requests until exit or the end of input.

Parameters:
requestsIterable[str]

JSON lines, one request each.

repliesio.TextIOBase

One JSON line written per request.