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.

To render graphics from geometry or solution data, Simcenter STAR-CCM+ must address several issues:
  1. Where to run the rendering process
  2. Which method to use in the rendering process
  3. How many threads to allocate when advanced rendering is activated
  4. 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)
The rendering process (renderer) can run within the client (interactive or batch), or can be launched separately by the server. Alternatively, you can choose to run a dedicated rendering process on a remote server that you specify. This dedicated rendering process can persist for multiple clients, or can be launched ad-hoc for a single client (and close when the client disconnects).
If you do not use the -rr argument when launching Simcenter STAR-CCM+, graphics rendering takes place within the Java Virtual Machine (interactive or batch). If you use -rr server then Simcenter STAR-CCM+ launches the renderer alongside the server on the same machine.
For extra information on remote rendering, see Additional Information on Remote Rendering below.
Method for Regular Rendering
Relevant command-line argument: -graphics / -rgraphics / -agraphics (see Command-Line Options for Renderer Location and Method below)
When the machine on which rendering occurs has dedicated graphics hardware available, Simcenter STAR-CCM+ uses the hardware by default. If multiple graphics cards are available, you can choose which one is used. If no graphics hardware exists, Simcenter STAR-CCM+ uses one of two Mesa graphics libraries for software-based rendering.
Threads for Advanced Rendering
Relevant command-line argument: -rrthreads / -arthreads (see Advanced Rendering Workflow)
When you activate advanced rendering, Simcenter STAR-CCM+ accepts an argument that sets the number of threads allocated to the advanced rendering process. Advanced rendering is always a software-based computation that runs on either the local client or in a separate rendering service.
Select Specific GPU (Linux only)
Relevant command-line argument: -rgpu or -agpu (see Working with Multiple GPUs)
On a Linux system with more than one GPU, each instance of Simcenter STAR-CCM+ can leverage a different GPU, significantly improving rendering performance in such an environment. To activate this graphics capability, use the command line option -rgpu <option>, which applies to a local interactive or batch session or when rendering on a remote server.

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>
  • auto — (default) prefers supported native OpenGL over Mesa OpenGL; this option has the same effect as not using any graphics option.
  • egl — enforces native OpenGL on EGL (Only available for server-side and remote rendering on Linux)
  • native — enforces native OpenGL
  • mesa — enforces Mesa OpenGL; uses the legacy Mesa graphics driver LLVMpipe.
  • mesa_swr — enforces the OpenSWR Mesa driver which gives better performance than the legacy option. This option requires AVX CPU instruction set support (all CPUs released after 2012 support this instruction set).
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 some circumstances you can improve computational performance by running the renderer on a different host to the server. Typically, the machine on which you run the renderer is one that has a lot of main memory and powerful graphics hardware. Examples of when this option is appropriate are:
  • 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.
Two options are provided for remote rendering:
  • 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.
Certain conditions must be met in order for the adhoc method to work.
  • 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 in single 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 is service.
  • -rgraphics \{auto, egl, native, mesa, mesa_swr\}—specifies whether native (hardware-accelerated) OpenGL or software-based (Mesa) rendering should be used. The egl option allows for GPU-accelerated rendering without a running an X-session (for example, using an ssh session). The auto option tries to determine the best possible setting automatically and is the default. The mesa_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 is 1.

Once launched, the service prints out host and port information which you use when configuring another client to use this rendering service.

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.
To close a dedicated renderer:
  • On Windows, use the Task Manager.
  • On Linux, use the kill command.
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.

NoteUsing 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.