Repository navigation
Skip GhiaEulerAvx2Test without AVX2, and let a failed release be retried - #245
Merged
Merged
Conversation
The v0.4.0 release run failed in Physics Validation: that job builds with default options, AVX2 off, and GhiaEulerAvx2Test asserted success where explicit_euler_optimized now refuses init with CFD_ERROR_UNSUPPORTED (#215; before it, the solver ran scalar loops and the test passed). The harness already flags that as solver_unavailable and GhiaProjectionAvx2Test ignores it; the Euler test was missed. Every other validation test using an optional backend already skips it. Re-running the failed release run rebuilds the same commit, and this fix does not touch VERSION, so the release workflow gains workflow_dispatch. check-version now runs only on master or main, and every other job needs it, so a dispatch from another branch cannot tag that branch's commit.
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The new skip can incorrectly hide solver registration or allocation failures.
Review effort: Balanced
Findings: 1
What changed in this PR
Adds safe release retries and skips unavailable AVX2 Euler validation.
Changes:
- Skips Ghia Euler AVX2 validation when unsupported.
- Enables manual release workflow dispatch on protected branches.
| File | Description |
|---|---|
tests/validation/test_ghia_euler_avx2.c |
Handles unavailable AVX2 solver. |
.github/workflows/version-release.yml |
Adds guarded manual release retries. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
… NULL Addresses Copilot's review of PR #245. Both creation sites in the shared cavity harness set solver_unavailable whenever cfd_solver_create() returned NULL, which also covers an unregistered name (CFD_ERROR_NOT_FOUND) and an allocation failure (CFD_ERROR_NOMEM); every Ghia and cavity test that skips on that flag would have passed such a failure as a skip. The harness now creates with cfd_solver_create_checked(), which reports a backend this build lacks as CFD_ERROR_UNSUPPORTED before the name lookup, and sets the flag only for that status. Pre-existing in the harness; the PR's new Euler skip made it reachable from one more test. Checked on a default build (AVX2 off): all 13 Ghia and cavity tests pass, both AVX2 ones skipping. On a build without OpenMP the two OMP Ghia tests still skip, now through UNSUPPORTED rather than NOT_FOUND. A misspelled solver name in the Euler AVX2 test fails ("not created: Resource not found"), where before it was skipped. Deferred to the follow-up PR with the examples: the standalone validation tests that build their own solvers (test_solver_architecture, test_taylor_green_decay, test_natural_convection, test_backward_facing_step, test_quiescent_3d and taylor_green_reference.h) treat a NULL from cfd_solver_create() the same way.
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The changes correctly address the recorded release failure while retaining safeguards against invalid solver failures and duplicate releases.
Review effort: Balanced
Findings: None
Resolved since last review (1)
shaia
added a commit
that referenced
this pull request
Nov 18, 2026
…ure (#246) * Make the examples report solver failures and exit nonzero Six examples discarded solver_init, solver_step and run_simulation_step statuses, so a solver that stopped working still printed results and exited 0, and the release gate's example run could not see it. Each now checks every status, skips a solver whose backend the build or machine lacks, and exits 1 on anything else. solver_selection checks cfd_backend_is_available() before switching to the AVX2 solver: simulation_set_solver_by_name() reports success even when the new solver's init fails, so the failure would only show at the first step. It also creates the directory for its direct-API VTK file, which it wrote into a missing output/ while printing "Output written to". runtime_comparison is rebuilt on create_sim() and time_solver(), which separate a missing backend from a failure; it used to step NULL simulations and divide by zero timings, and now prints n/a. Checked on a default build (AVX2 off) and one without OpenMP: all six exit 0, and with a negative dt injected minimal_example, runtime_comparison and solver_selection exit 1 with the failing step named. * Skip a validation solver only when its backend is missing Several harnesses treated any NULL from cfd_solver_create() as "not available" and skipped, which also hid an unregistered name or an allocation failure (test_solver_architecture, test_taylor_green_decay, test_natural_convection, test_ghia_projection_gpu, and the Taylor-Green backend consistency test, which skipped on any failure at all), while BackwardFacingStepRe400Test failed instead of skipping on a build without OpenMP, where the _omp solvers are not registered and creation reports CFD_ERROR_NOT_FOUND. tests/validation/solver_availability.h creates solvers with cfd_solver_create_checked(), which reports a missing backend as CFD_ERROR_UNSUPPORTED before the name lookup, and marks only that status unavailable. Every harness that may be handed an optional backend uses it, including the two cavity-harness sites #245 fixed inline. tg_run_simulation() also stops ignoring solver_init() and solver_step() statuses. Exempt: poiseuille_3d_reference.h, taylor_green_3d_reference.h, test_poiseuille_flow, test_turbulent_channel and the cavity harness's scalar-only site only ever create the scalar projection, and a NULL there already fails. Checked on a default build and on one without OpenMP: the 20 and 21 affected validation tests pass, BackwardFacingStepRe400Test now skips without OpenMP, and a misspelled solver in the Taylor-Green consistency test fails ("not created: Resource not found") where it used to print SKIPPED. * Report a failure with its own message, not the library's last one failure_reason() printed cfd_get_last_error() whenever a message was stored, so a failure that set none was reported with an earlier, unrelated message, such as a backend skipped further up the run. It now uses the stored message only when cfd_get_last_status() matches the status being reported. Found by /code-review on this branch in solver_selection; the same helper in performance_comparison (from #244) gets the same fix. * Clear the error state before creating a validation solver Review finding (#246): cfd_solver_create() reports a factory's NULL as CFD_ERROR_NOMEM only while the last status is still CFD_SUCCESS, and that status is sticky. An UNSUPPORTED left over from an earlier solver made a later allocation failure read as unavailable, so validation_create_solver() skipped exactly the failure it exists to expose. * Skip an example solver only when its backend is refused Review findings (#246): runtime_comparison and solver_selection read "not in the registry" as "backend unavailable", so a misspelled or removed solver printed n/a or SKIPPED and the example still exited 0. solver_selection also ignored a failed registry allocation, after which every solver read as skipped and the run reported zero failures. Both now probe with cfd_solver_create_checked(), which refuses an unavailable backend with CFD_ERROR_UNSUPPORTED before the name lookup, and skip only that status; any other creation failure, an unknown name included, is a failure. A NULL registry in solver_selection is reported and counted as one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
The v0.4.0 release run (37190077878) failed in Physics Validation (Ghia Tests), so no tag or GitHub Release was created. This PR fixes the test that failed, and adds a way to retry a release that failed before tagging.
1.
GhiaEulerAvx2Testskips when AVX2 is not compiled inPhysics Validation builds with default options, where
CFD_ENABLE_AVX2is OFF. Since #215,explicit_euler_optimizedrefuses init withCFD_ERROR_UNSUPPORTEDon such a build; before #215 it silently ran scalar loops and the test passed. The shared harness already setssolver_unavailablefor that refusal, andGhiaProjectionAvx2Testignores the test when it is set. The Euler test was missed, and it assertedresult.success:It now uses the same three-line
TEST_IGNORE_MESSAGEas its projection sibling. Every other validation test that uses an optional backend already skips one that is missing (20/21 passed in the failed run). No other CI job runs thevalidationlabel with AVX2 off, which is why this surfaced only at release.2.
version-release.ymlgainsworkflow_dispatchRe-running the failed run would rebuild the same commit, and this fix does not touch
VERSION, so nothing would re-trigger the release. With this change, after merge, rungh workflow run version-release.yml --ref master.check-versionruns only onrefs/heads/masterorrefs/heads/main. Every other job needs it, so a dispatch from another branch skips the whole workflow instead of tagging that branch's commit.Testing
test_ghia_euler_avx2FAILs with the message above, exit 1.IGNORE: AVX2 Euler solver not available (SIMD not enabled), exit 0, andctest -R GhiaEulerAvx2Testpasses.pushandworkflow_dispatch, and thecheck-versionguard is in place.ctest -LE "cross-arch|validation"passed 101/101 (Debug)./pr-ready: passed, including/code-review mediumwith no findings.After merge
Dispatch the release on master.
v0.4.0will then tag the merge commit of this PR, which includes the release commit (#244).🤖 Generated with Claude Code