Skip to content

Improve debugging of ldiv #3736

Open
Open
@charleskawczynski

Description

@charleskawczynski

I don't know for sure if this should be a ClimaCore or ClimaAtmos issue, so we can move this if it makes sense.

It would be nice if we could somehow "name" broadcast expressions in our MatrixField infrastructure so that we can more easily debug things passed to ldiv:

[1] error(s::String)
--
  | @ Base ./error.jl:35
  | [2] (::ClimaCore.MatrixFields.var"#119#120"{Tuple{}})(entry::Array{Float32, 5})
  | @ ClimaCore.MatrixFields /central/scratch/esm/slurm-buildkite/climaatmos-ci/depot/default/packages/ClimaCore/K4gqi/src/MatrixFields/field_name_dict.jl:47
  | [3] macro expansion
  | @ /central/scratch/esm/slurm-buildkite/climaatmos-ci/depot/default/packages/Unrolled/KtWta/src/Unrolled.jl:47 [inlined]
  | [4] unrolled_foreach(f::ClimaCore.MatrixFields.var"#119#120"{}, seq::Tuple{…})
  | @ Unrolled /central/scratch/esm/slurm-buildkite/climaatmos-ci/depot/default/packages/Unrolled/KtWta/src/Unrolled.jl:127
  | [5] ClimaCore.MatrixFields.FieldNameDict(keys::ClimaCore.MatrixFields.FieldMatrixKeys{…}, entries::Tuple{…})
  | @ ClimaCore.MatrixFields /central/scratch/esm/slurm-buildkite/climaatmos-ci/depot/default/packages/ClimaCore/K4gqi/src/MatrixFields/field_name_dict.jl:46
  | [6] (ClimaCore.MatrixFields.FieldMatrix)(::Pair{Tuple{…}, LinearAlgebra.UniformScaling{…}}, ::Vararg{Pair{…}})
  | @ ClimaCore.MatrixFields /central/scratch/esm/slurm-buildkite/climaatmos-ci/depot/default/packages/ClimaCore/K4gqi/src/MatrixFields/field_name_dict.jl:56
  | [7] ClimaAtmos.ImplicitEquationJacobian(Y::ClimaCore.Fields.FieldVector{…}, atmos::ClimaAtmos.AtmosModel{…}; approximate_solve_iters::Int64,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions