The run matrix, a campaign and its record¶
What a run matrix is, how its points are named and redone, how several matrices share a workspace, and what comes back. The other pages of the workflows section each take one run type or one topic.
What a run matrix is¶
A run matrix is a pipe-separated table, one row per simulation, that this package reads forever: the format is a first-class interface rather than an import step. Each row names a point of interest, the sweep it wants, and, by identifier, the reference, the solver preset and the boundary group it should be resolved against.
This is the matrix the test suite runs, byte for byte:
POL | HIDDEN | RUN | AIRCRAFT | CONFIGURATION | DESCRIPTION | FLIGHT_CONDITION | SWEEP_VALUES | GEOMETRY | REF | SET | PPROC | SYMMETRY | SYMMETRY_LOADS | NCPUS | WALLTIME | FS_BUILD | WORKFLOW | VAR_NAMES_VALUES
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
8001 | 0 | 1 | TestWing | - | REGISTRY_ALPHA | MACH:0.0890, REmi:3.10, ALPHA:sweep | 0.0,2.0 | - | r003 | s002 | p001 | - | - | - | - | 26.120 | LEGACY | FSM_FILE:wing_clean / OUTPUTS: loads_{point}.txt / RECIPE: 003
8002 | 1 | 1 | TestWing | - | REGISTRY_BETA | MACH:0.0890, REmi:3.10, BETA:sweep | -3.0,3.0 | - | r003 | s002 | p001 | - | - | - | - | 26.120 | LEGACY | FSM_FILE:wing_clean / OUTPUTS: loads_{point}.txt / RECIPE: 003
Read one row across. POL is the point of interest, and it becomes the
simulation identifier (sim_8001). FLIGHT_CONDITION states the flow
condition the row runs at, as comma-separated KEY:value pairs from a
closed set; it is MANDATORY, and it replaced the RE and MACH columns
in the matrix. What it means and which quantity gets solved for is
its own page. The same cell says WHAT VARIES,
and SWEEP_VALUES says over which values: ALPHA:sweep with 0.0,2.0
is an angle-of-attack sweep at zero and two degrees, so this one row is
two runs. Exactly one key of the cell may carry the word sweep; every
other key is a quantity the row HOLDS. REF, SET and PPROC are the
three identifiers that reach into the input library; PPROC names the post-processing artifact. FS_BUILD names the FlightStream
build the row wants. WORKFLOW names the run type, and a row naming one
needs nothing else to build its script; LEGACY means "none, use the
recipe", as these two example rows declare, and such a row names its recipe code as the RECIPE
key of its variables. The cell may
carry the reference itself, package.module:function, and a row written so
plans and runs with no --recipe option at all; a bare code such as 003
is still mapped by that option. A LEGACY row's recipe also
decides what it saves: these two rows declare a loads table and no .fsm,
so pyfs-matrix plan warns, naming both, that no final saved
simulation of theirs is collected, and plans them as before
. HIDDEN and
RUN sit directly after POL; RUN is the switch that says
whether the row takes part at all, and HIDDEN whether the solver shows a
window. On Windows a visible solver window starts minimized and without taking
the keyboard focus, so it does not cover your terminal.
SIX ADDITIONAL COLUMNS are expressible in the row and setup artifacts:
four as keys inside VAR_NAMES_VALUES and two inside the setup artifact.
CONFIGURATION is your own name for what is in the wind, beside
AIRCRAFT; it labels and configures nothing, and it reaches two places you
open: the first line of the emitted script, as a comment, and the title line
of the custom polar file after -.
GEOMETRY names the mesh file, or a .geom.toml configuration file the row
generates. The optional VAR_NAMES_VALUES variable MESH_ROUTE says how a generated geometry (or an IGES file) becomes the mesh the
solver opens: absent means no route stated, MESH_ROUTE: native hands the generated IGES to
the solver's CAD importer, quad_dominant meshes it with strategy 1 and full_grid with
strategy 2. A route stated on a row that opens an FSM, an OBJ or an STL is warned and skipped.
A generated row also reads GEOM_CONFIGURATION (required when the file declares several),
GEOM_VARIANT (clean by default), GEOM_PARAMS ({WING.planform.taper=0.6}, <component>.<key>, one override per
name, an unknown name refuses that row) and MESH_CONTROLS (the mesh controls file, by default
<stem>.mesh.toml). The generated files live in one folder of inputs/geometries/ named by the
parameters' identity, so equal parameters reuse it; a row whose generation fails is recorded as
GEOMETRY_FAILED with the path of its report, and the other rows run.
For example, write MESH_ROUTE: full_grid / GEOM_VARIANT: clean in VAR_NAMES_VALUES.
The header has no route column. SYMMETRY says what was MESHED, a mirrored
half or a periodic sector. SYMMETRY_LOADS says whether the loads that
come back are the whole aircraft's or the modelled slice's. NCPUS is the
processor count, ONE number that reaches the solver's thread count and, on
a cluster, the scheduler's request. WALLTIME is the wall clock, written
WITH ITS UNIT (240m, 4h, 90s, 1d; a bare number is
refused by name), which on an unsteady row also arms the watchdog. What the
scheduler's own field is given is the HPC profile's to say
(walltime_arithmetic), and it never moves the watchdog's deadline. The
watchdog measures elapsed time with the machine's monotonic clock between
solver steps, so setting the system clock during a run neither stops it early
nor late; after a restart of the machine it counts the calendar time instead.
A local launcher records the job start before launching the solver, so setup
and the first step count. Without that record, the watchdog starts at its
first invocation after the first step; walltime_margin_s must also cover
the setup and first-step time. The clock state names its origin as
job-start or first-invocation.
A COLUMN SAYS NOTHING WITH -. One character rather than an empty
cell, so a reader can tell "states nothing" from "the line is truncated".
Where one of the six says nothing, the older home still answers: NCPUS
falls back to the cited setup's max_parallel_threads. SYMMETRY_LOADS has
no other home: a setup stating symmetry_loads is refused by
name, naming this column, so a matrix upgraded from an older layout moves the
value into the column.
- IS NOT THE SAME AS SAYING "NONE". There is one case where the two
part company and it is worth knowing before you meet it: a row that opens
NO geometry cannot say so in the GEOMETRY column, because - there means
"states nothing, take the default". It says it with an empty-valued
GEOMETRY: key in VAR_NAMES_VALUES, and the upgrade leaves such a key
where it found it for exactly that reason.
A FACT MAY NOT BE STATED IN BOTH MATRIX HOMES. A row that puts one of the six in its column AND as a key of the free cell is refused naming both, because two homes for one fact is how the two come to disagree.
THE HEADER IS EXACT. A column the layout does not know is refused before
anything is planned, never carried along: the message names the column and the
known column closest to it in spelling, so FLIGHT_CONDITON is answered with
FLIGHT_CONDITION.
VAR_NAMES_VALUES is the last cell and the one that carries everything
else, as KEY: value pairs separated by /. The rows above use
FSM_FILE, which is a key of THEIR OWN: nothing in the package reads it,
and the recipe named by the row's RECIPE code is what resolves it and
opens the file. That is still how a recipe works.
For an unsteady row with no turning rotor, the optional key J_CLOCK
sets a reference clock without stating an ADVANCE_RATIO for a stopped rotor.
For example, put this in VAR_NAMES_VALUES:
J_CLOCK: 1.3 / DELTA_THETA: 20 / REVOLUTIONS: 2 / LAST_REVS_AVG: 1
With TASmps:30 in FLIGHT_CONDITION and top-level rotor_diameter_m = 2.0
in the row's reference, this marches 36 steps of 0.004814814814814815 s
and averages the final 18 steps. The run block reports J_CLOCK = 1.3.
The diameter is always that top-level reference field; rotor blocks and
CLOCK_MOTION do not select it. J_CLOCK must be positive and finite.
It is refused beside ADVANCE_RATIO, RPM or DELTA_TIME, on a turning
row, or without rotor_diameter_m. A steady row warns and skips it.
Existing power-off ADVANCE_RATIO rows remain accepted. See
the clock definition.
A WORKFLOW reads keys the package defines, and three of them close the gap that made the capability unusable:
GEOMETRY: <file name>names a geometry staged underinputs/geometries/by its FILE NAME, extension included: withwing_clean.fsmstaged, the cell readsGEOMETRY: wing_clean.fsm, andblade.v2.fsmreads one way and no other. A bare stem is refused naming the files that carry it. What the name buys is that the cell says what the file is: a.fsmis a saved simulation and is opened. The workflow reads the staged copy, so the bytes hashed are the bytes opened. All other suffixes are refused. Runpyfs-mesh mark-boundaries <mesh>.obj --applyonce and name the resulting.fsm. There is no OBJ override flag.
Planning names the selected inventory: <mesh>.fsm.boundaries.toml, then
<mesh>.boundaries.toml, then <mesh>.obj.boundaries.toml. Declaration
tables are refused with the marking command. No sidecar means an inventory
is written from the saved mesh. A marking record makes changed input
digests a refusal; missing records are accepted. Different FS_BUILD
values produce one warning listing the rows. See geometry.
* SYMMETRY: <mode> and, where the mode needs it, PERIODIC_COPIES: <n>.
The accepted modes are read from the command database for the row's own
build, never from a list written here. This one is not a
convenience. A periodic sector requires periodic symmetry; treating it as NONE solves a one-bladed rotor without diagnosing the physical error.
`MIRROR` carries three cautions, and the cell enforces
one of them: a nonzero sideslip (a swept or held `BETA` in the flight
condition) under `SYMMETRY: MIRROR` is refused at plan time, naming the
cell, because a mirrored half model is a valid model of the full one
only while the free stream lies in the symmetry plane, and the solver
on FlightStream 26.120 runs such a point at zero sideslip whatever
the script states, saying so only in its log. Sweep
the sideslip on a full geometry with `SYMMETRY: NONE`. The other two
the cell cannot enforce. The mode
describes what you MESHED, so a row declaring it must have staged the
half model; initializing a mirrored solution with the full model
loaded diverges immediately, because the model is then its own mirror
image. Whether the loads are the full model's or the
half's is the row's `SYMMETRY_LOADS` column, emitted as
`SET_ANALYSIS_SYMMETRY_LOADS`; where the row says `-` the run takes the
solver's own default (the setup key is refused), calibrated as ENABLE on a licensed 26.120 and
measured on that one build only.
How a point is named¶
Every export hangs off the point's NAME. The name writes
every variable the row's FLIGHT_CONDITION declares, in the order the cell
declares them, each as a code and a fixed-width integer so a folder of them
sorts:
| Key | Code | Written as |
|---|---|---|
MACH |
M |
Mach × 1000, 3 digits |
TASmps |
V |
m/s × 10, 4 digits |
REmi |
RE |
millions × 100, 3 digits |
ALTFT |
ALT |
ft, 5 digits |
dISA |
DT |
K × 10, 4 digits, signed |
RHOkgm3 |
RHO |
kg/m³ × 10⁴, 5 digits |
MUPas |
MU |
Pa·s × 10⁹, 5 digits |
ASMPS |
A |
m/s × 10, 4 digits |
TK |
T |
K × 10, 4 digits |
PPA |
PS |
Pa, 6 digits |
ALPHA, BETA |
AL, BE |
deg × 10, 4 digits, signed |
ADVANCE_RATIO |
J |
× 100, 4 digits, signed |
RPM |
RPM |
rev/min, 5 digits, signed |
roll_rate, pitch_rate, yaw_rate |
P, Q, R |
deg/s × 10, 4 digits, signed |
A row whose cell reads MACH:0.144, REmi:4.38, ALPHA:0, BETA:0,
ADVANCE_RATIO:sweep names its point at J 0.8 M144RE438AL+000BE+000J+080.
The name ends the run_id, names the datapoint folder DP-<name>, and is
the stem of every file of the point: P<sim>-<name>, so that point's script
in simulation 9001 is P9001-M144RE438AL+000BE+000J+080.txt and its exports
are ..._cp.txt, ..._log.txt and the rest. pyfs-matrix plan and run
name points this way unless --point-name gives another template; the
placeholders are {polar} (P<sim>-<name>), {point} (the name),
{alpha}, {beta}, {mach}, {advance_ratio}, {sim} and {campaign},
and inside an output name {name} is the rendered stem. The run record
carries the name (point_name), the name of its sweep (sweep_name) and
the template that named each point (point_name_template). For older records,
see Upgrading.
Several matrices in one workspace¶
One workspace may hold several matrices, each a study of its own over the
same input library: a tour, a setup study, a time-convergence study. A --matrix
value loses only its final extension (wing.v2.fs is the matrix wing.v2, and a
bare wing.v2 is itself), so a dot inside the name stays in the name. The
rule that keeps them apart is one folder per matrix: plan
writes post/<stem>/plan.json, and the products of that matrix's points
land beside it. runs.json stays the one manifest of the workspace, and
every record in it names the matrix its point came from, so the products
of one matrix are rebuilt from its own records alone. From
Python the same identity is the matrix_stem keyword of sweep_table and
write_campaign_products, and the matrix_stem field of a run record.
run posts as it goes. Each simulation it ran is posted as soon as its last
point of this run is recorded, before the next simulation's points run, and
only that simulation is rebuilt, as post --sims rebuilds it: every other
simulation's product files and products.json entries stay as they were.
the polar files of that simulation, the settings table and products.json are
rewritten each time, so after every polar post/<stem>/ holds every
simulation finished so far. Nothing is posted again when the run ends. A
simulation whose post fails is warned and the run goes on to the next. A
point submitted to a scheduler is posted by collect once its outputs land,
and collect posts only the simulations it collected.
What no two rows of one workspace may share is a POL, in one matrix or in two.
A POL names the simulation folder sims/sim_<POL> and the run ids of the
manifest, so two rows stating one POL would write into one folder and a resume
of either would find the other's points already recorded. Before anything
binds, plan and run read every *.fs in the workspace root and the matrix
being planned, wherever it is, EVERY ROW OF EACH, including rows with RUN = 0,
because a row switched off today is switched on tomorrow and its POL already
names a folder. One message names every repeated POL and every row stating it:
matrix not planned: 2 POL(s) are stated more than once across the matrices of
this workspace, RUN = 0 rows included: POL 1001 in matriz.fs row 1,
matriz_setup.fs row 3; POL 1004 in matriz.fs row 4, matriz.fs row 6. A POL names
the simulation folder sims/sim_<POL> and the run ids of the one manifest,
runs.json, so each POL is stated once in the whole workspace. POL(s) 1001, 1004:
renumber by hand, or run `pyfs-matrix plan matriz.fs --update-ids`, which gives
each repeated row of matriz.fs the next free POL and leaves every other matrix as
it is.
A repeat that sits only between two OTHER matrices is named with its own
remedy in the same message, because --update-ids on the matrix being planned
cannot move it.
pyfs-matrix plan <matrix> --update-ids (also accepted as --updateIDs) rewrites
THAT MATRIX before planning it. A row keeps its POL unless another matrix
already states it or an earlier row of the same file does; each row that must
move takes the next free number above every POL of every matrix, every run in
runs.json and every sims/sim_<id> folder, so a new POL never lands on the
evidence of a study whose matrix has been removed. Only the POL cells change,
each change is printed, and the plan then runs on the rewritten file:
pyfs-matrix plan matriz.fs --update-ids
--update-ids: matriz.fs row 6: POL 1004 -> 2013
Inside one matrix the FIRST row stating a POL keeps it and every later row
moves, including when that POL already has runs in runs.json: a run record
names the POL and not the row, and the first row is taken as the one that ran.
A row whose POL another matrix also states, and which already has runs of
THIS matrix, is refused rather than moved, and nothing is written; renumber the
other matrix instead, or archive the simulation first.
THE RENUMBERING IS WRITTEN BEFORE THE PLAN RUNS, so the receipt the plan writes
is pinned to the file as renumbered. If the plan then refuses for another
reason, the renumbering stays written, and the command says so beside the
refusal. From Python the same step is
pyflightstream.workspace.matrix.renumber_repeated_pols(path, workspace).
The tier-3 workspace of this repository, the verification suite, is the worked example: eleven matrices, one library, one manifest, and POLs no two matrices share.
Worked rows, and where to get the files¶
Every row below is a real row of the verification suite,
rendered to a script on every commit by
python -m tests.tier3_licensed.offline and compared against a committed
golden by the verification suite. They are not
sketches: copy the workspace at the verification suite and these
rows plan as they stand. The geometry they open, 41_TWIN.fsm, is
synthetic, generated by a committed generator, with its provenance recorded
beside it.
The artifacts they name are worth reading in this order:
inputs/references/r006.toml (the lengths, the aliases, one block per
rotor), inputs/setups/s002.toml (how the solver runs) and
inputs/pproc/p005.toml (what gets written down). r004.toml and
p003.toml state the same aircraft in the retired vocabulary, so the
migration can be diffed rather than described.
A rotor named by alias. The row says which rotor turns and how fast; the hub, the axis, the sign, the blade families and the diameter are the reference's, stated once in that rotor's block.
8001 |... | r006 | s002 | p005 |... | unsteady_rotor | GEOMETRY: 41_TWIN.fsm /
SYMMETRY: NONE / DELTA_THETA: 30 / REVOLUTIONS: 0.5 / CLOCK_MOTION: PORT /
MOTIONS: {MOVING_BC_ALIAS: PORT / RPM: 2400} / LAST_REVS_AVG: 1
Two rotors, two speeds, from ONE advance ratio. The ratio is written
once in the flight condition and reaches every motion that states no speed
of its own, resolving against each rotor's own diameter_m.
8002 |... | MACH:0.1, REmi:2.3, ALPHA:0, BETA:0, ADVANCE_RATIO:sweep | 0.6,0.8 |
r006 | s002 | p005 |... | CLOCK_MOTION: PORT /
MOTIONS: {MOVING_BC_ALIAS: PORT}, {MOVING_BC_ALIAS: STARBOARD}
The rendered script for its first point,
goldens/matriz_vocab/P8002-M100RE230AL+000BE+000J+060.txt, emits
SET_MOTION_ROTOR_RPM 1 930.3642 and SET_MOTION_ROTOR_RPM 2 -1860.7283:
twice the speed on the rotor of half the diameter, negative because that
block declares rpm_sign = -1.
One rotor held while the other sweeps, which is how a transition row is written: a motion stating its own speed holds it against the condition's ratio.
8003 |... | ADVANCE_RATIO:sweep | 0.6,0.8 |... |
MOTIONS: {MOVING_BC_ALIAS: PORT}, {MOVING_BC_ALIAS: STARBOARD / RPM: 1800}
Turning the mesh before the run. A ROTATE record cites the ALIAS, and
every frame that alias owns turns with its boundaries; the frame it turned
FROM is kept as <ALIAS>_SMRP_ORIGINAL, and a post-processing entry naming
the turned frame is written in both.
8004 |... | ROTATE: {ANGLE: 3 / AXIS: NACELLE-Y / ALIAS: STARBOARD}
Raw solver commands the row states itself, each before a named phase and through the same emitter checks every curated line passes.
8005 |... | RAW: {COMMAND: SOLVER_SET_ITERATIONS 350 / BEFORE: init}
Labels for the tables, which the run never reads. IDENTIFIERS names
columns for every table the post writes for the row's polar, as
what every product states
lists them. A name and a value are the text written.
8006 |... | IDENTIFIERS: {FLAP:0,TESTE:10}
Nothing of the run reads the key. Stating, changing or removing one leaves the
plan current and the scripts as they were, and launches nothing, whatever else
the row states. A plan records two digests of the matrix: matrix_sha256, of the
file with the key taken out, and matrix_form_sha256, of the file with the key
taken out, the pairs of each row's variables cell spaced one way and no space
ending a row. The plan is current when either one answers, so an edit of those
spaces alone is not seen, and every other edit is. A plan of an earlier release
holds only the first: if some rows of the matrix end in spaces and others do not,
adding the key makes pyfs-matrix run refuse it once, and one pyfs-matrix plan
settles it with nothing run again. The columns reach an already
posted simulation with pyfs-matrix post <matrix> --sims <sim>, whatever its RUN states, or with
--archive or --force-overwrite --yes for every RUN = 1 simulation, with no solver. A post with
no option rebuilds no simulation already posted, and its line names --sims: when nothing is
pending it writes nothing.
A comma ends a pair, so neither a name nor a value holds one. A slash and a colon
stay in a value, since the reader does not split inside the braces. A pipe ends
the cell, so a row holding one in a value has the wrong number of cells and is
refused as any such row is. A value that cannot be read warns and that row states
none, and nothing else of it changes; so does the key written twice in one cell. Text after
the closing brace with no slash is not read and is warned by name. A value holding another
NAME:value after a slash is written as that text and warned, and a variable spelled nearly as
IDENTIFIERS is warned, since it writes no column and the run reads it. An empty value reads NA.
From a filled-in matrix to results, in one call¶
from pyflightstream.run.matrix import run_matrix
records = run_matrix(
"matrix_registry.fs",
workspace,
name="matrix",
default_fs_version="26.120",
recipes={"003": "steady"},
assess=converged,
executor=executor,
recipe_registry={"steady": matrix_recipe},
)
Four arguments carry the study and the rest carry your machine.
recipes maps a LEGACY row's RECIPE code onto the name of a recipe,
recipe_registry maps that name onto the function that builds the
script, assess is what decides whether a finished run converged, and
executor is how a script is actually launched.
A recipe is an ordinary Python function taking the resolved case and an empty script, and emitting into it. It is the only place your study's physics decisions live:
def matrix_recipe(case, script):
helpers.free_stream(script)
helpers.initialize_solver(script)
helpers.solver_settings(
script,
vorticity_drag_boundaries="all",
aoa=case.point.get("alpha", 0.0),
velocity=30.0,
iterations=case.solver.iterations,
convergence=case.solver.convergence,
)
helpers.start_solver(script)
script.emit("EXPORT_SOLVER_ANALYSIS_SPREADSHEET", case.outputs[0])
script.emit("CLOSE_FLIGHTSTREAM")
Note case.solver.iterations. Nothing in the recipe read
inputs/setups/s002.toml: the matrix said SET s002 and the resolved
case arrived carrying 800 iterations and a convergence of 1e-6. The same
holds for case.outputs[0], which is the workspace's rendered output
name for this point, not a literal the recipe chose. A recipe that
writes a literal file name is how two points of one campaign come to
overwrite each other.
What comes back¶
run_matrix returns one record per JOB, and the same rows are on disk
in the workspace's manifest:
matrix/sim_8001/sweep
matrix/sim_8002/sweep
Two rows of a matrix, four points, TWO records, because a
steady row is one job: its points run in one process, one after another.
Every point starts cold, including the first. Set
COLD_START: false to retain the previous warm behavior explicitly; see
geometry units and steady starts.
A run id that ends sweep names a job, and a run id that ends with a
point NAME names a point; the token is the one the per-polar product
tables already use for a swept variable, with the swept field written
<code>+sweep.
Every point is still there and still named. The record lists them in the order the job ran them, with the status each ended in, and the sweep table and the products are one row per point exactly as before:
for entry in record.points_ran:
print(entry["tag"], entry["status"])
A point a recorded job ran is recorded, although no record carries its own
point name: pyfs-matrix plan reports it as already recorded and
run --resume skips it.
Angles added to such a row later run one each on resume, each its own record
ending with its point name, because the row's job id is taken
; the plan
calls exactly those ready. To run the whole row again as one job, name the
job to --force-rerun, which archives it first.
An unsteady row is unchanged: a point that marches in time starts from its own initial state, so it is its own job and its own record.
Each record carries its terminal status, and there is no missing state: a point that did not finish says so rather than being absent.
From the terminal, a matrix's whole study is one command:
pyfs-matrix run workflow_rotor_matrix.fs \
--name rotor --workspace .
No Python is written, no notebook is opened, and nothing sits between
the file and the result. The products land under post/<matrix stem>/ in the
workspace, so a second matrix of the same workspace keeps its own. There is no
campaign table and no --sweep-csv: each polar's TOTAL group file is complete.
Each point keeps its outputs in its own folder, and that is what lets
a swept row be judged point by point. run judges each finished point
with the standard assessor, which reads the loads spreadsheet that point
exported, and finds it by CONTENT rather than by name, because a swept
case names its outputs per point and no single literal could name them
all. Each point collects into sims/<sim>/datapoints/DP-<point>/, so
what the assessor reads is that point's evidence and nothing else.
Running several simulations at once¶
pyfs-matrix run <matrix> --parallel 2 runs two simulations of the matrix at a time
on this machine; --parallel auto lets the package choose from the machine, the
configured licence seats and the free memory. Without the flag the run is serial, or
follows parallel in the setup's [runtime] block. The gain depends on the machine:
on a 20-logical-core laptop two runs gave about 20 percent more throughput and a
third added little. See Setup standards for the memory floor,
the seat count and what happens when a run fails on the licence.
Redoing a point whose row was wrong¶
A point already in the manifest is refused, because re-running a recorded point
would fork the run identity. When the correction to the row does NOT change the
point's name -- a pproc, a geometry, a solver variable, a wall clock -- the
corrected point has the same identity, and --force-rerun is how it is redone:
pyfs-matrix plan <matrix> --workspace .
pyfs-matrix run <matrix> --workspace . \
--force-rerun 'camp/sim_3207/M144RE438AL+000BE+000J+080'
Re-plan first: the plan carries the digests of the matrix it read, and a matrix edited other than in its identifiers or the spaces around its pairs is refused until it is planned again.
It names points, by point name, by full run_id, or by the job id of a swept
row, and the flag repeats. Nothing is deleted: the manifest is copied to
archive/runs-<stamp>.json and each named point's outputs move into that
point's own archive/<stamp>/. A name no recorded point carries is refused, and
recorded points it does not name are skipped rather than refused. It cannot be
combined with --resume, which SKIPS a recorded point instead of redoing it.
Naming one point of a steady row recorded as one job redoes the whole job, and
the run says which points run again.
To redo EVERY recorded point, of the matrix or of some of its simulations, name none of them:
pyfs-matrix run <matrix> --workspace . --force-rerun-all
pyfs-matrix run <matrix> --workspace . --force-rerun-all --sims 2031 2032 2033
Each recorded point is archived as --force-rerun archives it and runs again, a
steady row recorded as one job as one job. Before anything runs, one line says
how many points and jobs will run again, which is the licences the command
spends. --sims takes the simulation ids as the matrix spells them and narrows
the whole run to them, so the other simulations are not touched, their new
points included. Refused beside --resume or --force-rerun, for an id the
matrix does not carry, and when nothing of the selection is recorded.
--force-rerun-all redoes a point whatever its status, one recorded as
SUBMITTED included, which --force-rerun and a plain run still refuse while the
point may be in a queue. It does not cancel the old job, and it does not pause
for you to do so, so deal with the old job before you run the command.
pyflightstream never learns the scheduler's job id: find the job in your
scheduler's list by the name its descriptor gave it (submit.yaml, or your
profile's descriptor name, in the point's folder or the batch folder), and cancel
it if it is still there. A job that no longer appears needs nothing.
A job left alive keeps its licence. A point's own job also writes into the same
point folder as the new run, and collect cannot tell the two apart: what it
writes there is recorded as the new run's. If it is still queued it opens
whatever inputs/ holds when it starts. The run warns, naming the points. The
old records are archived as any other redone point's are.
A point of a batch whose job shows no sign of having ended is redone too, one by
one in its simulation's own folder, since a grouped run does not take this flag.
The warning names the point and the job's label, the <matrix>_b<ID> of the
batch folder. The job keeps writing the batch folder until it ends. Cancelling
it ends every point it holds, so when --sims selects only some of them, add the
others to --sims, or wait for the batch and run pyfs-matrix collect instead;
the warning names the points that would be lost. For a batch whose job has
ended without being collected, what it wrote stays in the batch folder and is
neither collected nor archived. After a redone batch point's job ends, its
simulation's copy stays in the batch folder (disk space only); delete-sims
removes it.
To plan and run ONE simulation, or some of its points, without editing the matrix, select them on both commands:
pyfs-matrix plan <matrix> --workspace . --sims 2031 --points M144RE438AL+040BE+000
pyfs-matrix run <matrix> --workspace . --sims 2031 --points M144RE438AL+040BE+000
--sims takes simulation ids as the matrix spells them, and --points takes
the point names the plan prints, only beside --sims. Only the selection is
planned, staged and run: every other point keeps its record, and the matrix
file is not written. An id or a point the matrix does not carry is refused
before anything runs, naming the ones that exist. A selected point that is
already recorded follows the rules above (refused, --resume,
--force-rerun). Without --force-rerun-all, --sims alone runs those
simulations;
Two simulations of one matrix on two machines or two terminals are two lanes
of one workspace: plan once, then run pyfs-matrix run <matrix> --workspace . --sims 2031
in one terminal and --sims 2032 in the other, at the same time. Each lane writes
its own simulation folder, so the two solvers run side by side; runs.json and
products.json end holding both
simulations, the plan is not rewritten, and the geometry of a row is linked into
each simulation, never copied. No option is needed. Use --sims with distinct
ids in each lane: the same id in two lanes is the same simulation.
A second run of the same matrix without --resume is refused, as before,
with exit status 2 and nothing run; the message says how many
points are recorded and how many would run, and prints the command you typed
with --resume added, ready to paste.
A correction that DOES change the point's name needs none of this. The name
is written by the row's FLIGHT_CONDITION, so correcting a value in that cell
gives the point a new identity: it is simply a new point, and --resume runs it
beside the old record.
Looking at the design of experiments of your matrices¶
pyfs-matrix plot-sweeps --matrices A B --params ADVANCE_RATIO ALPHA elev_RH draws the points
your matrices will run as a pair plot: a scatter of every pair of the parameters asked, the
histogram of each on the diagonal, one colour and marker per matrix with its point count in the
legend. It reads the matrices only; it needs no executable and spends no seat, so it is the quick
way to see whether two studies overlap, leave a gap, or repeat a level.
--matricesnames matrix files of the workspace, with or without.fs, orallfor every matrix the workspace holds at its root or underinputs/matrices/.--paramsnames FLIGHT_CONDITION keys (ALPHA,ADVANCE_RATIO,MACH, ...), scalar VAR_NAMES_VALUES keys (REVOLUTIONS, ...) and ROTATE aliases, where the parameter is the alias and its value the ANGLE. An alias turned about more than one axis across the matrices is namedalias:AXIS, for examplemorph_push:ENGTILT_DN-Y. With no--params, every parameter that varies is drawn. A parameter the matrices do not state is warned and skipped, and the warning lists the parameters they do state; with none left, nothing is written.- Each active row is expanded into its points: the FLIGHT_CONDITION key marked
sweeptakes each SWEEP_VALUES value. A ROTATE alias a row does not state is not turned, so its angle is 0; any other parameter a row does not state leaves that point out of the panels that need it. - ADVANCE_RATIO is read from FLIGHT_CONDITION like any other key. A row that declares none (a power-off row states the spinner speed as RPM in its MOTIONS record) has no ADVANCE_RATIO point, and an RPM inside a MOTIONS record is not a parameter.
- The diagonal draws one bar per level when a parameter has at most 25 levels, else 16 bins; each axis spans the levels with a 6 percent margin.
--name is required: the figure is written to post/visual-inspect/<name>.pdf under the
workspace (a .pdf ending is not doubled; a name with a folder is refused), and its path is printed.
A figure of that name that exists is kept, with a warning, unless --overwrite is given. A point that has finished keeps the small filled
marker; a point that has not is drawn larger, white-faced and on top, the legend names both, and
the terminal prints finished/total per matrix. --finished-by products (the default) calls a
point finished when the polar table of its simulation under post/<matrix>/polars/ holds a row at
its swept values (a row sweeping a key no polar table states, such as PPA or RPM, cannot tell its
points apart: they are drawn not finished, with a warning); --finished-by sims calls it finished when its run record in runs.json ended
CONVERGED, COMPLETED_MAX_ITER, MAX_ITER_REACHED or RAN_MISSING_LOG. With no such folder or file,
every point is not finished.