Skip to content

BUG: Fix OOC Review Findings - #1764

Draft
jmarquisbq wants to merge 81 commits into
BlueQuartzSoftware:developfrom
jmarquisbq:fix/ooc-review-findings
Draft

jmarquisbq wants to merge 81 commits into
BlueQuartzSoftware:developfrom
jmarquisbq:fix/ooc-review-findings

Conversation

@jmarquisbq

@jmarquisbq jmarquisbq commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Correct storage contracts and error reporting used by out-of-core (OOC) pipelines, reduce repeated small mesh and image transfers, and add regression coverage for resident and disk-backed execution. Also correct periodic feature centroids, KMeans count validation, and numeric growth initialization. 189 files changed, +28,581 / −1,452 lines.

Coordinated companion PRs:

Storage and pipeline contracts

  • Add an optional bounded extent-read interface with explicit scratch accounting and distinct success, unavailable, and failure results. Validate HDF5 selections before transfer and support caller-owned chunk-shape scratch.
  • Preserve numeric growth initialization through copies and storage conversions, including explicit nonzero initialization and the existing diagnostic-fill policy.
  • Propagate checked flush and finalization failures through arrays, NeighborLists, data structures, pipelines, recovery writes, and nxrunner, instead of reporting successful completion after a storage failure.
  • Plan selected imports against the complete destination structure and validate references and storage choices before publishing imported objects.
  • Preserve array-location restrictions when parameters are cloned, accept stores that meet those restrictions, and prevent later parallel-algorithm checks from re-enabling work already restricted to serial execution.
  • Validate the two large-data thresholds and retain correction warnings for application and command-line consumers.

Filter correctness and OOC performance

  • Default KMeans to one cluster and reject zero consistently in Direct and Scanline execution. Keep the separate sampling-policy issue outside this change.
  • Compute periodic feature centroids from the arithmetic mean of unwrapped cell centers, with bounded occupancy scans and a defined fallback when the seam is ambiguous. Update the filter documentation and V&V records.
  • Batch Identify Sample YZ transfers and the OOC paths for triangle normals, dihedral angles, face IPF colors, feature-face misorientation, shared feature faces, winding repair, and Laplacian smoothing. Verify Triangle Winding also batches its feature-volume and final-reversal stages.
  • Reject invalid triangle vertex IDs before buffered coordinate access. Admit new mesh working buffers through the shared budget, honor partial grants, and use bounded coordinate access when a complete cache does not fit.
  • Use temporary coordinate storage for low-memory OOC smoothing. Calculation failures preserve the original coordinates; final output-write failures can leave a completed prefix. Keep the default in-memory smoothing algorithm unchanged.
  • Check Avizo source reads, output writes, flushes, closes, and size arithmetic. This does not change its sample-coordinate convention or binary coordinate separators.

Regression coverage and portability

  • Add independently calculated centroid, triangle, smoothing, image, and complete writer-output expectations. Cover block boundaries, short transfers, cancellation, and injected failures.
  • Verify selected algorithm paths and actual store types. Keep concrete HDF5 tests in the companion backend rather than treating an OOC algorithm flag as proof of disk-backed execution.
  • Make floating-array comparisons reject mismatched NaNs. Isolate test and benchmark preferences, check cleanup, and keep the network-dependent citation check out of ordinary CTest runs.
  • Admit the reviewed GCC and Apple standard-library configurations for bounded reads. Replacing those version checks remains a separate design task.

Test plan

  • Full Windows in-memory Release, OOC Release, and OOC Debug builds passed for the final mesh fixes. The relevant mesh selections passed 32/32 in-memory and 63/63 in each OOC configuration.
  • Additional connectivity, writer-coherence, preferences, and controller selections passed 17/17 in-memory and 38/38 in each OOC configuration.
  • Independent triangle and smoothing expectations, actual HDF5 store checks, and failure/cancellation tests passed. Targeted before/after cases demonstrated that the regressions detect the repaired defects.
  • The controlled smoothing benchmark passed correctness and cleanup checks: fitting-cache median 0.354 s versus 0.373 s before; constrained 64 KiB median 0.401 s versus 0.370 s before. These small, cached-file measurements are not whole-pipeline estimates.
  • Required formatting checks passed. Scoped production clang-tidy checks passed for the final fixes; test-file framework/style diagnostics remain documented and are not a clean full-project static-analysis result.
  • Resolve and confirm final Windows, Linux, and macOS CI, including the coordinated OOC builds. At the October 19 status check, Ubuntu Clang 16 reported a failure, formatting passed, and the other public build jobs were still running.

