You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On master built alone (fbddfa9) with amdflang OpenMP offload on an AMD MI210, 10 non-Newtonian regression tests fail with tolerance mismatches. The pattern matches the bug class fixed for Re_size in #1588: a static declare target variable read inside device kernels in another translation unit. Here the variable is any_non_newtonian, which #1588's fix did not cover. The mechanism is a candidate and has not been tested; a discriminating test is proposed below.
This is the pattern #1588 fixed for Re_size. Its root cause there was a cross-translation-unit read of a static declare-target variable inside Riemann-solver kernels, and the upstream reports are ROCm/llvm-project#2890 and llvm/llvm-project#203711. The fix host-captured Re_size into Re_size_loc and passed it firstprivate; it covers Re_size only, and nothing captures any_non_newtonian. If a kernel reads it as .false., every non-Newtonian branch is skipped and the fluid integrates as Newtonian: wrong on GPU, correct on CPU. The per-fluid is_non_newtonian and hb_* arrays are allocatable, which is the kind #1589 does not flag.
Proposed discriminating test
Capture any_non_newtonian into a host-set local and pass it firstprivate in the kernels that read it, exactly as #1588 did for Re_size, then rerun the 10 tests on this platform.
Summary
On
masterbuilt alone (fbddfa9) with amdflang OpenMP offload on an AMD MI210, 10 non-Newtonian regression tests fail with tolerance mismatches. The pattern matches the bug class fixed forRe_sizein #1588: a staticdeclare targetvariable read inside device kernels in another translation unit. Here the variable isany_non_newtonian, which #1588's fix did not cover. The mechanism is a candidate and has not been tested; a discriminating test is proposed below.Failing tests (upstream
masteralone, fbddfa9)B077CE88cons.2, step 50: 6.814e-11 vs golden 1.47e-12 (rel 45)122B0BF3cons.2, step 50: golden 0, reaches 1.80e-09 (band 1e-12)EE8D38CFcons.3, step 50: 5.37996e-09 vs 5.38462e-09 (rel 8.65e-04)BB0CAADBcons.2, step 50: golden 0, reaches 8.61e-11 (band 4.58e-11)E18624FDcons.2, step 50: golden 0, reaches 7.78e-11 (band 4.56e-11)D6794F4Ccons.2, step 50: golden 0, reaches 1.89e-10 (band 1e-10)D749AF0Fcons.3, step 50: 1.00000000013622 vs 1.0 (band 1e-12)00C20EE8cons.3, step 50: golden 0, value #106 reaches 1.15e-03 (band 1e-03)5304E59Fcons.2, step 1: 1.829e-03 vs 5.116e-04 (rel 2.58)A582B270cons.1, step 1: 0.998962 vs 1.0000000 (rel 1.04e-03, band 1e-03)In the same run,
78EB6879(1D -> 1 Fluid(s) -> Non-Newtonian -> nn=1.5) and three chemistry tests passed.Environment
./mfc.sh build -j 16 --gpu mp --no-debug --no-single --mpi, then./mfc.sh test --only <UUIDs>What is established, and what is not
masteralone (fbddfa9) fails these 10 on this GPU and compiler.masteralone.Frontier (AMD)gpu-omp CI lane was green onmasterat dc0aec1, and one non-Newtonian test passes here. Fix silent viscosity loss on AMD flang GPU (host-capture Re_size in the Riemann solvers) #1588 described itsRe_sizefailure as "unreliable and codegen-dependent", with some solver kernels affected and not others.Candidate mechanism (not tested)
any_non_newtonianis a staticdeclare targetscalar (line numbers atmasterec783a8):logical :: any_non_newtonianinsrc/simulation/m_global_parameters.fpp:165, underGPU_DECLARE(create=...)at :172;GPU_UPDATE(device=...)at :864, the conformant sync (see Harden GPU macros against silent map(to:) no-op on declare target statics (AMD path) #1613);src/simulation/m_riemann_state.fpp:859, :888, :898, :908, :1069, :1103, :1114, :1125;src/simulation/m_hb_function.fpp:78;src/simulation/m_viscous.fpp:72, :1155;src/simulation/m_time_steppers.fpp:703.This is the pattern #1588 fixed for
Re_size. Its root cause there was a cross-translation-unit read of a static declare-target variable inside Riemann-solver kernels, and the upstream reports are ROCm/llvm-project#2890 and llvm/llvm-project#203711. The fix host-capturedRe_sizeintoRe_size_locand passed itfirstprivate; it coversRe_sizeonly, and nothing capturesany_non_newtonian. If a kernel reads it as.false., every non-Newtonian branch is skipped and the fluid integrates as Newtonian: wrong on GPU, correct on CPU. The per-fluidis_non_newtonianandhb_*arrays are allocatable, which is the kind #1589 does not flag.Proposed discriminating test
Capture
any_non_newtonianinto a host-set local and pass itfirstprivatein the kernels that read it, exactly as #1588 did forRe_size, then rerun the 10 tests on this platform.is_non_newtonianandhb_*are current on the device where the kernels read them.Related: #1588, #1589, #1613.