Oceananigans.jl icon indicating copy to clipboard operation
Oceananigans.jl copied to clipboard

Error in `visualize_barotropic_gyre.jl` in validation exps

Open francispoulin opened this issue 3 years ago • 10 comments

For run, I just ran barotropic_gyre.jl found here.

The simulation part ran nicely but when it came to visualization I got the following error. I guess the plotting needs to be updated?

ERROR: LoadError: LoadError: setting show_axis for scene via plot attribute not supported anymore
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] plot!(scene::Scene, P::Type{Combined{Makie.wireframe, Tuple{Sphere{Float32}}}}, attributes::Attributes, input::Tuple{Observable{Sphere{Float32}}}, args::Observable{Tuple{Sphere{Float32}}})
    @ Makie ~/.julia/packages/Makie/umL6V/src/interfaces.jl:399
  [3] plot!(scene::Scene, P::Type{Combined{Makie.wireframe, ArgType} where ArgType}, attributes::Attributes, args::Sphere{Float32}; kw_attributes::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Makie ~/.julia/packages/Makie/umL6V/src/interfaces.jl:320
  [4] plot!
    @ ~/.julia/packages/Makie/umL6V/src/interfaces.jl:288 [inlined]
  [5] plot!(lscene::LScene, P::Type{Combined{Makie.wireframe, ArgType} where ArgType}, attributes::Attributes, args::Sphere{Float32}; kw_attributes::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Makie.MakieLayout ~/.julia/packages/Makie/umL6V/src/makielayout/blocks/scene.jl:6
  [6] plot!
    @ ~/.julia/packages/Makie/umL6V/src/makielayout/blocks/scene.jl:6 [inlined]
  [7] plot!(P::Type{Combined{Makie.wireframe, ArgType} where ArgType}, ls::LScene, args::Sphere{Float32}; kw_attributes::Base.Iterators.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:show_axis,), Tuple{Bool}}})
    @ Makie.MakieLayout ~/.julia/packages/Makie/umL6V/src/makielayout/blocks/scene.jl:14
  [8] #wireframe!#600
    @ ~/.julia/packages/MakieCore/aD9Dy/src/recipes.jl:37 [inlined]
  [9] visualize_barotropic_gyre(filepath::String)
    @ Main ~/Software/Oceananigans.jl/validation/barotropic_gyre/visualize_barotropic_gyre.jl:64
 [10] top-level scope
    @ ~/Software/Oceananigans.jl/validation/barotropic_gyre/visualize_barotropic_gyre.jl:94
 [11] include(fname::String)
    @ Base.MainInclude ./client.jl:444
 [12] top-level scope
    @ ~/Software/Oceananigans.jl/validation/barotropic_gyre/barotropic_gyre.jl:139
in expression starting at /home/fpoulin/Software/Oceananigans.jl/validation/barotropic_gyre/visualize_barotropic_gyre.jl:94
in expression starting at /home/fpoulin/Software/Oceananigans.jl/validation/barotropic_gyre/barotropic_gyre.jl:139

francispoulin avatar May 10 '22 16:05 francispoulin

Try deleting show_axis=false from: https://github.com/CliMA/Oceananigans.jl/blob/d4a462b259073b5c698f2cf9a8f419304f74262b/validation/barotropic_gyre/visualize_barotropic_gyre.jl#L64

?

navidcy avatar May 10 '22 20:05 navidcy

Makie updated the way this works. See second bullet point in https://makie.juliaplots.org/stable/documentation/news/#v016

navidcy avatar May 10 '22 20:05 navidcy

Thanks @navidcy ! I will try this later today when I'm in front of a computer.

francispoulin avatar May 10 '22 21:05 francispoulin

I removed show_axis=false and it still produces an error, see below.

