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

Error in visualize_barotropic_gyre.jl in validation exps #2542

Closed
francispoulin opened this issue May 10, 2022 · 11 comments
Closed

Error in visualize_barotropic_gyre.jl in validation exps #2542

francispoulin opened this issue May 10, 2022 · 11 comments

Comments

@francispoulin
Copy link
Collaborator

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
@navidcy
Copy link
Collaborator

navidcy commented May 10, 2022

Try deleting show_axis=false from:

wireframe!(ax, Sphere(Point3f(0), 0.99f0), show_axis=false)

?

@navidcy navidcy changed the title error in barotropic_gyre.jl Error in visualize_barotropic_gyre.jl in validation expo May 10, 2022
@navidcy navidcy changed the title Error in visualize_barotropic_gyre.jl in validation expo Error in visualize_barotropic_gyre.jl in validation exps May 10, 2022
@navidcy
Copy link
Collaborator

navidcy commented May 10, 2022

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

@francispoulin
Copy link
Collaborator Author

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

@francispoulin
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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.

@navidcy
Copy link
Collaborator

navidcy commented May 16, 2022

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

@francispoulin
Copy link
Collaborator Author

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.

@navidcy
Copy link
Collaborator

navidcy commented May 17, 2022

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
Copy link
Collaborator

navidcy commented Jun 2, 2022

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

@glwagner
Copy link
Member

glwagner commented Jun 2, 2022

I'm going to update this shortly.

@glwagner
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants