Created
September 8, 2016 22:13
-
-
Save anonymous/66027c3399a6cea4eff35dd7247c6b60 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
if [ -z "$1" ]; then | |
keyspace=34359738368 | |
else | |
keyspace=$1 | |
fi | |
echo "Keyspace: $keyspace" | |
declare -a GPUNODES | |
# Enter in the GPU count per node seperated by spaces | |
GPUNODES=(8 8 4 4 4 4) | |
GPUTOTAL=$(IFS="+";bc<<<"${GPUNODES[*]}") | |
NODECOUNT="${#GPUNODES[@]}" | |
chunksize=$(($keyspace / $GPUTOTAL)) | |
skipcount=0 | |
nodecount=0 | |
echo "Chunk size: $chunksize" | |
echo "Node count: $NODECOUNT" | |
echo "" | |
for i in "${GPUNODES[@]}" | |
do | |
(( nodecount++ )) | |
#echo $nodecount $i | |
echo "Node $nodecount: -s $skipcount -l $(($chunksize * $i))" | |
skipcount=$(($skipcount + ($chunksize * $i))) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment