Remote Visualization (NICE DCV)

NICE DCV on Linux

M-Star Post has been tested and verified to work under these environments –

  • NICE DCV 2020.0 (r8428) + NVidia 418.181 + Centos 7

  • NICE DCV 2020.2 (r9662) + NVidia 460.32 + Centos 7

  • NICE DCV 2020.2 (r9662) + NVidia 450.89 + Amazon Linux 2

NICE DCV Linux Quick Start AWS

This guide will use the ready to use the AWS AMI image “NICE DCV for Amazon Linux 2” to quick setup and run DCV.

Note

Note that this is intended for running M-Star Post only

  1. Create a new IAM Role called “DCVLicenseAccess”. Replace “us-east-1” with the region you are using

    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Effect": "Allow",
                "Action": "s3:GetObject",
                "Resource": "arn:aws:s3:::dcv-license.us-east-1/*"
            }
        ]
    }
    
  2. In the EC2 Panel, Launch a new AWS instance

  3. Search for “nice dcv” in the AMI page

  4. Select NICE DCV for Amazon Linux 2

  5. Select a g3s.xlarge instance type, or something from the g3 or g4dn instance family. Click Next.

  6. Select the DCVLicenseAccess IAM Role. Click Next

  7. Add some working storage. 100GB. click Next.

  8. Nothing to do on the Tags page. Click Next.

  9. Configure Security group

    Note

    Note this is for testing only. Your instance needs SSH and port 8443 access for DCV to work

    1. Allow SSH – Source = My IP

    2. Allow Custom TCP Rule – Port 8443 – Source = My IP

  10. Review and Launch. Click Next to launch the instance.

  11. SSH to the instance. The user name is “ec2-user”

  12. Change your password:

    sudo passwd ec2-user
    
  13. Create a DCV virtual session:

    sudo dcv create-session test --owner ec2-user
    

Now on your local PC –

  1. Download/install the NICE DCV Client (latest available)

  2. Open the Client

  3. Enter the IP address, click Connect

  4. Click Trust

  5. Enter login information, username “ec2-user”, and the password you just set

  6. You should now see DCV show up

  7. For further instructions to test M-Star Post, see the section – NICE DCV client connection test

NICE DCV Linux Manual Installation

This guide demonstrates how NICE DCV can be setup to work with M-Star CFD. These instructions will setup a Centos 7 machine with DCV.

Reference material –

Operating conditions –

  • Centos 7 base install

  • NVidia Tesla M60 GPU

Setup the prerequisites for DCV according to the documentation:

sudo yum groupinstall "GNOME Desktop"
sudo reboot

Disable Wayland in the gdm config:

# edit /etc/gdm/custom.conf
[daemon]
WaylandEnable=false

Restart GDM:

sudo systemctl restart gdm

Set graphical startup environment:

sudo systemctl set-default graphical.target
sudo systemctl isolate graphical.target

Install GLX Utils:

sudo yum install glx-utils

Install NVidia Drivers:

sudo yum install -y tar bzip2 make automake gcc gcc-c++ pciutils elfutils-libelf-devel libglvnd-devel iptables firewalld vim bind-utils wget
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
distribution=rhel7
ARCH=$( /bin/arch )
sudo yum-config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/repos/$distribution/${ARCH}/cuda-$distribution.repo
sudo yum install -y kernel-devel kernel-headers
sudo yum clean expire-cache

# Install the driver. You can select a different driver if needed, eg. "nvidia-driver-branch-418".
# Otherwise this command just installs the latest, which is what you usually want.
# This command will take a few minutes to complete
sudo yum install -y nvidia-driver-latest-dkms
sudo reboot

# update xorg.conf
sudo nvidia-xconfig --preserve-busid --enable-all-gpus
sudo systemctl isolate graphical.target

Install NICE DCV:

sudo rpm --import https://d1uj6qtbmh3dt5.cloudfront.net/NICE-GPG-KEY

# Download the DCV package from http://download.nice-dcv.com/
wget https://d1uj6qtbmh3dt5.cloudfront.net/2020.2/Servers/nice-dcv-2020.2-9662-el7-x86_64.tgz
tar xzf nice-dcv-2020.2-9662-el7-x86_64.tgz
cd nice-dcv-2020.2-9662-el7-x86_64

# Install base server
sudo yum install nice-dcv-server-2020.2.9662-1.el7.x86_64.rpm

# Install virtual sessions
sudo yum install nice-xdcv-2020.2.359-1.el7.x86_64.rpm

# Install GPU sharing
sudo yum install nice-dcv-gl-2020.2.881-1.el7.x86_64.rpm

# Setup DCV service
sudo systemctl start dcvserver
sudo systemctl enable dcvserver

Setup DCV config. You can refer to our sample DCV config here – Sample DCV Config . This particular config has no authentication methods and creates a default console session so we don’t need manage virtual sessions separately. This is only meant for testing purposes. You should customize this configuration according to your own production environment needs. Be sure to restart the DCV server after making configuration changes.

Setup your DCV license. Please refer to the DCV documentation for further instructions related to license setup.

Verify your firewall allows traffic for TCP on port 8443. You can also disable the firewalld service entirely by running:

sudo systemctl stop firewalld
sudo systemctl disable firewalld

Tip

After all these steps you might need reboot the server

NICE DCV client connection test

  1. Now on your local PC, install the corrosponding DCV client program that matches the server version you installed. https://download.nice-dcv.com/

  2. Open the DCV Client program and enter the IP address or host name of the server

  3. When the desktop opens up, open a command terminal.

  4. Download and extract M-Star CFD –

    cd
    wget https://cdn.mstarcfd.com/2.11.11/mstarcfd-2.11.11-oracle7_openmpi-3.1.tar.gz
    mkdir 2.11.11
    cd 2.11.11
    tar xzf ../mstarcfd-2.11.11-oracle7_openmpi-3.1.tar.gz
    
  5. Browse to the M-Star install directory and start up M-Star Post:

    cd ~/2.11.11
    source mstar.sh
    MStarPost
    
  6. You should see the M-Star Post GUI Start Up

../_images/dcv-mstarpost-blank.PNG
  1. If you do not see the Data Tree panel, you can enable it in with the View - Data Tree menu toggle

  2. Close M-Star Post

  3. The remaining instructions will test loading in some sample results into M-Star Post

  4. Download sample case result data and extract the files:

    # Sample case results of ~10s simulation time of the agitated case example at default resolution
    wget https://cdn.mstarcfd.com/share/quick-test.zip
    unzip quick-test.zip
    
  5. Open M-Star Post again

  6. Click the Open button

  7. Browse to quick-test directory

  8. Select the “out” directory and click OK

  9. M-Star Post will load the data and display it

  10. Click the Play button to animate the data

  11. Interact with the 3D view by Left click + Drag

../_images/dcv-mstarpost-caseloaded.PNG