The test/ directory contains test runners, suite definitions, test cases,
and checked-in numerical baselines. Generated reports and run artifacts do
not belong here.
test/
├── README.md
├── suites/
│ ├── ci-serial.txt
│ ├── cpu-serial.txt
│ └── grid-serial.txt
├── baselines/
│ ├── README.md
│ ├── build_residual_db.py
│ ├── verify_residual_db.py
│ └── residual-baseline.json
├── test.py
├── cfd/
│ └── <CFD case directories>/
└── grid/
└── <grid case directories>/
- Add reusable suite lists under
test/suites/with stable names. Suite entries are paths relative to the runner's working directory; the canonical CPU CI job stages cases under matching relative paths. - Keep accepted numerical references under each case's
autotest/directory. autotest/compare.txtlists text outputs compared line by line with numeric tolerance. An optionalautotest/binary.txtlists binary outputs compared byte for byte; each reference is stored inautotest/using the output basename. Use byte comparison only for deterministic binary artifacts: compiler, endian, metadata, or serialization differences can make it too strict for portable grid regression. Grid cases should also validate the reloaded grid's dimensions, finite coordinates, bounding box, and topology.- An optional
autotest/required.txtlists outputs that must be created as non-empty files during the current run. The runner removes these outputs before launching the case, preventing stale artifacts from making a failed grid conversion look successful. This is suitable for the first-stage grid conversion smoke test while a reviewed ASCII reference is being prepared. Before launching the solver, the runner also rejects unsafe case-relative paths, duplicate comparison basenames (which would alias one stored reference), and cases with no output assertions. A zero exit code by itself is never a passing test. - Keep structured residual baselines under
test/baselines/; regenerate them only when the accepted numerical result changes. - Write generated logs, results, reports, and temporary files outside
test/. - Maintain project reports under
docs/reports/using stable filenames. - Do not create a new dated report for every regression run. CI run evidence belongs in workflow artifacts; durable conclusions update the stable report.
The regular ci-serial.txt suite covers the established CFD residual
cases and the existing Plot3D grid conversion. Gmsh-to-CGNS conversion is
validated through the shared conversion template
grid/conversion/gmsh_to_cgns, the C++ reader/conversion integration tests,
and the Mesh-to-CFD Validation Workbench. The obsolete GUI-only experimental
manual runner has been removed; the conversion template and its MSH fixtures
remain part of the supported conversion and validation workflow.
The canonical CFD residual baseline contains the five existing OneFLOW CFD
cases under test/cfd/. The CPU-serial workflow also runs a separate
grid-conversion smoke suite (suites/grid-serial.txt) because grid cases
do not produce CFD residual files:
| Case | Coverage | Reference outputs |
|---|---|---|
plateuns2dslau2 |
2-D laminar flat plate, SLAU2, viscous flux and wall boundary handling | aero.dat, res.dat, flatplate_cf.dat, flatplateflow.dat, wallaero.dat |
rae2822_roe_sa |
2-D transonic airfoil, Roe flux and Spalart-Allmaras turbulence | aero.dat, wallaero.dat, res.dat, turbres.dat |
m6wingroe_sa |
3-D wing, Roe flux and Spalart-Allmaras turbulence | aero.dat, wallaero.dat, res.dat, turbres.dat |
plateuns2dslau2_34950_35000 |
continuation flat-plate case from the accepted restart | aero.dat, res.dat, flatplate_cf.dat, flatplateflow.dat, wallaero.dat |
turbplateuns2droe_sa |
turbulent flat plate, Roe flux and turbulence model | aero.dat, wallaero.dat, res.dat, turbres.dat, turbplate_cf.dat, turbplateflow.dat |
The checked-in files under each case's autotest/ directory are the CPU
reference results. Accelerator implementations must first match these results
through the existing numeric comparison tolerance before performance results
are considered.
The top-level test/test.txt was a duplicate of suites/cpu-serial.txt; suite files under suites/ are now the sole case-list source. autotest/compare.txt names the expected text-output comparison manifest explicitly, alongside binary.txt and required.txt.
Run only this baseline suite from the test directory:
python3 test.py \
"mpirun -np 1" \
"/path/to/OneFLOW" \
suites/cpu-serial.txt \
baselines/residual-baseline.json \
1e-15The fifth argument is an optional residual absolute tolerance override. The
canonical database covers all residual channels for every one of the 50 steps.
Iteration columns and row counts must match exactly; strict residual validation
uses abs(actual - reference) <= 1e-15.
ONEFLOW_RESIDUAL_DB and ONEFLOW_RESIDUAL_TOLERANCE provide environment
variable equivalents. Set ONEFLOW_RESIDUAL_TEST_OUTPUT=1 for the strict run;
the solver then writes max-digits10 values to the same res.dat and
turbres.dat paths used by the normal run.
The repository also contains a manual-only Kunshan workflow:
.github/workflows/kunshan-regression.yml
It performs an SSH/Slurm authorization preflight before creating a remote
directory or submitting a job. If the required Kunshan secrets, pinned host
key, private key, or remote configuration are unavailable, the workflow stops
with an explicit error. See ci/kunshan/README.md
for the required secrets and private cluster configuration.
The backend framework defaults to CPU and does not redirect numerical
operators yet. Runtime selection can be requested with
ONEFLOW_ACCEL_BACKEND; requesting an adapter that has not been built fails
with a clear error rather than silently falling back to CPU. The CMake cache
also accepts HIP, CUDA, and KOKKOS as reserved backend names so future
adapters can be added without changing the solver-facing interface.
The maintained delivery report is:
docs/reports/delivery/oneflow-gpu-backend-delivery.md
The Contract Workbench contains a typed Case-domain description for
cfd/plateuns2dslau2 at
tools/verification/contracts/case/laminar_flat_plate_slau2.json.
It links the existing suite, solver inputs, output comparison manifest,
canonical residual database, and Blasius reference profiles without replacing
the suite or runner.
The catalog performs static consistency checks only. A catalog PASS means
that declared references and metadata are structurally consistent; it does
not mean the CFD case has just been executed. The regression runner remains
the authority for execution and numerical comparison. The Blasius files are
retained scientific references but are not currently compared automatically
by test.py; the contract records this limitation explicitly.