Skip to content

Instantly share code, notes, and snippets.

@AymenFJA
Created May 5, 2020 20:32
Show Gist options
  • Save AymenFJA/2dc52f02a503d53401b2e74f7439b252 to your computer and use it in GitHub Desktop.
Save AymenFJA/2dc52f02a503d53401b2e74f7439b252 to your computer and use it in GitHub Desktop.
#!/bin/bash
NGPUS=2 # Number of gpus with compute_capability 3.5 per server
# Start the MPS server for each GPU
for ((i=0; i< $NGPUS; i++))
do
mkdir /home/aymen/mps_$i
mkdir /home/aymen/mps_log_$i
export CUDA_VISIBLE_DEVICES=$i
export CUDA_MPS_PIPE_DIRECTORY=/home/aymen/mps_$i
export CUDA_MPS_LOG_DIRECTORY=/home/aymen/mps_log_$i
nvidia-cuda-mps-control -d
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment