[Paraview] Utilizing Server GPU from an external command

Burlen Loring burlen.loring at gmail.com
Thu Mar 8 18:10:13 EST 2018


Hi Chris,

You are right "ssh -X" sends X11 commands back to the client. that is 
not what you want, so do not use -X option in your ssh command.

Assuming that an X server is running on the server in question (sounds 
like it is), there are 2 additional things that you need to make this work.
1. Your ssh user needs to be allowed to make connections to the X server
2. You need to tell programs which display to use.

To see if your user can make connections to the X server:
ssh into the server. run "DISPLAY=:0.0 xhost". If this command succeeds 
it will print out the current access control list. You should see your 
user name. If that is the case then you should be all set. If it fails 
it may say something  about "no protocol" and "can't open the display" 
or something similar. If it fails then you'll need to add your user to 
the access control list. See man page of xhost command for details.

To tell a program which display to use set the DISPLAY environment 
variable. For instance if your user can make connections to X server as 
described above you should be able to run stuff like "ssh user at server 
DISPLAY=:0.0 glxinfo". With the PV client in reverse connection mode 
something like this may work for you

    ssh -R N:localhost:N user at server DISPLAY=:0.0 mpiexec -np 8 pvserver
    --server-port=N --reverse-connection

Burlen

On 03/08/2018 09:13 AM, Chris Coutinho wrote:
> Hello ParaView users,
>
> In short:
> I'm having an issue with utilizing a servers graphics card via ssh. When starting the pvserver manually from the server I don't experience any problems, but attempting to start a pvserver remotely from my client through ssh, I run into problems. I am new to configuring ssh and don't really know what the root of my problem is.
>
>
> The problem:
> I installed ParaView 5.4.1 from source (tags/v5.4.1) with MPI support enabled on an OpenSUSE Leap 42.3 workstation, with the goal of accessing this server from a Windows (laptop) client within a VPN network. The client laptop has the identical  The server has a single Nvidia graphics card installed (Quadro K2200), when I start the server manually on the server I'm able to connect to it from the client and utilize the server GPU; however, when sending the same pvserver command through ssh via the client, I get the 'Display is not accessible on the server side' error.
>
> To start the pvserver manually from the server itself I execute a command similar to this:
>
>         mpiexec -np 8 /usr/local/bin/pvserver --server-port=11111 --client-host=<myclient> --use-offscreen-rendering
>
> After I execute this command from the server, I've been able to confirm that the client is using the server's graphics card by looking at the output of `nvidia-smi`
>
>
> My remote connection string looks like this:
>
>         ssh <user>@<server> mpiexec -np 8 /usr/local/bin/pvserver --server-port=11111 --client-host=<myclient> --use-offscreen-rendering
>
> Indeed, after connecting to my remote server using the remote connection via the client, I saw that there was no utilization of the graphics card via `nvidia-smi`.
>
>
>
> Here is the output of `glxgears` related to OpenGL from the server:
>
> ```
> $ glxinfo | grep -i opengl
> OpenGL vendor string: NVIDIA Corporation
> OpenGL renderer string: Quadro K2200/PCIe/SSE2
> OpenGL core profile version string: 4.5.0 NVIDIA 390.25
> OpenGL core profile shading language version string: 4.50 NVIDIA
> OpenGL core profile context flags: (none)
> OpenGL core profile profile mask: core profile
> OpenGL core profile extensions:
> OpenGL version string: 4.6.0 NVIDIA 390.25
> OpenGL shading language version string: 4.60 NVIDIA
> OpenGL context flags: (none)
> OpenGL profile mask: (none)
> OpenGL extensions:
> OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 390.25
> OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
> OpenGL ES profile extensions:
> ```
>
> Here is the same output from an ssh connection from the client:
>
> ```
> ssh <user>@<server> glxinfo | grep -i opengl
> Error: unable to open display
> ```
>
> And the same with x forwarding enabled (via Xming installed on the client):
>
> ```
> ssh -X <user>@<server> glxinfo | grep -i opengl
> Warning: No xauth data; using fake authentication data for X11 forwarding.
> OpenGL vendor string: VMware, Inc.OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.8, 256 bits)
> OpenGL version string: 3.0 Mesa 17.0.5
> OpenGL shading language version string: 1.30
> OpenGL context flags: (none)
> OpenGL extensions:
> ```
>
> Looking at this output I'm coming to the conclusion that my ssh connection is using the graphics driver of my client machine, but I actually want to utilize the servers GPU. Is this a use case for reverse port tunneling or something similar?
>
> I've attempted a simiar reverse connection as follows, but this doesn't give me any info on the gpu:
>
> ```
> ssh -X -R 11111:localhost:22 <user>@<server> glxinfo | grep -i opengl
> Warning: No xauth data; using fake authentication data for X11 forwarding.
> OpenGL vendor string: VMware, Inc.
> OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.8, 256 bits)
> OpenGL version string: 3.0 Mesa 17.0.5
> OpenGL shading language version string: 1.30
> OpenGL context flags: (none)
> OpenGL extensions:
> ```
>
> I'm sure this is a common issue and has been solved previously, but I'm unable to parse through the mailing lists effectively to get at my problem. It's also possible that I'm looking for a solution in the wrong place. Both of these systems are in a VPN, so maybe ssh isn't necessary, but I don't know of another way of starting the pvserver remotely without ssh.
>
>
> Thanks in advance,
> Chris
>
>
>
> Met vriendlijke groet,
> REDstack BV
>
> Chris Coutinho
> Onderzoeker/Data Analist
>
> tel: +31 (0)6 - 2222 5785
> post: Postbox 199, 8600 AD Sneek
> bezoekadres: Pieter Zeemanstraat 6, 8606 JR Sneek
> email: c.coutinho at redstack.nl
> www: www.redstack.nl
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/paraview

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/paraview/attachments/20180308/9871d487/attachment.html>


More information about the ParaView mailing list