Skip to content
Snippets Groups Projects
remote-visualization.md 7.22 KiB
Newer Older
  • Learn to ignore specific revisions
  • Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    # Remote visualization service
    
    ## Introduction
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    The goal of this service is to provide the users a GPU accelerated use of OpenGL applications, especially for pre- and post- processing work, where not only the GPU performance is needed but also fast access to the shared file systems of the cluster and a reasonable amount of RAM.
    
    The service is based on integration of open source tools VirtualGL and TurboVNC together with the cluster's job scheduler PBS Professional.
    
    Currently two compute nodes are dedicated for this service with following configuration for each node:
    
    
    |[**Visualization node configuration**](compute-nodes/)||
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    |---|---|
    
    David Hrbáč's avatar
    David Hrbáč committed
    |CPU|2 x Intel Sandy Bridge E5-2670, 2.6 GHz|
    |Processor cores|16 (2 x 8 cores)|
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    |RAM|64 GB, min. 4 GB per core|
    
    David Hrbáč's avatar
    David Hrbáč committed
    |GPU|NVIDIA Quadro 4000, 2 GB RAM|
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    |Local disk drive|yes - 500 GB|
    |Compute network|InfiniBand QDR|
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ## Schematic overview
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ![rem_vis_scheme](../img/scheme.png "rem_vis_scheme")
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ![rem_vis_legend](../img/legend.png "rem_vis_legend")
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ## How to use the service
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ### Setup and start your own TurboVNC server
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    TurboVNC is designed and implemented for cooperation with VirtualGL and available for free for all major platforms. For more information and download, please refer to: <http://sourceforge.net/projects/turbovnc/>
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    **Always use TurboVNC on both sides** (server and client) **don't mix TurboVNC and other VNC implementations** (TightVNC, TigerVNC, ...) as the VNC protocol implementation may slightly differ and diminish your user experience by introducing picture artifacts, etc.
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    The procedure is:
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    #### 1. Connect to a login node
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Pavel Jirásek's avatar
    Pavel Jirásek committed
    Please [follow the documentation](shell-and-data-access/).
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    #### 2. Run your own instance of TurboVNC server
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    To have the OpenGL acceleration, **24 bit color depth must be used**. Otherwise only the geometry (desktop size) definition is needed.
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    *At first VNC server run you need to define a password.*
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    This example defines desktop with dimensions 1200x700 pixels and 24 bit color depth.
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ```bash
    $ module load turbovnc/1.2.2
    $ vncserver -geometry 1200x700 -depth 24
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    Desktop 'TurboVNC: login2:1 (username)' started on display login2:1
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    Starting applications specified in /home/username/.vnc/xstartup.turbovnc
    Log file is /home/username/.vnc/login2:1.log
    ```
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    #### 3. Remember which display number your VNC server runs (you will need it in the future to stop the server)
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ```bash
    $ vncserver -list
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    TurboVNC server sessions:
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    X DISPLAY # PROCESS ID
    :1 23269
    ```
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    In this example the VNC server runs on display **:1**.
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    #### 4. Remember the exact login node, where your VNC server runs
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ```bash
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    $ uname -n
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    login2
    ```
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    In this example the VNC server runs on **login2**.
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    #### 5. Remember on which TCP port your own VNC server is running
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    To get the port you have to look to the log file of your VNC server.
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ```bash
    $ grep -E "VNC.*port" /home/username/.vnc/login2:1.log
    20/02/2015 14:46:41 Listening for VNC connections on TCP port 5901
    ```
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    In this example the VNC server listens on TCP port **5901**.
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    #### 6. Connect to the login node where your VNC server runs with SSH to tunnel your VNC session
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    Tunnel the TCP port on which your VNC server is listenning.
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ```bash
    $ ssh login2.anselm.it4i.cz -L 5901:localhost:5901
    ```
    
    x-window-system/
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    *If you use Windows and Putty, please refer to port forwarding setup  in the documentation:*
    
    [x-window-and-vnc#section-12](../get-started-with-it4innovations/accessing-the-clusters/graphical-user-interface/x-window-system/)
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    #### 7. If you don't have Turbo VNC installed on your workstation
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    Get it from: <http://sourceforge.net/projects/turbovnc/>
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    #### 8. Run TurboVNC Viewer from your workstation
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    Mind that you should connect through the SSH tunneled port. In this example it is 5901 on your workstation (localhost).
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ```bash
    $ vncviewer localhost:5901
    ```
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    *If you use Windows version of TurboVNC Viewer, just run the Viewer and use address **localhost:5901**.*
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    #### 9. Proceed to the chapter "Access the visualization node"
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    *Now you should have working TurboVNC session connected to your workstation.*
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    #### 10. After you end your visualization session
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    *Don't forget to correctly shutdown your own VNC server on the login node!*
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ```bash
    $ vncserver -kill :1
    ```
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ### Access the visualization node
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    **To access the node use a dedicated PBS Professional scheduler queue
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    qviz**. The queue has following properties:
    
    
    Pavel Jirásek's avatar
    Pavel Jirásek committed
     |queue |active project |project resources |nodes|min ncpus|priority|authorization|walltime |
     | --- | --- | --- | --- | --- | --- | --- | --- |
    
     |**qviz** Visualization queue |yes |none required |2 |4 |150 |no |1 hour / 8 hours |
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    Currently when accessing the node, each user gets 4 cores of a CPU allocated, thus approximately 16 GB of RAM and 1/4 of the GPU capacity. *If more GPU power or RAM is required, it is recommended to allocate one whole node per user, so that all 16 cores, whole RAM and whole GPU is exclusive. This is currently also the maximum allowed allocation per one user. One hour of work is allocated by default, the user may ask for 2 hours maximum.*
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    To access the visualization node, follow these steps:
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    #### 1. In your VNC session, open a terminal and allocate a node using PBSPro qsub command
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    *This step is necessary to allow you to proceed with next steps.*
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ```bash
    $ qsub -I -q qviz -A PROJECT_ID
    ```
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    In this example the default values for CPU cores and usage time are used.
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ```bash
    $ qsub -I -q qviz -A PROJECT_ID -l select=1:ncpus=16 -l walltime=02:00:00
    ```
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    *Substitute **PROJECT_ID** with the assigned project identification string.*
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    In this example a whole node for 2 hours is requested.
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    If there are free resources for your request, you will have a shell unning on an assigned node. Please remember the name of the node.
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ```bash
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    $ uname -n
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    srv8
    ```
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    In this example the visualization session was assigned to node **srv8**.
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    #### 2. In your VNC session open another terminal (keep the one with interactive PBSPro job open)
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    Setup the VirtualGL connection to the node, which PBSPro allocated for our job.
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ```bash
    $ vglconnect srv8
    ```
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    You will be connected with created VirtualGL tunnel to the visualization ode, where you will have a shell.
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    #### 3. Load the VirtualGL module
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ```bash
    $ module load virtualgl/2.4
    ```
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    #### 4. Run your desired OpenGL accelerated application using VirtualGL script "vglrun"
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ```bash
    $ vglrun glxgears
    ```
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    Please note, that if you want to run an OpenGL application which is vailable through modules, you need at first load the respective module. . g. to run the **Mentat** OpenGL application from **MARC** software ackage use:
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ```bash
    $ module load marc/2013.1
    $ vglrun mentat
    ```
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    #### 5. After you end your work with the OpenGL application
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    Just logout from the visualization node and exit both opened terminals nd end your VNC server session as described above.
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ## Tips and Tricks
    
    
    David Hrbáč's avatar
    David Hrbáč committed
    If you want to increase the responsibility of the visualization, please adjust your TurboVNC client settings in this way:
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ![rem_vis_settings](../img/turbovncclientsetting.png "rem_vis_settings")
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    David Hrbáč's avatar
    David Hrbáč committed
    To have an idea how the settings are affecting the resulting picture utility three levels of "JPEG image quality" are demonstrated:
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ** JPEG image quality = 30 **
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ![rem_vis_q3](../img/quality3.png "rem_vis_q3")
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ** JPEG image quality = 15 **
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ![rem_vis_q2](../img/quality2.png "rem_vis_q2")
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ** JPEG image quality = 10 **
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    ![rem_vis_q1](../img/quality1.png "rem_vis_q1")