You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The following guide shows you how to spawn a GPU-instance in skyhigh. There are GPU's available within some of our openstack-clouds, and access are given by request (we do not have GPU's for all projects unfortunatley).

GPU Flavors

Currently we have the following GPU's available:

  • At SkyHiGh (IIK's production instance):
    • gpu.v100.8G: A flavor with 90GB RAM, 8 vCPU's and a 1/4 of a Tesla v100 (8GB GPU-RAM).
  • At SkyLow (IIK's development instance):
    • gpu.m10.8G: A flavor with 20GB RAM, 8 vCPU's and one core of a Tesla m10 card (8GB GPU-RAM).

GPU-enabled images

We provide images with pre-installed Nvidia driver and CUDA package. These images contains the word "GRID" in their names and are regular ubuntu/centOS images with the following additions:

  • There is a script which installs the correct version of the Nvidia GRID driver at boot. After a driver-update on the hypervisor this script will also update the driver in the VM.
  • The CUDA-tools are pre-installed.

The installation of the drivers requires a restart; så the newly created instance will reboot shortly after creation.

Starting a GPU-instance

To start a GPU-enabled instance you simply create a VM as you usually would, but make sure to select:

  • a GPU-enabled flavor
  • a GRID-enabled image

After creating the VM it will boot, install the GRID-driver, and then reboot. So, do not be supprised if you suddenly loose access to your freshly booted machine. It will come back! (tongue)

Verify the GPU instance

After installation the presence of a GPU can be verified with lspci:

ubuntu@gputest:~$ lspci | grep NVIDIA
00:05.0 VGA compatible controller: NVIDIA Corporation GV100GL [Tesla V100 PCIe 32GB] (rev a1)

You can also verify that a license for the GPU is acquired successfully (yes, we need licences to use our GPUs...):

ubuntu@gputest:~$ journalctl -u nvidia-gridd | tail
 ....
Jun 30 08:37:14 gputest nvidia-gridd[1159]: Acquiring license for GRID vGPU Edition.
Jun 30 08:37:14 gputest nvidia-gridd[1159]: Calling load_byte_array(tra)
Jun 30 08:37:17 gputest nvidia-gridd[1159]: License acquired successfully. (Info: http://openstack-nvidia.lisens.ntnu.no:7070/request; Quadro-Virtual-DWS,5.0)

The "nvidia-smi" tool will show you the GPU status

ubuntu@gputest:~$ nvidia-smi
Tue Jun 30 08:57:13 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.130      Driver Version: 418.130      CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GRID V100D-8Q       On   | 00000000:00:05.0 Off |                  N/A |
| N/A   N/A    P0    N/A /  N/A |    528MiB /  8192MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

There are some CUDA-tools installed in /root of your VM that can be used to test that the GPU works. For instance you could do like so:

ubuntu@gputest:~$ sudo su -
root@gputest:~# cd NVIDIA_CUDA-10.1_Samples/1_Utilities/deviceQuery
root@gputest:~/NVIDIA_CUDA-10.1_Samples/1_Utilities/deviceQuery# make
 ... lots-of-text-from-make ...
root@gputest:~/NVIDIA_CUDA-10.1_Samples/1_Utilities/deviceQuery# ./deviceQuery 
./deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)

Device 0: "GRID V100D-8Q"
  CUDA Driver Version / Runtime Version          10.1 / 10.1
  CUDA Capability Major/Minor version number:    7.0
  Total amount of global memory:                 8192 MBytes (8589934592 bytes)
  (80) Multiprocessors, ( 64) CUDA Cores/MP:     5120 CUDA Cores
  GPU Max Clock rate:                            1380 MHz (1.38 GHz)
  Memory Clock rate:                             877 Mhz
  Memory Bus Width:                              4096-bit
  L2 Cache Size:                                 6291456 bytes
  Maximum Texture Dimension Size (x,y,z)         1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384)
  Maximum Layered 1D Texture Size, (num) layers  1D=(32768), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(32768, 32768), 2048 layers
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       49152 bytes
  Total number of registers available per block: 65536
  Warp size:                                     32
  Maximum number of threads per multiprocessor:  2048
  Maximum number of threads per block:           1024
  Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
  Max dimension size of a grid size    (x,y,z): (2147483647, 65535, 65535)
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             512 bytes
  Concurrent copy and kernel execution:          Yes with 7 copy engine(s)
  Run time limit on kernels:                     No
  Integrated GPU sharing Host Memory:            No
  Support host page-locked memory mapping:       Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support:                        Disabled
  Device supports Unified Addressing (UVA):      Yes
  Device supports Compute Preemption:            Yes
  Supports Cooperative Kernel Launch:            Yes
  Supports MultiDevice Co-op Kernel Launch:      Yes
  Device PCI Domain ID / Bus ID / location ID:   0 / 0 / 5
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 10.1, CUDA Runtime Version = 10.1, NumDevs = 1
Result = PASS

If the output results in a "PASS" you should be fine. The GPU is then ready to use.

  • No labels