Oceananigans.jl: Multiple warnings about "incremental compilation may be fatally broken for this module"

Created on 27 Nov 2019  ยท  13Comments  ยท  Source: CliMA/Oceananigans.jl

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 **
bug ๐Ÿž cleanup ๐Ÿงน

All 13 comments

Try master Cassette.jl ;)

That worked, thanks @vchuravy! PR incoming.

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 **

Hi @francispoulin, thank you for reporting this!

I believe the warning is due to https://github.com/CliMA/Oceananigans.jl/issues/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!

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!

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.

Great and thanks again!

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

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.

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.

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

@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!

Thanks @glwagner , those examples look great!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ali-ramadhan picture ali-ramadhan  ยท  3Comments

Yesse42 picture Yesse42  ยท  7Comments

glwagner picture glwagner  ยท  5Comments

glwagner picture glwagner  ยท  6Comments

freemin7 picture freemin7  ยท  5Comments