Difference between revisions of "Rendering without display"

From ScientificComputing
Jump to: navigation, search
(Created page with "==Introduction== When rendering on a local computer, there is a display available which makes rendering a simple task, but how to render images on a remote HPC cluster, where...")
 
Line 1: Line 1:
 
==Introduction==
 
==Introduction==
When rendering on a local computer, there is a display available which makes rendering a simple task, but how to render images on a remote HPC cluster, where no displays are available for the
+
Rendering images on a remote HPC is slightly different from rendering images on your local computer, because the compute nodes in Euler don't have a display attached. The most suitable solution for  is, when the software itself provides offscreen rendering, but it can also be done using a virtual frame buffer.
 +
 
 +
==Offscreen rendering with OSMesag or EGL==
 +
Please find below some links that provide information about how to use OSMesa or EGL for offscreen rendering:
 +
 
 +
https://docs.mesa3d.org/osmesa.html
 +
https://blog.kitware.com/off-screen-rendering-through-the-native-platform-interface-egl/
 +
 
 +
==Virtual frame buffer==
 +
Xvfb is a virtual framebuffer that is part of the X11 libraries. It is installed on Euler as a part of the operating system. By prefixing the command with <tt>xvfb-run -a</tt> the rendering is done in a frame buffer:
 +
 +
bsub [LSF options] xvfb-run -a my_command_that_does_the_rendering
 +
 
 +
Please find below the available options for xvfb-run:
 +
 
 +
[sfux@eu-login-33 ~]$ xvfb-run --help
 +
Usage: xvfb-run [OPTION ...] COMMAND
 +
Run COMMAND (usually an X client) in a virtual X server environment.
 +
Options:
 +
-a        --auto-servernum          try to get a free server number, starting at
 +
                                    --server-num (deprecated, use --auto-display
 +
                                    instead)
 +
-d        --auto-display            use the X server to find a display number
 +
                                    automatically
 +
-e FILE  --error-file=FILE        file used to store xauth errors and Xvfb
 +
                                    output (default: /dev/null)
 +
-f FILE  --auth-file=FILE          file used to store auth cookie
 +
                                    (default: ./.Xauthority)
 +
-h        --help                    display this usage message and exit
 +
-n NUM    --server-num=NUM          server number to use (default: 99)
 +
-l        --listen-tcp              enable TCP port listening in the X server
 +
-p PROTO  --xauth-protocol=PROTO    X authority protocol name to use
 +
                                    (default: xauth command's default)
 +
-s ARGS  --server-args=ARGS        arguments (other than server number and
 +
                                    "-nolisten tcp") to pass to the Xvfb server
 +
                                    (default: "-screen 0 640x480x8")
 +
-w DELAY  --wait=DELAY              delay in seconds to wait for Xvfb to start
 +
                                    before running COMMAND (default: 3)
 +
[sfux@eu-login-33 ~]$

Revision as of 11:57, 22 November 2021

Introduction

Rendering images on a remote HPC is slightly different from rendering images on your local computer, because the compute nodes in Euler don't have a display attached. The most suitable solution for is, when the software itself provides offscreen rendering, but it can also be done using a virtual frame buffer.

Offscreen rendering with OSMesag or EGL

Please find below some links that provide information about how to use OSMesa or EGL for offscreen rendering:

https://docs.mesa3d.org/osmesa.html
https://blog.kitware.com/off-screen-rendering-through-the-native-platform-interface-egl/

Virtual frame buffer

Xvfb is a virtual framebuffer that is part of the X11 libraries. It is installed on Euler as a part of the operating system. By prefixing the command with xvfb-run -a the rendering is done in a frame buffer:

bsub [LSF options] xvfb-run -a my_command_that_does_the_rendering

Please find below the available options for xvfb-run:

[sfux@eu-login-33 ~]$ xvfb-run --help
Usage: xvfb-run [OPTION ...] COMMAND
Run COMMAND (usually an X client) in a virtual X server environment.
Options:
-a        --auto-servernum          try to get a free server number, starting at
                                    --server-num (deprecated, use --auto-display
                                    instead)
-d        --auto-display            use the X server to find a display number
                                    automatically
-e FILE   --error-file=FILE         file used to store xauth errors and Xvfb
                                    output (default: /dev/null)
-f FILE   --auth-file=FILE          file used to store auth cookie
                                    (default: ./.Xauthority)
-h        --help                    display this usage message and exit
-n NUM    --server-num=NUM          server number to use (default: 99)
-l        --listen-tcp              enable TCP port listening in the X server
-p PROTO  --xauth-protocol=PROTO    X authority protocol name to use
                                    (default: xauth command's default)
-s ARGS   --server-args=ARGS        arguments (other than server number and
                                    "-nolisten tcp") to pass to the Xvfb server
                                    (default: "-screen 0 640x480x8")
-w DELAY  --wait=DELAY              delay in seconds to wait for Xvfb to start
                                    before running COMMAND (default: 3)
[sfux@eu-login-33 ~]$