Laplacian smoothing still has approximately 32 bytes per vertex of older resident working arrays. The new buffers are bounded, but the whole algorithm is not yet bounded by the OOC working allowance. The broader all-filter OOC coverage audit remains a follow-up.

Related Issue

Related to #1532 — expands filter and failure-path coverage; does not complete the coverage inventory.

Related to #481 — adds import, geometry-reference, and persistence tests; does not complete all HDF5 coverage.

Related to #1756 — cluster-count validation is fixed; the initial-sampling hang remains deferred.

Related to #1768 — includes compatibility repairs; replacement of library-version gates remains deferred.

Related to #1835 — bounds the newer mesh buffers; the remaining 32 bytes per vertex is separate work.

Keep parallel execution disabled after an earlier storage requirement or
explicit disable. Preserve the explicit enable call as the reset point.

Add regression cases for both helpers, mixed calls, empty/null inputs,
and the multicore enable/reset behavior.

Signed-off-by: Jessica Marquis <[email protected]>
Retain storage location when cloning an array parameter and accept
explicit matching in-memory and out-of-core stores. Keep metadata-only
and string-array behavior unchanged, with readable mismatch diagnostics.

Add the location and clone regression matrix.

Signed-off-by: Jessica Marquis <[email protected]>
Use one cluster by default and reject explicit zero during preflight and
both algorithm entry points before output changes or data access.

Update parameter help and contracts, and add literal one-cluster and
unchanged-output regressions for the direct and scanline paths.

Signed-off-by: Jessica Marquis <[email protected]>
Add const checked flush methods for numeric stores, list stores, data objects,
and data structures while retaining the existing void APIs. Forward each
object once and retain ordered warnings, backend error codes, object IDs,
and every object path. Classify allocation failures as -272 and preserve
invalid results that have no error diagnostic.

Add regression coverage for legacy adapters, missing stores, shared stores,
multiple parents, exceptions, diagnostic ordering, and later-object visits.

Signed-off-by: Jessica Marquis <[email protected]>
Use checked flushes at filter completion and retain original diagnostics.
Prepare snapshots before replacing prior results, report final snapshot
failures, and preserve completion failure during cancellation and retry.
Carry warnings through the HDF5 writer chain and expose root errors to
CLI observers. Add focused pipeline and command-line regression cases.

Signed-off-by: Jessica Marquis <[email protected]>
* Add a nonallocating chunk-shape entry point with explicit output and
  suffix storage so callers can include policy scratch in their budget.
* Keep the existing vector API on the same arithmetic and cover both
  policies, literal shapes, and rejected span boundaries.

Signed-off-by: Jessica Marquis <[email protected]>
* Reject invalid ranks, bounds, products, and input spans before selecting
  or writing a dataset region, preserving existing values on rejection.
* Keep empty simple selections, surplus input prefixes, primitive
  conversions, and valid unlinked-open dataset writes supported.
* Guard local dataspaces and report file, dataset, selection, and native
  failure details outside the HDF5 API lock.
* Cover all exported primitive types, boundary and native-write errors,
  and real sparse metadata that reaches both arithmetic overflow guards.

Validation: paired Release simplnx_test builds; 18 focused cases and
3 additional lock controls in each configuration. The final stronger
arithmetic assertions also pass in both builds.

Signed-off-by: Jessica Marquis <[email protected]>
Read policy-neutral cached metadata, stage the complete selection, and
resolve destination storage before loading selected values. Preserve
per-path copies for multi-parent sources and use checked identifiers and
exact-object cleanup when publication fails.

Add cache, filter, legacy, finalizer, identifier, and rollback regressions.
Full paired consumer builds passed, with 98 in-memory cases and 432 OOC
cases across the coordinated import and storage verification.

Signed-off-by: Jessica Marquis <[email protected]>
Report failed writes, flushes, and closes before publishing an Avizo
export. Close the output stream on failed reads and exceptions, while
preserving earlier errors and warnings and the existing file format.

Cover both real filter wrappers and injected output failures, including
destination preservation and one consuming close on each exit path.

Signed-off-by: Jessica Marquis <[email protected]>
* Validate caller-owned extents and native chunk metadata before reading.
* Bound codec buffers, decoder state and diagnostics under one allowance
  while preserving the existing reader and compressed-stream behavior.
* Coalesce contiguous source/output copies and cover bounds, failures,
  sparse data, physical component splits and payload ownership.

Signed-off-by: Jessica Marquis <[email protected]>
* Reject invalid threshold values before changing preferences and repair
  only invalid saved fields with their original value and default context.
* Retain correction batches for one startup consumer. Preserve exact JSON
  values and key presence in shared, algorithm and benchmark scopes.
* Report CLI corrections before overrides and preflight, with owned-profile
  checks for malformed values, zero, maximum values and normal saving.

Signed-off-by: Jessica Marquis <[email protected]>
* Reuse XY transfers across up to eight YZ slices within the admitted
  extra memory, with a one-slice fallback when no extra memory is free.
* Preserve completed slices and ordered error details on cancellation
  or failure, and reject invalid slice sizes before allocation.
* Add focused output, ownership, failure, and opt-in timing checks.

Signed-off-by: Jessica Marquis <[email protected]>
Preserve the existing no-op callback while fixing the unsupported
implicit conversion from a lambda reported by Clang.

Signed-off-by: Jessica Marquis <[email protected]>
Rename the write callback parameter while retaining its signature,
values, and overflow assertions. This fixes Clang shadow-all builds.

Signed-off-by: Jessica Marquis <[email protected]>
Use the factories' concrete DataStructure return type in templated
helpers, so member template calls do not depend on auto deduction.
Keep test data, scenarios, assertions, and benchmark settings unchanged.

Signed-off-by: Jessica Marquis <[email protected]>
Check the generated stream and compare all records through matching
EOF, retaining the two intentional metadata exclusions. Normalize only
CRLF terminators and test missing, extra and changed records beyond
1,024 with LF/CRLF and malformed-tail controls.

Validated with paired Release target builds and focused CTest selections.

Signed-off-by: Jessica Marquis <[email protected]>
* Check complete five-feature lists with literal 5/NaN/10 expectations.
* Verify resident and genuine HDF5 numeric/list backing stores.
* Preserve all input lists and require the average output to be absent
  regardless of object type.

Validated with paired Release builds, ten focused resident regressions
per configuration and the OOC contract group.

Signed-off-by: Jessica Marquis <[email protected]>
* Check complete five-feature lists with literal 5/NaN/10 expectations.
* Verify resident and genuine HDF5 numeric/list backing stores.
* Preserve all input lists and require the average output to be absent
  regardless of object type.

Validated with paired Release builds, ten focused resident regressions
per configuration and the OOC contract group.

Signed-off-by: Jessica Marquis <[email protected]>
Check both ID forms through reads, writes, failures and cancellation.
Verify exact submitted and stored connectivity, transfer order, and
unchanged inputs for the ordinary buffered utility.

Validated with paired Release builds and 14 resident / 22 OOC
selected CTest entries.

Signed-off-by: Jessica Marquis <[email protected]>
Exercise the actual geometry utility with four literal face normals.
Check the float arithmetic contract, preserved geometry and pre-cancel
sentinels across the resident algorithm scenarios.

Validated with paired Release builds and 14 resident / 22 OOC
selected CTest entries.

Signed-off-by: Jessica Marquis <[email protected]>
Check full-block and distinct tail values using an independent normal
oracle. Cover exact failed reads and writes, completed prefixes,
cancellation, and accepted empty geometry without changing the filter.

Paired Release target builds and six resident / seven OOC CTest entries
passed, including the existing STL and conversion controls.

