Skip to content
Snippets Groups Projects
Commit b47420dc authored by Xuan Gu's avatar Xuan Gu
Browse files

Update file benchmark_sbatch_submit.sh

parent 3fe7715e
No related branches found
No related tags found
No related merge requests found
...@@ -8,14 +8,14 @@ NUM_GPUS=$2 ...@@ -8,14 +8,14 @@ NUM_GPUS=$2
NUM_ITERATIONS=$3 NUM_ITERATIONS=$3
BATCH_SIZE=$4 BATCH_SIZE=$4
if [ $NUM_NODES -eq 1 ]; then if [ $NUM_NODES -eq 1 ]; then
for nodes in {1..1}; do for nodes in {1..$((NUM_NODES))}; do
for gpus in {1..$NUM_GPUS}; do for gpus in {1..$((NUM_GPUS))}; do
for batch_size in $BATCH_SIZE; do for batch_size in $((BATCH_SIZE)); do
for iteration in {1..$NUM_ITERATIONS}; do for iteration in {1..$((NUM_ITERATIONS))}; do
echo dim ${dim}, nodes ${nodes}, gpus ${gpus}, batch_size ${batch_size}, iteration ${iteration} echo dim ${dim}, nodes ${nodes}, gpus ${gpus}, batch_size ${batch_size}, iteration ${iteration}
# For single node # For single node
sbatch -o sbatch_out/benchmark_dim${dim}_nodes${nodes}_gpus${gpus}_batchsize${batch_size}_iteration${iteration}.out scripts/benchmark_single_node.sbatch ${dim} ${nodes} ${gpus} ${batch_size} ${iteration} #sbatch -o sbatch_out/benchmark_dim${dim}_nodes${nodes}_gpus${gpus}_batchsize${batch_size}_iteration${iteration}.out scripts/benchmark_single_node.sbatch ${dim} ${nodes} ${gpus} ${batch_size} ${iteration}
sleep 1 # pause to be kind to the scheduler sleep 1 # pause to be kind to the scheduler
...@@ -24,10 +24,10 @@ if [ $NUM_NODES -eq 1 ]; then ...@@ -24,10 +24,10 @@ if [ $NUM_NODES -eq 1 ]; then
done done
done done
else else
for nodes in {2..$NUM_NODES}; do for nodes in {2..$((NUM_NODES))}; do
for gpus in {$NUM_GPUS}; do for gpus in {$((NUM_GPUS))}; do
for batch_size in $BATCH_SIZE; do for batch_size in $((BATCH_SIZE)); do
for iteration in {1..$NUM_ITERATIONS}; do for iteration in {1..$((NUM_ITERATIONS))}; do
# For multi node # For multi node
sbatch -o sbatch_out/benchmark_dim${dim}_nodes${nodes}_gpus${gpus}_batchsize${batch_size}_iteration${iteration}.out scripts/benchmark_multi_node.sbatch ${dim} ${nodes} ${gpus} ${batch_size} ${iteration} sbatch -o sbatch_out/benchmark_dim${dim}_nodes${nodes}_gpus${gpus}_batchsize${batch_size}_iteration${iteration}.out scripts/benchmark_multi_node.sbatch ${dim} ${nodes} ${gpus} ${batch_size} ${iteration}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment