# InexactError() when running Pkg.test("GLVisualize") with VirtualGL

**URL:** <https://discourse.julialang.org/t/inexacterror-when-running-pkg-test-glvisualize-with-virtualgl/10829>\
**Category:** General Usage\
**Created:** [May 10, 2018, 10:51pm UTC](https://discourse.julialang.org/t/inexacterror-when-running-pkg-test-glvisualize-with-virtualgl/10829 "2018-05-10T22:51:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Quincy\_Wofford](https://avatars.discourse-cdn.com/v4/letter/q/dec6dc/32.png) [@Quincy\_Wofford](https://discourse.julialang.org/u/Quincy_Wofford)\
**Post date:** [May 10, 2018, 10:51pm UTC](https://discourse.julialang.org/t/inexacterror-when-running-pkg-test-glvisualize-with-virtualgl/10829/1 "2018-05-10T22:51:40Z")

</div>

I’m running Julia with VirtualGL on a remote visualization node, and when I attempt to run Pkg.test(“GLVisualize”) I get an “Inexact error()”. Not sure if this could be related to VGL, but I thought I’d mention it. Other OpenGL applications are working fine with VirtualGL. I see that this error has been addressed in the past, [https://github.com/JuliaGL/GLVisualize.jl/issues/230](https://github.com/JuliaGL/GLVisualize.jl/issues/230), but perhaps for different reasons

Output is exactly:

julia\> Pkg.test(“GLVisualize”)  
GLVisualize INFO: Computing test dependencies for GLVisualize…  
VirtualGL  
INFO: No packages to install, update or remove  
INFO: Testing GLVisualize  
ERROR: LoadError: LoadError: InexactError()  
Stacktrace:  
[1] trunc(::Type{Int64}, ::Float64) at ./float.jl:672  
[2] #RunnerConfig#15(::Tuple{Int64,Int64}, ::Bool, ::Array{String,1}, ::Array{String,1}, ::Int64, ::Float64, ::Int64, ::String, ::Bool, ::Bool, ::Bool, ::GLWindow.Screen, ::Type{T} where T) at /home/qwofford/.julia/v0.6/GLVisualize/src/…/examples/ExampleRunner.jl:220  
[3] (::Core.#kw#Type)(::Array{Any,1}, ::Type{ExampleRunner.RunnerConfig}) at ./:0  
[4] include\_from\_node1(::String) at ./loading.jl:576  
[5] include(::String) at ./sysimg.jl:14  
[6] include\_from\_node1(::String) at ./loading.jl:576  
[7] include(::String) at ./sysimg.jl:14  
[8] process\_options(::Base.JLOptions) at ./client.jl:305  
[9] \_start() at ./client.jl:371  
while loading /home/qwofford/.julia/v0.6/GLVisualize/test/test\_interactive.jl, in expression starting on line 30  
while loading /home/qwofford/.julia/v0.6/GLVisualize/test/runtests.jl, in expression starting on line 12

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [May 11, 2018, 1:32pm UTC](https://discourse.julialang.org/t/inexacterror-when-running-pkg-test-glvisualize-with-virtualgl/10829/2 "2018-05-11T13:32:50Z")

</div>

The inexact error occurs on this line: [https://github.com/JuliaGL/GLVisualize.jl/blob/master/examples/ExampleRunner.jl#L220](https://github.com/JuliaGL/GLVisualize.jl/blob/master/examples/ExampleRunner.jl#L220)

Since that’s related to the monitor size / dpi, I’m guessing there is something going wrong with querying the resolution of your monitor.

Can you execute the following:

```julia
julia> using GLVisualize

julia> w = glscreen();

julia> 1*GLVisualize.mm
4

```

And see what it prints?

Also, you might want to try a simple example first, e.g.:  
[https://github.com/JuliaGL/GLVisualize.jl/blob/master/examples/introduction/rotate\_robj.jl](https://github.com/JuliaGL/GLVisualize.jl/blob/master/examples/introduction/rotate_robj.jl)

---

<div class="post-metadata">

**Author:** ![Quincy\_Wofford](https://avatars.discourse-cdn.com/v4/letter/q/dec6dc/32.png) [@Quincy\_Wofford](https://discourse.julialang.org/u/Quincy_Wofford)\
**Post date:** [May 11, 2018, 7:52pm UTC](https://discourse.julialang.org/t/inexacterror-when-running-pkg-test-glvisualize-with-virtualgl/10829/3 "2018-05-11T19:52:17Z")

</div>

Thanks Simon!

I’m not familiar with Julia (yet), but I am assisting someone with a remote visualization use-case which involves Julia/GLVisualize, so I appreciate your specific suggestions.

julia\> using GLVisualize

julia\> w = glscreen();  
NOTE: window came up, just froze the desktop image behind it, but was movable.  
julia\> 1\*GLVisualize.mm  
ERROR: InexactError()  
Stacktrace:  
[1] trunc(::Type{Int64}, ::Float64) at ./float.jl:672  
[2] \*(::Int64, ::GLVisualize.Millimeter) at /home/qwofford/.julia/v0.6/GLVisualize/src/renderloop.jl:46

I am going to spend some time with my /etc/X11/corg.conf file and see if I can find some missing relevant config that could provide an answer to Julia’s request for screen resolution. This is a headless server, so I expect this is what’s going on. Does this illuminate anything?

---

<div class="post-metadata">

**Author:** ![Quincy\_Wofford](https://avatars.discourse-cdn.com/v4/letter/q/dec6dc/32.png) [@Quincy\_Wofford](https://discourse.julialang.org/u/Quincy_Wofford)\
**Post date:** [May 15, 2018, 9:25pm UTC](https://discourse.julialang.org/t/inexacterror-when-running-pkg-test-glvisualize-with-virtualgl/10829/4 "2018-05-15T21:25:44Z")

</div>

I’m running Julia on a headless node with VirtualGL (v2.5.9), so the “Monitor” section of my xorg.conf can’t have a resolution set. Instead, I can set a “Display” subsection for my “Screen” section, and define a “Virtual” resolution. This is the step I have tried since I last posted here. My modified xorg.conf file can be viewed at [# nvidia-xconfig: X configuration file generated by nvidia-xconfig# nvidia-xco - Pastebin.com](https://pastebin.com/0ZQh7jA9). You can see some attempts to set a resolution in the “Monitor” section, but both these attempts prevent lightdm from starting on a headless node (so they are commented out).

Unfortunately, even after adding the “Display” subsection to my “Screen” section, I am still getting an “InexactError()” when I run “using GLVisualize; w=glscreen(); 1\*GLVisualize.mm;”

It sounds like the problem is that Julia is confused because I don’t have a monitor attached. Any ideas to get this working?

---

<div class="post-metadata">

**Author:** ![Quincy\_Wofford](https://avatars.discourse-cdn.com/v4/letter/q/dec6dc/32.png) [@Quincy\_Wofford](https://discourse.julialang.org/u/Quincy_Wofford)\
**Post date:** [May 15, 2018, 10:16pm UTC](https://discourse.julialang.org/t/inexacterror-when-running-pkg-test-glvisualize-with-virtualgl/10829/5 "2018-05-15T22:16:37Z")

</div>

The “rotate\_robj.jl” script you provided works great. I wonder why Pkg.test(“GLVisualize”) and the “1\*GLVisualize.mm” is different?

I know that the first thing the user will do is attempt Pkg.test(“GLVisualize”) to verify functionality. Is there something I can do to fix this Pkg.test?

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [May 16, 2018, 12:54pm UTC](https://discourse.julialang.org/t/inexacterror-when-running-pkg-test-glvisualize-with-virtualgl/10829/6 "2018-05-16T12:54:14Z")

</div>

You could actually change the millimeter value directly.  
I use this constant:  
[https://github.com/JuliaGL/GLVisualize.jl/blob/master/src/renderloop.jl#L40](https://github.com/JuliaGL/GLVisualize.jl/blob/master/src/renderloop.jl#L40)  
to figure out how much pixel one mm on your screen is.  
You can change that constant directly by running:

```nohighlight
GLVisualize.pixel_per_mm[] = 4

```
