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

Multiple warnings about "incremental compilation may be fatally broken for this module" #537

Closed
ali-ramadhan opened this issue Nov 27, 2019 · 13 comments · Fixed by #538
Closed
Labels
bug 🐞 Even a perfect program still has bugs cleanup 🧹 Paying off technical debt

Comments

@ali-ramadhan
Copy link
Member

Non-fatal and easy to fix but should probably be done as these look bad to users.

The Casette warnings are non-trivial to fix according to @vchuravy so maybe supressing those warnings might work (see #366).

julia> using Oceananigans
[ Info: Precompiling Oceananigans [9e8cae18-63c1-5223-a75c-80ca9d6e9a09]
WARNING: Method definition overdub(Cassette.Context{N, M, T, P, B, H} where H<:Union{Cassette.DisableHooks, Nothing} where B<:Union{Nothing, Base.IdDict{Module, Base.Dict{Symbol, Cassette.BindingMeta}}} where P<:Cassette.AbstractPass where T<:Union{Nothing, Cassette.Tag{N, X, E} where E where X where N<:Cassette.AbstractContextName} where M where N<:Cassette.AbstractContextName, Any...) in module Cassette at /home/alir/.julia/packages/Cassette/YCOeN/src/overdub.jl:524 overwritten in module GPUifyLoops at /home/alir/.julia/packages/Cassette/YCOeN/src/overdub.jl:524.
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition recurse(Cassette.Context{N, M, T, P, B, H} where H<:Union{Cassette.DisableHooks, Nothing} where B<:Union{Nothing, Base.IdDict{Module, Base.Dict{Symbol, Cassette.BindingMeta}}} where P<:Cassette.AbstractPass where T<:Union{Nothing, Cassette.Tag{N, X, E} where E where X where N<:Cassette.AbstractContextName} where M where N<:Cassette.AbstractContextName, Any...) in module Cassette at /home/alir/.julia/packages/Cassette/YCOeN/src/overdub.jl:537 overwritten in module GPUifyLoops at /home/alir/.julia/packages/Cassette/YCOeN/src/overdub.jl:537.
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition overdub(Cassette.Context{N, M, T, P, B, H} where H<:Union{Cassette.DisableHooks, Nothing} where B<:Union{Nothing, Base.IdDict{Module, Base.Dict{Symbol, Cassette.BindingMeta}}} where P<:Cassette.AbstractPass where T<:Union{Nothing, Cassette.Tag{N, X, E} where E where X where N<:Cassette.AbstractContextName} where M where N<:Cassette.AbstractContextName, Any...) in module Cassette at /home/alir/.julia/packages/Cassette/YCOeN/src/overdub.jl:524 overwritten in module GPUifyLoops at /home/alir/.julia/packages/Cassette/YCOeN/src/overdub.jl:524.
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition recurse(Cassette.Context{N, M, T, P, B, H} where H<:Union{Cassette.DisableHooks, Nothing} where B<:Union{Nothing, Base.IdDict{Module, Base.Dict{Symbol, Cassette.BindingMeta}}} where P<:Cassette.AbstractPass where T<:Union{Nothing, Cassette.Tag{N, X, E} where E where X where N<:Cassette.AbstractContextName} where M where N<:Cassette.AbstractContextName, Any...) in module Cassette at /home/alir/.julia/packages/Cassette/YCOeN/src/overdub.jl:537 overwritten in module GPUifyLoops at /home/alir/.julia/packages/Cassette/YCOeN/src/overdub.jl:537.
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition TurbulentDiffusivities(Oceananigans.AbstractArchitecture, Oceananigans.AbstractGrid{T} where T, Any, Tuple) in module TurbulenceClosures at /home/alir/Oceananigans.jl/src/TurbulenceClosures/TurbulenceClosures.jl:151 overwritten at /home/alir/Oceananigans.jl/src/TurbulenceClosures/closure_tuples.jl:35.
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition with_tracers(Any, Tuple) in module TurbulenceClosures at /home/alir/Oceananigans.jl/src/TurbulenceClosures/TurbulenceClosures.jl:154 overwritten at /home/alir/Oceananigans.jl/src/TurbulenceClosures/closure_tuples.jl:38.
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition (::Type{Oceananigans.FPlane{FT} where FT})(Any) in module Oceananigans at /home/alir/Oceananigans.jl/src/coriolis.jl:22 overwritten at /home/alir/Oceananigans.jl/src/coriolis.jl:38.
  ** incremental compilation may be fatally broken for this module **
@ali-ramadhan ali-ramadhan added bug 🐞 Even a perfect program still has bugs cleanup 🧹 Paying off technical debt labels Nov 27, 2019
@vchuravy
Copy link
Collaborator

Try master Cassette.jl ;)

@ali-ramadhan
Copy link
Member Author

That worked, thanks @vchuravy! PR incoming.

@francispoulin
Copy link
Collaborator

After just recently installing Oceananigans I tried using the library and got this error. I gather things still work but wanted to point out tha tthere is still a Warning on my first use. See below for details.

julia> using Oceananigans
[ Info: Precompiling Oceananigans [9e8cae18-63c1-5223-a75c-80ca9d6e9a09]
WARNING: Method definition adapt_structure(Any, OffsetArrays.OffsetArray{T, N, AA} where AA<:AbstractArray{T, N} where N where T) in module OffsetArrays at /home/fpoulin/.julia/packages/OffsetArrays/ExQCD/src/OffsetArrays.jl:486 overwritten in module Utils at /home/fpoulin/.julia/packages/Oceananigans/IbUoB/src/Utils/adapt_structure.jl:5.
  ** incremental compilation may be fatally broken for this module **

@ali-ramadhan
Copy link
Member Author

ali-ramadhan commented Nov 9, 2020

Hi @francispoulin, thank you for reporting this!

I believe the warning is due to #1141 which should be fixed with the next tagged release (v0.44.1), hopefully coming out a bit later today.

PS: Hi from a uWaterloo grad!

@francispoulin
Copy link
Collaborator

Thanks for the quick reply @ali-ramadhan . That is great that this is being fixed so soon.

Would you like me to keep this open until after I test the new release?

PS: Great to hear that UWaterloo grads are going off to do such cool things, like workong on this!

@ali-ramadhan
Copy link
Member Author

Would you like me to keep this open until after I test the new release?

Just re-opened the issue in case it still persists. Feel free to close this issue once you test the new release.

I'll ping back here once v0.44.1 is out.

@francispoulin
Copy link
Collaborator

Great and thanks again!

@ali-ramadhan ali-ramadhan reopened this Nov 9, 2020
@ali-ramadhan
Copy link
Member Author

@francispoulin v0.44.1 was just tagged so warning should be gone now!

@francispoulin
Copy link
Collaborator

I agree the problem goes away. Thanks!

A different issue, when I run this should I be seeing anything? I don't so have no way to observe whether it is doing anything reasonable or not.

@ali-ramadhan
Copy link
Member Author

Awesome! I'll close the issue then.

Hmmm, not sure what you're running but in general Oceananigans.jl doesn't give too much feedback (something we're hoping to improve, see #1013). If you're running things in the REPL it'll print/display what each expression returns (see below) but run! doesn't produce output or report on progress by default (perhaps it would be good to add a reasonable default).

julia> using Oceananigans

julia> grid = RegularCartesianGrid(size=(100, 100, 50), extent=(2π, 2π, 1))
RegularCartesianGrid{Float64, Periodic, Periodic, Bounded}
                   domain: x  [-5.496153587253255e-18, 6.283185307179586], y  [-5.496153587253255e-18, 6.283185307179586], z  [-1.0, 1.7080354225002348e-17]
                 topology: (Periodic, Periodic, Bounded)
  resolution (Nx, Ny, Nz): (100, 100, 50)
   halo size (Hx, Hy, Hz): (1, 1, 1)
grid spacing (Δx, Δy, Δz): (0.06283185307179587, 0.06283185307179587, 0.02)

julia> model = IncompressibleModel(grid=grid)
IncompressibleModel{CPU, Float64}(time = 0 seconds, iteration = 0) 
├── grid: RegularCartesianGrid{Float64, Periodic, Periodic, Bounded}(Nx=100, Ny=100, Nz=50)
├── tracers: (:T, :S)
├── closure: IsotropicDiffusivity{Float64,NamedTuple{(:T, :S),Tuple{Float64,Float64}}}
├── buoyancy: SeawaterBuoyancy{Float64,LinearEquationOfState{Float64},Nothing,Nothing}
└── coriolis: Nothing

julia> simulation = Simulation(model, Δt=60, stop_time=3600)
Simulation{IncompressibleModel{CPU, Float64}}
├── Model clock: time = 0 seconds, iteration = 0 
├── Next time step (Int64): 1 minute 
├── Iteration interval: 1
├── Stop criteria: Any[Oceananigans.Simulations.iteration_limit_exceeded, Oceananigans.Simulations.stop_time_exceeded, Oceananigans.Simulations.wall_time_limit_exceeded]
├── Run time: 0 seconds, wall time limit: Inf
├── Stop time: 1 hour, stop iteration: Inf
├── Diagnostics: OrderedCollections.OrderedDict with no entries
└── Output writers: OrderedCollections.OrderedDict with no entries

julia> run!(simulation)
[ Info: Simulation is stopping. Model time 1 hour has hit or exceeded simulation stop time 1 hour.

@francispoulin
Copy link
Collaborator

Thanks. I get the same output but no visuals and no data saved. I will learn how to do that.

@glwagner
Copy link
Member

glwagner commented Nov 9, 2020

@francispoulin checkout the examples (like this one) for inspiration about how to save output and plot solutions and let us know if they are helpful!

@francispoulin
Copy link
Collaborator

Thanks @glwagner , those examples look great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Even a perfect program still has bugs cleanup 🧹 Paying off technical debt
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants