Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing method for column_integral_indefinite! for CUDADevice #1833

Closed
Sbozzolo opened this issue Jun 20, 2024 · 3 comments
Closed

Missing method for column_integral_indefinite! for CUDADevice #1833

Sbozzolo opened this issue Jun 20, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@Sbozzolo
Copy link
Member

Steps to reproduce (on clima):

import ClimaAtmos as CA; CA.ClimaComms.@import_required_backends
config = CA.AtmosConfig("config/model_configs/diagnostic_edmfx_trmm_box.yml");
simulation = CA.get_simulation(config); CA.solve_atmos!(simulation);

Stack trace:

ERROR: MethodError: no method matching column_integral_indefinite!(::ClimaAtmos.InitialConditions.var"#dp_dz#40"{…}, ::ClimaComms.CUDADevice, ::ClimaCore.Fields.Field{…}, ::Float64, ::ClimaCore.Operators.var"#127#129")

Closest candidates are:
  column_integral_indefinite!(::Function, ::ClimaComms.AbstractCPUDevice, ::Any, ::Any...)
   @ ClimaCore ~/.julia/packages/ClimaCore/ANgUC/src/Operators/integrals.jl:146
  column_integral_indefinite!(::Function, ::ClimaComms.AbstractCPUDevice, ::ClimaCore.Fields.Field{V, S} where {V<:ClimaCore.DataLayouts.AbstractData, S<:(ClimaCore.Spaces.ExtrudedFiniteDifferenceSpace{G, ClimaCore.Grids.CellFace} where G)}, ::Any...)
   @ ClimaCore ~/.julia/packages/ClimaCore/ANgUC/src/Operators/integrals.jl:153
  column_integral_indefinite!(::Function, ::ClimaCore.Fields.Field, ::Any, ::Any)
   @ ClimaCore ~/.julia/packages/ClimaCore/ANgUC/src/Operators/integrals.jl:129
  ...

Stacktrace:
  [1] column_integral_indefinite!(f::Function, ᶠ∫field::ClimaCore.Fields.Field{…}, ϕ₀::Float64, average::Function)
    @ ClimaCore.Operators ~/.julia/packages/ClimaCore/ANgUC/src/Operators/integrals.jl:129
  [2] column_indefinite_integral(f::Function, ϕ₀::Float64, zspan::Tuple{Float64, Float64}; nelems::Int64)
    @ ClimaAtmos.InitialConditions ~/ClimaAtmos.jl/src/initial_conditions/initial_conditions.jl:82
  [3] column_indefinite_integral
    @ ~/ClimaAtmos.jl/src/initial_conditions/initial_conditions.jl:62 [inlined]
  [4] #hydrostatic_pressure_profile#38
    @ ~/ClimaAtmos.jl/src/initial_conditions/initial_conditions.jl:758 [inlined]
  [5] hydrostatic_pressure_profile
    @ ~/ClimaAtmos.jl/src/initial_conditions/initial_conditions.jl:724 [inlined]
  [6] (::ClimaAtmos.InitialConditions.TRMM_LBA)(params::ClimaAtmos.Parameters.ClimaAtmosParameters{…})
    @ ClimaAtmos.InitialConditions ~/ClimaAtmos.jl/src/initial_conditions/initial_conditions.jl:1063
  [7] macro expansion
    @ ~/ClimaAtmos.jl/src/solver/type_getters.jl:635 [inlined]
  [8] macro expansion
    @ ./timing.jl:503 [inlined]
  [9] macro expansion
    @ ~/ClimaAtmos.jl/src/utils/utilities.jl:331 [inlined]
 [10] get_simulation(config::ClimaAtmos.AtmosConfig{…})
    @ ClimaAtmos ~/ClimaAtmos.jl/src/solver/type_getters.jl:634
 [11] top-level scope
    @ REPL[2]:1
Some type information was truncated. Use `show(err)` to see complete types.
@Sbozzolo Sbozzolo added the bug Something isn't working label Jun 20, 2024
@charleskawczynski
Copy link
Member

I wonder if this is a similar dispatch pattern we experienced with fill. I can take a look

@charleskawczynski charleskawczynski self-assigned this Jun 20, 2024
@charleskawczynski
Copy link
Member

Ah, no, we just never added gpu support for this operation (probably because it's part of the initial conditions). We can add it, but it's not as easy as a dispatch fix.

@Sbozzolo Sbozzolo changed the title Missing method for column_integral_indefinite! for CUDADevice? Missing method for column_integral_indefinite! for CUDADevice Jun 28, 2024
@dennisYatunin
Copy link
Member

GPU support for this operation was added in #1903, so we can close this issue now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants