-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:casys-kaist/glet into main
- Loading branch information
Showing
2 changed files
with
11 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
#!/bin/bash | ||
if [ -z "$1" ] | ||
then | ||
echo "number of GPUs not given " | ||
exit | ||
echo "Number of GPUs not given! The sript will use nvidia-smi to detect number of GPUs " | ||
NUM=$(nvidia-smi --query-gpu=name --format=csv,noheader | wc -l) | ||
|
||
else | ||
NUM=$1 | ||
NUM=$((NUM-1)) | ||
fi | ||
|
||
NUM=$((NUM-1)) | ||
|
||
pkill proxy # for killing proxy servers remaining in the system | ||
for i in `seq 0 $NUM` | ||
do | ||
sudo nvidia-smi -i $i -c DEFAULT | ||
done | ||
echo quit | nvidia-cuda-mps-control | ||
|
||
echo "MPS shutdown complete" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters