🤖
Machine Learning Workstation
  • Main page
  • Connection
    • Connection through VPN
  • Usage
    • Python/Conda
    • Edge Impulse
    • Common packages
    • Tmux (persistent sessions)
    • Sharing code base
    • GPU usage
  • Data transfer
    • To or from the host machine
    • To or from the Internet
  • Useful links
    • Linux
    • Python
    • Machine Learning
      • Classifiers
      • Natural Language Processing
      • Unsupervised Learning
      • Data Generation
      • Autoencoders
    • Evaluating Neural Networks
    • Recurrent Neural Network
  • Administration
    • Introduction
      • TLJH mamba/pip installations for ALL users
      • TLJH: IDLE-CULLER - Disabled TODO need a sane value
      • Allowing user to log in to your JupyterHub without server user name
    • Connect to the machine via SSH
      • Add SSH Keys
      • Port forwarding
      • X forwarding (running software with GUI)
      • Run Jupyter remotely
    • Managing users
    • System maintenance
    • Other tasks
Powered by GitBook
On this page
  • Available GPUs
  • Specify device
  • Check usage

Was this helpful?

  1. Usage

GPU usage

This page contains information on the high-performance GPUs mounted on the workstation.

Available GPUs

The workstation is equipped with three Nvidia TITAN X Pascal graphics cards, to be used for computing purposes, and one Nvidia GeForce GT 710 used as graphics adapter.

Specify device

From a python script, your can set the GPU(s) seen by the cuda drivers. Add the following lines:

import os

os.environ['CUDA_VISIBLE_DEVICES']='<DEVICE_LIST>'

Please note: <DEVICE_LIST> can be 0, 2, or 3. You can specify a different value for each of your scripts, and they will run on different GPUs. It is recommended to always manually set this variable, otherwise the script will end up reserving all the GPUs, even if they won't be used.

Check usage

In order to check which GPUs are currently in use, and which processes are using them, you can run the following command:

nvidia-smi

Here's an example output of the command above:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.130                Driver Version: 384.130                   |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GT 710      Off  | 00000000:02:00.0 N/A |                  N/A |
| N/A   33C    P0    N/A /  N/A |      0MiB /  2000MiB |     N/A      Default |
+-------------------------------+----------------------+----------------------+
|   1  TITAN X (Pascal)    Off  | 00000000:03:00.0 Off |                  N/A |
| 25%   44C    P0    57W / 250W |      0MiB / 12189MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
|   2  TITAN X (Pascal)    Off  | 00000000:82:00.0 Off |                  N/A |
| 26%   45C    P0    54W / 250W |      0MiB / 12189MiB |      2%      Default |
+-------------------------------+----------------------+----------------------+
|   3  TITAN X (Pascal)    Off  | 00000000:83:00.0 Off |                  N/A |
| 23%   36C    P8    10W / 250W |  11761MiB / 12189MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0                    Not Supported                                       |
|    3      6428      C   ...18/miniconda3/envs/denoising/bin/python 11751MiB |
+-----------------------------------------------------------------------------+

In this case, only one GPU is in use (namely, the #3) which can be deducted from the Memory-Usage column. At the bottom, you can find the process identifier of what's using the GPU, in the PID column (6428).

To obtain more information about the process:

ps aux | grep <PID>

If the process has been executed by you, you can attempt at terminating it:

kill <PID>
PreviousSharing code baseNextTo or from the host machine

Last updated 3 years ago

Was this helpful?