Rendering Graphics Locally and Remotely
By default, when you launch a Simcenter STAR-CCM+ server from a batch or interactive client on the same local machine, Simcenter STAR-CCM+ renders graphics in the client using the local graphics resources. Alternative rendering options are provided that provide better performance in different circumstances, including standalone rendering processes.
- Where to run the rendering process
- Which method to use in the rendering process
- How many threads to allocate when advanced rendering is activated
- Which GPU to use if more than one is available (Linux only)
- Location of Rendering Process
- Relevant command-line argument:
-rr
(see Command-Line Options for Renderer Location and Method below) - Method for Regular Rendering
- Relevant command-line argument:
-graphics
/-rgraphics
/-agraphics
(see Command-Line Options for Renderer Location and Method below) - Threads for Advanced Rendering
- Relevant command-line argument:
-rrthreads
/-arthreads
(see Advanced Rendering Workflow) - Select Specific GPU (Linux only)
- Relevant command-line argument:
-rgpu
or-agpu
(see Working with Multiple GPUs)
Command-Line Options for Renderer Location and Method
The location of the rendering process is set on the command line for launching the Simcenter STAR-CCM+ server using the -rr
argument. Options that you supply to the -rr
argument determine the location.
The method used for rendering graphics is also set on the Simcenter STAR-CCM+ using one of three arguments: -graphics
, -rgraphics
, or -agraphics
(depending on the location).
Renderer Location | -rr specification | Description | Method Selector | Method Choices |
---|---|---|---|---|
Client-side (Java VM) | Not used | When you do not use the -rr parameter on launching a server, Simcenter STAR-CCM+ runs the renderer process within the Java Virtual Machine. |
-graphics <option> |
|
Server-side | -rr server |
Runs the renderer on the server rather than within the client (server-side rendering). In practice this means that the server spawns the renderer as a companion process on the same machine. | -rgraphics <option> |
|
Adhoc remote rendering | -rr <hostname> |
Launches an adhoc renderer for your server on the host specified by hostname. When the server ends, the adhoc renderer also ends. | -agraphics <option> |
|
Dedicated remote rendering | -rr <hostname>:<port> |
Connects to a renderer already running on <hostname> at the specified <port> . For this option to work, you must first launch a renderer manually on <hostname> using the starrenderer command. The starrenderer command returns the <hostname>:<port> string that you need. |
-rgraphics <option> |
Additional Information on Remote Rendering
- In a batch run on a cluster, you can allocate one CPU for rendering and use the other CPUs for solving the simulation.
- In an interactive run on a machine with no graphics card, you can request rendering on a different machine that has hardware available.
- Dedicated renderer: you launch the renderer manually on the remote machine and record the port number that the process returns (for use in launching the main Simcenter STAR-CCM+ simulation
- Adhoc renderer: when you launch the main simulation you specify a remote host and let Simcenter STAR-CCM+ launch the renderer dynamically on the host in an adhoc manner. The lifetime of the remote renderer is the same as the main Simcenter STAR-CCM+ server that launched it. When the Simcenter STAR-CCM+ session exits, so does the renderer.
- The main simulation server must be able to access the remote renderer machine using SSH with no password
- The server machine and the renderer machine must share the filesystem that contains the Simcenter STAR-CCM+ installation.
- There must be no firewall interfering with the communication of the client-server and renderer processes.
A typical use case for adhoc rendering is a Linux cluster that includes a visualization node with a GPU and plenty of memory. Users of this cluster can add -rr [hostname_of_visualization_node]
to the arguments of their Simcenter STAR-CCM+ job submissions. This approach has two major advantages:
- Any hardcopies generated during the run are produced by the (hardware accelerated) visualization node. This allows you to generate many more hardcopies at high resolutions without slowing the solver.
- All the memory needed to generate the hardcopies is moved off the machine running
rank0
and onto the visualization node (which often has more than enough memory). This makes the memory consumption more homogenous in the cluster, leading to better utilization and allowing larger jobs to be executed on the same number of compute nodes.
- Launch Command for a Dedicated Renderer
-
- On Windows:
[INSTALLDIR]\star\bin\starrenderer.bat
- On Linux:
[INSTALLDIR]/star/bin/starrenderer
Accepted command line arguments are:
-mode \{service, single\}
—specifies whether the service accepts only a single client or multiple clients. When insingle
mode the process shuts down once a client has connected and disconnected or a five minute timeout has passed without any client connecting. The default mode isservice
.-rgraphics \{auto, egl, native, mesa, mesa_swr\}
—specifies whether native (hardware-accelerated) OpenGL or software-based (Mesa) rendering should be used. Theegl
option allows for GPU-accelerated rendering without a running an X-session (for example, using an ssh session). Theauto
option tries to determine the best possible setting automatically and is the default. Themesa_swr
option typically results in better performance when you must resort to software-based rendering.-rrthreads RRTHREADS
—sets the number of CPUs used for software based rendering (Mesa/advanced rendering) to RRTHREADS. The default is1
.
Once launched, the service prints out host and port information which you use when configuring another client to use this rendering service.
- On Windows:
- Checking for Remote Rendering
- To check whether remote rendering is in use for a Simcenter STAR-CCM+ session, use the graphics report of a scene:
- Right-click the scene node, or in the scene display, and select Report.
The graphics report appears in a separate tab in the Output window. If the report ends with
***Report generated remotely***
, remote rendering is active. - Ending a Remote Rendering Process
- If you launched the remote rendering process in single mode then it exists automatically after one Simcenter STAR-CCM+ session has used it. Similarly, and adhoc renderer opens and exists without you doing anything.
- Using Remote Rendering Without the Command Line
- In the dialog set the Rendering drop-down list to:
- Dedicated Service—allows you to select a host and port on which a rendering service is already running. The host and port information is displayed when you start the rendering service on the remote machine using
starrenderer
.If you know the host but not the port number, you can enter the hostname in Host, then click Scan. Any available rendering services appear in a drop-down list of ports in the Port field.
- Dedicated Service—allows you to select a host and port on which a rendering service is already running. The host and port information is displayed when you start the rendering service on the remote machine using
Note | Using remote rendering can lead to contention on the machine that hosts the server if the sum of the number of threads specified using -rrthreads (defaults to 1 ) and the number of server processes specified via -np (defaults to 1 ) is larger than the number of available CPU resources. For example, running a Simcenter STAR-CCM+ server with the options -np 12 -rrthreads 6 on a machine with 12 CPUs can affect solver and remote rendering performance negatively. This resource allocation is especially critical when advanced rendering is enabled in a scene and remote rendering is being used while the server is iterating a solution. |