fpoulin@pop-os:~/Software/Oceananigans.jl/validation/barotropic_gyre$ julia visualize_barotropic_gyre.jl 
libGL error: MESA-LOADER: failed to open iris: /usr/lib/dri/iris_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open iris: /usr/lib/dri/iris_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast
┌ Warning:     GLFW couldn't create an OpenGL window.
│     This likely means, you don't have an OpenGL capable Graphic Card,
│     or you don't have an OpenGL 3.3 capable video driver installed.
│     Have a look at the troubleshooting section in the GLMakie readme:
│     https://github.com/JuliaPlots/Makie.jl/tree/master/GLMakie#troubleshooting-opengl.
â”” @ GLMakie ~/.julia/packages/GLMakie/XG7Hm/src/screen.jl:381
ERROR: LoadError: GLFWError (VERSION_UNAVAILABLE): GLX: Failed to create context: GLXBadFBConfig
Stacktrace:
  [1] _ErrorCallbackWrapper(code::Int32, description::Cstring)
    @ GLFW ~/.julia/packages/GLFW/BWxfF/src/callback.jl:43
  [2] CreateWindow(width::Int64, height::Int64, title::String, monitor::GLFW.Monitor, share::GLFW.Window)
    @ GLFW ~/.julia/packages/GLFW/BWxfF/src/glfw3.jl:499
  [3] GLFW.Window(; name::String, resolution::Tuple{Int64, Int64}, debugging::Bool, major::Int64, minor::Int64, windowhints::Vector{Tuple{UInt32, Integer}}, contexthints::Vector{Tuple{UInt32, Integer}}, visible::Bool, focus::Bool, fullscreen::Bool, monitor::Nothing, share::GLFW.Window)
    @ GLFW ~/.julia/packages/GLFW/BWxfF/src/glfw3.jl:344
  [4] GLMakie.Screen(; resolution::Tuple{Int64, Int64}, visible::Bool, title::String, kw_args::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ GLMakie ~/.julia/packages/GLMakie/XG7Hm/src/screen.jl:373
  [5] Screen
    @ ~/.julia/packages/GLMakie/XG7Hm/src/screen.jl:345 [inlined]
  [6] global_gl_screen
    @ ~/.julia/packages/GLMakie/XG7Hm/src/screen.jl:291 [inlined]
  [7] global_gl_screen(resolution::Tuple{Int64, Int64}, visibility::Bool, tries::Int64)
    @ GLMakie ~/.julia/packages/GLMakie/XG7Hm/src/screen.jl:436
  [8] global_gl_screen
    @ ~/.julia/packages/GLMakie/XG7Hm/src/screen.jl:435 [inlined]
  [9] backend_display
    @ ~/.julia/packages/GLMakie/XG7Hm/src/display.jl:2 [inlined]
 [10] VideoStream(scene::Scene; framerate::Int64)
    @ Makie ~/.julia/packages/Makie/umL6V/src/display.jl:329
 [11] #VideoStream#909
    @ ~/.julia/packages/Makie/umL6V/src/display.jl:342 [inlined]
 [12] Record(func::var"#5#10"{Observable{Int64}, Vector{Int64}}, scene::Figure, iter::Vector{Int64}; framerate::Int64)
    @ Makie ~/.julia/packages/Makie/umL6V/src/display.jl:589
 [13] #record#915
    @ ~/.julia/packages/Makie/umL6V/src/display.jl:584 [inlined]
 [14] visualize_barotropic_gyre(filepath::String)
    @ Main ~/Software/Oceananigans.jl/validation/barotropic_gyre/visualize_barotropic_gyre.jl:72
 [15] top-level scope
    @ ~/Software/Oceananigans.jl/validation/barotropic_gyre/visualize_barotropic_gyre.jl:94
in expression starting at /home/fpoulin/Software/Oceananigans.jl/validation/barotropic_gyre/visualize_barotropic_gyre.jl:94

francispoulin avatar May 11 '22 01:05 francispoulin

I realize that this is a problem with how Makie is installed on my compter. I will try and figure this out but if anyone has any advice, please let me know.

francispoulin avatar May 11 '22 16:05 francispoulin

try CairoMakie and use ElectronDisplay to see the figure or save as .png?

navidcy avatar May 16 '22 04:05 navidcy

Thanks for the suggestion @navidcy . It turns out that I have two GPUs in my computer and that causes problems. If I stick to NVIDA all is well.

But I will try and use CairoMakie instead of GLMakie, since I gather this is the stable version we should be using.

francispoulin avatar May 16 '22 17:05 francispoulin

Oh, if GLMakie works with the "correct" GPU then stick to that. Because it produces output. CairoMakie doesn't produce a figure but only can save, e.g., to a png file. We use CairoMakie in the docs because they are build on remote computers without monitors.

navidcy avatar May 17 '22 01:05 navidcy

Is this still an issue? Shall I have a look?

navidcy avatar Jun 02 '22 03:06 navidcy

I'm going to update this shortly.

glwagner avatar Jun 02 '22 12:06 glwagner

I'm closing this issue because I'm judging that it's not of current, timely relevance to Oceananigans development. If you would like to make it a higher priority or if you think the issue was closed in error please feel free to re-open.

glwagner avatar Mar 23 '23 04:03 glwagner