Skip to content

Instantly share code, notes, and snippets.

@AymenFJA
Created May 5, 2020 20:54
Show Gist options
  • Save AymenFJA/54598abbb3da316bf5b1614faae6ac8b to your computer and use it in GitHub Desktop.
Save AymenFJA/54598abbb3da316bf5b1614faae6ac8b to your computer and use it in GitHub Desktop.
#!/bin/bash
# Stop the MPS control daemon for each GPU and clean up /tmp
NGPUS=2 # Number of gpus with compute_capability 3.5 per server
for ((i=0; i< $NGPUS; i++))
do
echo $i
export CUDA_MPS_PIPE_DIRECTORY=/home/aymen/mps_$i
echo "quit" | nvidia-cuda-mps-control
rm -rf /home/aymen/mps_$i
rm -rf /home/aymen/mps_log_$i
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment