Skip to content

Non-determinism in examples, traced back to initial implicit residual in ImplicitEquationJacobian #2228

Open
@charleskawczynski

Description

@charleskawczynski

Found (by luck) in #2225. I've since initialized the data to zeros, to help improve CI determinism, but if after

    ∂Yₜ∂Y = FieldMatrix(...)

we do

    fill!(parent(∂Yₜ∂Y[ᶜρ_name, ᶠ𝕄_name]), NaN)
    fill!(parent(∂Yₜ∂Y[ᶜ𝔼_name, ᶠ𝕄_name]), NaN)
    fill!(parent(∂Yₜ∂Y[ᶠ𝕄_name, ᶜρ_name]), NaN)
    fill!(parent(∂Yₜ∂Y[ᶠ𝕄_name, ᶜ𝔼_name]), NaN)
    fill!(parent(∂Yₜ∂Y[ᶠ𝕄_name, ᶠ𝕄_name]), NaN)

then the solution is (sometimes) driven to NaNs. This appears to be a bug because the solution should not depend on the initial state of the residual--it should be (properly) computed before it is used.

Here are two builds where I've observed this (I also observed this locally):

However, I just tried ∂Yₜ∂Y with NaNs, and the solution was NaN-free, so this seems to be non-deterministic.

Running on the CPU, with Julia 1.10, here is a "reproducer": ENV["TEST_NAME"] = "sphere/held_suarez_rhoe"; using Revise; include("examples/hybrid/driver.jl")

cc @dennisYatunin

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions