Azure (Multi-GPU)ΒΆ
This guide will walk through how to setup a single Azure instance with multiple GPUs. This guide is meant for testing purposes only.
Before starting, it is recommended to have the following items ready:
Azure account
Azure subscription and quota capable of starting GPU instances such as NC12 or better
SSH public key
SSH/SCP programs on local computer (eg. Putty/Winscp on windows)
M-Star license file
The basic tasks that need to be completed:
Start up a VM with GPU hardware
Install CUDA
Install OpenMPI
Install M-Star CFD
Run test case
Additional resources -
M-Star README file documentation
Create a virtual machine
Go to the azure portal to start the creation of a new virtual machine and fill out the form as follows. Some options may be different for you.
Subscription: Pay-As-You-Go (your choices may be different)
Resource group: Testing (your choices may be different)
Virtual machine name: testing
Image: Ubuntu 18.04
Size: Standard NC12 Select a multi-GPU node from the series NC, NCv2, or NCv3
Authentication Type: SSH public key
Username: test
SSH public key: (Paste your SSH public key here)
Public inbound ports: Allow selected ports
Select inbound ports: SSH
Click Review and create.
Click Create.
SSH to the new virtual machine.
CUDA
Install CUDA:
# Download CUDA 10.1 from here - https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1804&target_type=debnetwork
# Choose Linux - x86_64 - Ubuntu - 18.04 - deb (network)
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.1.105-1_amd64.deb
# Next few commands require root
sudo dpkg -i cuda-repo-ubuntu1804_10.1.105-1_amd64.deb
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
sudo apt-get update
sudo apt-get install cuda
OpenMPI
Download and install openmpi:
cd $HOME
wget https://download.open-mpi.org/release/open-mpi/v3.1/openmpi-3.1.3.tar.gz
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=$HOME/openmpi-3.1.3-install --with-cuda
make -j 10 && make install
The following commands may be put into a ~/openmpi.sh file that you can source as needed:
export PATH=$HOME/openmpi-3.1.3-install/bin:$PATH
export LD_LIBRARY_PATH=$HOME/openmpi-3.1.3-install/lib:$LD_LIBRARY_PATH
M-Star CFD
Download the Centos 7 package and extract the files (Yes the Centos7 package should work okay on Ubuntu so long as you do not run any GUI programs).
Upload your license file to a new file
~/mstarcfd/bin/license.lic
Setup your environment:
source ~/openmpi.sh source ~/mstarcfd/mstar.sh
Upload a test case to ~/test and run it on multiple GPU:
mpirun -np 2 mstar-cfd-mgpu -i input.xml -o out --gpu-auto