Signed-off-by: Jessica Marquis <[email protected]>
Check full blocks and a distinct tail against literal acute, obtuse,
collinear and repeated-vertex results. Verify exact failed transfers,
completed prefixes, cancellation and accepted empty geometry.

Paired Release target builds and six resident / seven OOC CTest entries
passed, including the existing correctness and conversion controls.

Signed-off-by: Jessica Marquis <[email protected]>
Run the existing Rodrigues ordering case with named resident algorithm
scenarios and target-only dispatch checks. Check all four input and both
output stores while preserving both input orders and the independent
45-degree quaternion oracle.

Paired Release OrientationAnalysisUnitTest builds and the selected
ordering case passed in both configurations.

Signed-off-by: Jessica Marquis <[email protected]>
Add a tiny resident scenario test and shared independent file oracle.
Check signed components, float scalars, all header fields and values,
matching EOF, unchanged inputs and geometry. Retain binary and
cancellation coverage.

Paired Release target builds and three resident / four OOC selected
CTest entries passed.

Signed-off-by: Jessica Marquis <[email protected]>
Add a registered metadata-only input and test the exact -79047 error.
Use a narrow test guard that restores original storage-manager pointers
and capabilities after normal exit and a controlled exception. Preserve
input metadata and require no output object.

Paired Release target builds and the combined four resident / six OOC
preflight controls passed. The fixtures contain metadata, not disk data.

Signed-off-by: Jessica Marquis <[email protected]>
Reuse the scoped registry guard for the plain watershed -79048 branch.
Check exact error context, unchanged input metadata, absent output and
complete manager restoration; retain the provider-present controls.

Paired Release target builds and the combined four resident / six OOC
preflight controls passed. The fixtures contain metadata, not disk data.

Signed-off-by: Jessica Marquis <[email protected]>
Check complete unit-spacing area/volume and optional sphericity outputs
for isolated and paired cells through both resident algorithm scenarios.
Preserve existing archive controls and verify inputs and storage.

Signed-off-by: Jessica Marquis <[email protected]>
Apply the storage scenario before archive import and check the contour
input, final vertices, faces and normals. Preserve all archived values.

Signed-off-by: Jessica Marquis <[email protected]>
Check complete tetrahedron winding for both accepted ID forms. Preserve
existing normal values and identity, or require no normal object to be
created when none exists. Verify all vertices, IDs and resident stores.

Signed-off-by: Jessica Marquis <[email protected]>
Check NaN positions and component counts without changing the explicit
skip-NaN option or tolerance policy. Keep bounded reads and input precision.
Add real-array regression checks for mismatches, transfer failures,
partial batches, warnings and complete source preservation.

Signed-off-by: Jessica Marquis <[email protected]>
Point the analytical V&V inventory to its current test source and names.
Separate its 31 registrations from the broader filter suite and preserve
the dated sign-off and unresolved historical revision. Record the fresh
31/31 Windows checks in both builds with their resident-data scope.

Signed-off-by: Jessica Marquis <[email protected]>
Remove the capture/upload steps and helper from temporary commit 3d7d593
after the native library compatibility review. Restore the exact prior
workflow content without changing either build matrix or the general CI
fixes. Parsed YAML and blob comparisons verify the scoped restoration.

Signed-off-by: Jessica Marquis <[email protected]>
* Add atomic all-or-nothing admission against working-memory quota and
  registered cache headroom, retaining existing reservation behavior.
* Cover exact limits, contention, pending release, budget reduction,
  and token lifetime without invoking eviction callbacks.

Signed-off-by: Jessica Marquis <[email protected]>
Use the unique largest empty gap to unwrap occupied cell coordinates,
then average all cells with their actual populations. Keep the ordinary
mean when the gap is tied or the axis is fully occupied.

Bound occupancy storage with working-memory reservations and sequential
batches. Propagate warnings and I/O errors, and check cancellation before
output.
Add independent numerical oracles, small-grant and overflow checks,
failure regressions, and an actual HDF5-store witness. Update the filter
description while preserving the historical verification record.

Signed-off-by: Jessica Marquis <[email protected]>
Read faces, IDs, and vertex coordinates through reserved bulk buffers.
Keep float32 operations and feature addition order unchanged. Write each
changed face block once with complete tuples and retain the resident path.

Add resident equivalence, disabled-normal, and float32-order regressions.
Paired Windows Release and OOC Debug winding tests pass, including the
companion full-filter HDF5 tests in SimplnxOoc.

Signed-off-by: Jessica Marquis <[email protected]>
Check each triangle vertex before computing a coordinate offset. Return
the face number, invalid index, and valid vertex count when input is bad.
Keep valid normal and angle calculations unchanged.

Add regression cases for each corner, first and later faces, the vertex
count boundary, and the largest index. Verify errors retain the input
and leave the failing output block unpublished.

Signed-off-by: Jessica Marquis <[email protected]>
Keep coordinate caches only when their buffers fit the working allowance.
Otherwise gather coordinates in bounded blocks. Plan useful requests and
size buffers from the actual grant to limit unnecessary cache eviction.

Use temporary XYZ records for low-memory smoothing. Keep calculation
order and completed-pass cancellation behavior. Release compute buffers
before an imported array makes its writable copy during publication.

Keep the resident smoothing path and its older working arrays unchanged.

Signed-off-by: Jessica Marquis <[email protected]>
* Use fixed uint64 arrays for both centroid memory-budget loops so Linux
  GCC and Clang do not infer conflicting unsigned integer types.
* Keep all five budgets and the existing numerical assertions unchanged.

Validation: full Windows in-memory and OOC Release builds; eight centroid
cases in each configuration; two real HDF5 cases with 402 assertions;
before/after compiler probes, clang-format 19.1.1, and scoped clang-tidy.
Native Linux builds remain for CI after publication.

Signed-off-by: Jessica Marquis <[email protected]>
Correct the same output-type assumption in the companion resident test. Preserve its Direct and Scanline scenarios and all numerical, ID, seed, and tuple assertions.

Validated with full Windows in-memory and OOC Release builds, the focused tests, and the selected KMeans/Abaqus regressions. Production behavior is unchanged.

Signed-off-by: Jessica Marquis <[email protected]>
* Give each 65,537-cell scan a complete unit-spaced row with constant Y.
* Keep independent coordinate checks at the transfer and scan boundaries,
  while preserving the distinct tail values in all other data columns.
* Keep reader validation and production behavior unchanged.

Validation: full Windows in-memory and OOC Release builds; 20 in-memory
and 21 OOC H5Oina cases; the formerly failing hidden batch-tail case;
clang-format 19.1.1 and configured changed-line clang-tidy.

Signed-off-by: Jessica Marquis <[email protected]>
@jmarquisbq
jmarquisbq force-pushed the fix/ooc-review-findings branch from 543cb50 to b16b292 Compare October 20, 2026 18:24
* Enable /bigobj for simplnx_test on MSVC to avoid the Debug
  object section limit.
* Remove three unused headers from the surface-area tests.

Signed-off-by: Jessica Marquis <[email protected]>
Describe admitted coordinate caches and bounded gathers. Complete the parameter and result tags for gather, planning, and smoothing publication helpers. These changes do not change executable code.

Signed-off-by: Jessica Marquis <[email protected]>
Admit lookup and face buffers together. Cache complete tables only when
the shared working budget allows it; otherwise gather complete tuples
through bounded pages. Reuse the IPF orientation helpers across blocks.

Keep the in-memory calculations and prior phase validation unchanged.
Add resident tests for the working-memory contract. Paired HDF5 tests
cover literal colors and angles, sparse lookups, failures, and cancellation.

Signed-off-by: Jessica Marquis <[email protected]>
Replace full resident output copies with one admitted labels/counts block.
Calculate disjoint resident rows in parallel with read-only map lookups,
then write each block serially. Release earlier transfer buffers first.

Preserve uncomputed rows on cancellation, existing ID randomization,
store diagnostics, and partial-write behavior. Add hand-counted coverage
for feature-face IDs, label pairs, counts, and the reserved zero row.

Signed-off-by: Jessica Marquis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Out-of-Core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants