Repository navigation
Conversation
…nal (lanl#1217) Run with every model forced through the MIR JIT (BNGSIM_CODEGEN_JIT=mir BNGSIM_CODEGEN_THRESHOLD=1), 53 tests fail on main with lanl#1348's codegen fix in. 39 test the cc backend's own artifact or name. 12 more fail under a forced threshold alone, because they need a small model to run interpreted. Each now carries a skipif from _codegen_backend.py, with a reason conftest declares. Three expose engine-dependent answers, filed separately. They get strict xfails under a lowered threshold, not skips.
…kip it under a forced threshold (lanl#1217)
This branch has not been deployed
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.
Closes #1217 (with #1348, which fixes its #1212 group).
What was wrong
Running the whole suite with every model forced through the MIR JIT (
BNGSIM_CODEGEN_JIT=mir BNGSIM_CODEGEN_THRESHOLD=1) is the check that found #1208 and #1212. It is only a signal if it passes. On main 9a26f5b with #1348 merged in, 53 tests fail under it. That matches #1217's accounting once #1212's 38 are gone:.so, its cache key, the redirected cache dir, or the output-sensitivity and sens-RHS notes written beside it. The JIT compiles in process and writes none of them.codegen_backend == "cc", and the JIT reports"mir"exprtk,analytical, no.so, the interpreter's RHS counters), andTHRESHOLD=1compiles it. They fail under forced cc too.The 32 artifact tests are in
test_output_sens_support_note.py(22),test_sens_rhs_decline_note.py(5),test_hpc_contract.py(2), and one each intest_codegen_cache_key.py,test_ar_species_output_sensitivities.pyandtest_sens_numerically_zero_base.py. The 7 cc-by-name tests are intest_engine_choice_accessors.py(4),test_tfun_analytical_jacobian.py(2) andtest_lu_fill_routing.py(1). The 13 threshold tests are intest_engine_choice_accessors.py(3),test_rhs_obs_func_gate.py(3),test_steady_state_polish_jacobian.py(3),test_jacobian_discontinuous_fallback.py,test_lazy_jacobian.py,test_model_codegen_sensitivity.py, andtest_steady_state_scaled_criterion.py's MODEL1712050008 retry test. That last one pins the arm64 interpreter's route (solver_jacobian_retried); compiled, the march reaches the same root, within 1.6e-6, without a retry.The change
python/tests/_codegen_backend.py. A new helper, imported the way_fd_sens.pyand_ci_workflow.pyare. It provides threeskipifs and onexfail:under_jit_no_cc_artifactandunder_jit_engine_nameread the JIT selection throughbngsim._codegen._codegen_jit_backend(), the library's own reading ofBNGSIM_CODEGEN_JIT.threshold_forcedapplies whenBNGSIM_CODEGEN_THRESHOLDis set below the default of 256.xfail_when_threshold_forced(issue, why)is a strict xfail under the same condition.Each skip reason is declared in
conftest.py's_DECLARED_SKIPS(tierANYWHERE), soBNGSIM_SKIP_AUDIT=strictaccepts them.The two engine-dependent tests are not skipped. A forced run shows each gives a different answer on the compiled path. Both findings are filed, as #1357 and #1358. Each test carries a strict xfail under a lowered threshold, naming its issue, so the mark has to go when the fix lands:
steady_state(method="integration")on the compiled RHS refusesglioblastoma_egfrviii_seed.net's steady state at residual 2.1e-39, withcontinued_run_distance = inf, because its run test is never retried on difference quotients. That affectstest_a_march_whose_integrator_fails_returns_the_state_it_passed[integration]. Fixed in steady state: take a run test the closed form cannot take once more on differences (#1357) #1370.get_param(get_param on an assignment-rule parameter after a compiled run returns its load-time value, not the rule's #1358). After a compiled run,get_paramon a parameter an assignment rule sets returns its load-time value:qreads 1.0, where an interpreted run reads the rule's end-of-run 0.0183. The trajectory is unaffected. This istest_a_write_after_a_run_does_not_move_it_to_the_rules_current_value, whose precondition reads the slot.Verified
On this branch with #1348 merged in, macOS arm64 MIR build,
--max-worker-restart=500,BNGSIM_SKIP_AUDIT=strict:BNGSIM_CODEGEN_JIT=mir BNGSIM_CODEGEN_THRESHOLD=1BNGSIM_CODEGEN_THRESHOLD=1(forced cc)The suite's existing xfail is the 1 in each count; the forced runs added three. That was measured when MODEL1712050008's retry test still carried an xfail. It is now a forced-threshold skip, so a forced run reports 3 xfailed and one more skip. Rerun after that change,
test_steady_state_scaled_criterion.pyunderBNGSIM_CODEGEN_THRESHOLD=1with the strict audit gives 222 passed, 3 skipped and 1 xfailed (glioblastoma, #1357), and 224 passed by default. The strict audit accepts every new skip.Negative control: with the artifact reason removed from
_DECLARED_SKIPS, the strict audit reports1 undeclared skip reason(s).Not in this PR
mir.ymlalready makes: