[Paraview] Utilizing Server GPU from an external command
Chris Coutinho
c.coutinho at redstack.nl
Fri Mar 9 08:25:09 EST 2018
Thanks for the explanation Burlen,
It was indeed an issue with xhost as you alluded to. On the server I added my user to the list of authorized clients:
xhost +SI:localhost:<user>
Another point that I need to do was remove the Mesa library from the server, which was probably on the system because the nvidia drivers were installed later. After removing the Mesa library, adding my user to the authorized clients for xhost, and appending the DISPLAY variable to my pvserver command fixes the problem that I originally had.
Here's my current working command:
ssh <user>@<server> DISPLAY=:0.0 /usr/local/bin/pvserver --server-port=11111 --client-host=<client> --use-offscreen-rendering
I wasn't able to get reverse connection to work correctly, so I removed that argument from the command, It's not entirely clear to me why I would need it. From the documentation it seems like a requirement if the client and server are on separate sides of a firewall. That's not the case for me and it works without.
Thanks again for your quick response.
Met vriendlijke groet,
REDstack BV
Chris Coutinho
Onderzoeker/Data analist
From: Burlen Loring [mailto:burlen.loring at gmail.com]
Sent: vrijdag 9 maart 2018 00:10
To: Chris Coutinho <c.coutinho at redstack.nl>; paraview at public.kitware.com
Subject: Re: [Paraview] Utilizing Server GPU from an external command
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: mailto:c.coutinho at redstack.nl
www: https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.redstack.nl&data=02%7C01%7Cc.coutinho%40redstack.nl%7C295e6333009e475623ac08d58549c216%7Ceea7d51815bf4e07834271208871a965%7C0%7C1%7C636561474216899385&sdata=IxdSIqMLwCFoc20R5d3Y0DOIy5EFQamH%2FUxjuwaTviE%3D&reserved=0
_______________________________________________
Powered by https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com&data=02%7C01%7Cc.coutinho%40redstack.nl%7C295e6333009e475623ac08d58549c216%7Ceea7d51815bf4e07834271208871a965%7C0%7C1%7C636561474216899385&sdata=aybWOd44VIUSPPDyPfWsz5oSvhC5m4PuoYpUlj2f66Q%3D&reserved=0
Visit other Kitware open-source projects at https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Cc.coutinho%40redstack.nl%7C295e6333009e475623ac08d58549c216%7Ceea7d51815bf4e07834271208871a965%7C0%7C1%7C636561474216899385&sdata=S%2BBa4ekxAVN%2BfeIHSOaHRxBr29yUHGurKbF%2B9CQ5xA0%3D&reserved=0
Please keep messages on-topic and check the ParaView Wiki at: https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fparaview.org%2FWiki%2FParaView&data=02%7C01%7Cc.coutinho%40redstack.nl%7C295e6333009e475623ac08d58549c216%7Ceea7d51815bf4e07834271208871a965%7C0%7C1%7C636561474216899385&sdata=ucHSZm5tB%2BR5TkJDNXoRDb%2FxEXMKaprYoOrpijFrSDY%3D&reserved=0
Search the list archives at: https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3DParaView&data=02%7C01%7Cc.coutinho%40redstack.nl%7C295e6333009e475623ac08d58549c216%7Ceea7d51815bf4e07834271208871a965%7C0%7C1%7C636561474216899385&sdata=1A1d4T9ZocDidNMoq5afxux%2BGbqYVeHNMM8u%2BB6tL%2F8%3D&reserved=0
Follow this link to subscribe/unsubscribe:
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fparaview&data=02%7C01%7Cc.coutinho%40redstack.nl%7C295e6333009e475623ac08d58549c216%7Ceea7d51815bf4e07834271208871a965%7C0%7C1%7C636561474216899385&sdata=0GJGI8xx4KR24Ro28PfknNDjm08bP1P6RjCVXUDqHoI%3D&reserved=0
More information about the ParaView
mailing list