AWS (Windows)

This guide will setup a Windows based AWS instance that can be used for Pre-Processing, Solving and Post-Post Processing.

Start Instance Config

  1. To setup Amazon EC2, follow the instructions here

  2. Login to AWS Management Console

  3. Open the Services -> EC2 link to display the dashboard

  4. Click Launch Instance

Step 1: Choose AMI

Select Microsoft Windows Server 2016 Base

Step 2: Choose an Instance Type

Scroll down to the Compute optimized instance types. Select the appropriate instance for your simulation. 16, 36, 72 core Compute Optimized instances are well suited for M-Star

Step 3: Configure Instance Details

If you will do post-processing on this instance, you should select Add GPU. Otherwise, click next.

Step 4: Add Storage

Increase the size of the Root volume. 500GB+.

Step 5: Add Tags

nothing to do here

Step 6: Configure Security Group

Create a rule with the following parameters:

  • Type: RDP

  • Protocol: TCP

  • Port Range: 3389

  • Source: My IP


Only use My IP as the Source for RDP connections

Step 7: Review Instance Launch

Double check your instance configuration.

Click Launch.

On the dialog box that pops up: * Select Create a new key pair * Name the key pair * Download Key pair (save it to your computer)

This key pair will be needed to connect to the instance

Click Launch Instances

Connecting to your instance

After about 5 minutes your instance should be ready.

  • Browse to the EC2 dashboard

  • Click Instances to show list of active instances

  • Right click on table row of instance to display Connect to your instance dialog box

  • Click Get Password

  • Browse to the key pair file (.pem) you downloaded

  • Password should be decrypted and displayed in the dialog box

  • Copy the login information (DNS, User Name, Password)

On your local PC:

  • Start up Remote Desktop Connection

  • Enter the DNS to connect

  • Accept the security window that may pop up (related to unknown certificates)

  • Enter user and password dialog

  • Connect to the machine

Setting up the instance

You should now be logged into the AWS instance via RDP as the Administrator user. You should now install the M-Star software as described in this manual.


To enable web browsing under windows server, you will need to open the Local Server configuration, and toggle the internet explorer setting

AWS (Multi-GPU)


This guide is meant for demonstration purposes only.

This guide will walk through how to setup a single AWS instance with multiple GPUs.

Before starting, it is recommended to have the following items ready:

  • AWS account

  • AWS subscription and quota capable of starting GPU instances such as p2.xlarge or better

  • SSH public key

  • SSH/SCP programs on local computer (eg. Putty/Winscp on windows)

  • M-Star license file (you may need to first obtain the MAC address of the instance before a license file will be issueed)

After finishing these steps, you will have a AWS GPU instance fully setup. The installation of the software will be done to the /usr/local folder for a system-wide installation.

Create a virtual machine

  • Go to the EC2 Dashboard

  • Launch Instance

  • Choose “Ubuntu Server 18.04 LTS (HVM), SSD Volume Type”. Click Select

  • Choose the Instance type: p2 or p3 instances are recommended. Click Next.

  • Configure Instance Details. (Setup as needed). Click Next.

  • Configure Add Storage

    • Setup Root device with 20GB

    • Click “Add New Volume”. Setup a data disk with the capacity you need for simulations. 100GB+

    • Click Next

  • Configure Tags. Setup as needed. Click Next.

  • Configure Security Group

    • Create or select a security group that has the following rule. This allows SSH traffic to the instance

      • Type: SSH

      • Source: Custom,

    • Click Review and Launch

  • Launch the instance

  • Proceed back to the instance dashboard

  • Wait for instance to come up

Install Software

  • SSH to the instance using the “ubuntu” username

  • Copy and paste the script shown below into a new file and execute it once. This script does the following:

    • Sets up the data disk you defined under the /data directory

    • Install CUDA

    • Install OpenMPI to /usr/local

  • Install M-Star CFD using the standard Linux instructions


  • This instance is configured open to the internet

  • Be aware of how storage volume persist after virtual machine termination

Ubuntu AWS Setup Script:


function add_disk () {


lsblk | grep -q $partname

if [ $? -eq 0 ]; then

echo "Existing partition found at $1, skipping fdisk, mkfs"


sudo fdisk $1 <<EOF


sudo mkfs.ext4 $partname
echo "$partname      $2   ext4    defaults        0 0" |sudo tee -a /etc/fstab
sudo mkdir -p $2
sudo mount -a
sudo chmod 777 $2



function install_cuda () {
sudo dpkg -i cuda-repo-ubuntu1804_10.1.105-1_amd64.deb
sudo apt-key adv --fetch-keys
sudo apt-get update
sudo apt-get install -y cuda vim nano git build-essential

function install_openmpi () {
sudo apt-get update
sudo apt-get install -y build-essential
tar xzf openmpi-3.1.3.tar.gz
mkdir openmpi-3.1.3-build
cd openmpi-3.1.3-build
../openmpi-3.1.3/configure --prefix=$INSTALL_PATH --with-cuda
make -j 4 && sudo make install
cd ..
sudo ldconfig

add_disk /dev/xvdb /data

# Now Install M-Star CFD using the standard Linux instructions