Skip to content
Snippets Groups Projects
submit_benchmark_jobs.sh 1.13 KiB
Newer Older
Xuan Gu's avatar
Xuan Gu committed
#!/bin/bash
set -e

Xuan Gu's avatar
Xuan Gu committed
WORK_DIR=/proj/nsc_testing/xuan/berzelius-benchmarks/NVIDIA/DeepLearningExamples/PyTorch/Segmentation/nnUNet
benchmark_modes=("train" "predict")
Xuan Gu's avatar
Xuan Gu committed
node_types=("thin" "fat")
Xuan Gu's avatar
Xuan Gu committed

dim=2
for nodes in {1..1}; do
Xuan Gu's avatar
Xuan Gu committed
    for gpus in {1..8}; do
        for benchmark_mode in "${benchmark_modes[@]}"; do
            for node_type in "${node_types[@]}"; do
Xuan Gu's avatar
Xuan Gu committed
        
Xuan Gu's avatar
Xuan Gu committed

                    if [ "${node_type}" = "thin" ]; then
                        batch_size=512
                        batch_size=1024
Xuan Gu's avatar
Xuan Gu committed
                    echo dim ${dim}, nodes ${nodes}, gpus ${gpus}, batch_size ${batch_size}, benchmark_mode ${benchmark_mode}, node_type ${node_type}
Xuan Gu's avatar
Xuan Gu committed

Xuan Gu's avatar
Xuan Gu committed
                    # For single node
                    bash $WORK_DIR/generate_benchmark_jobs.sh ${dim} ${nodes} ${gpus} ${batch_size} ${benchmark_mode} ${node_type}
                    SBATCH_DIR=$WORK_DIR/sbatch_scripts/benchmark_${node_type}_${benchmark_mode}_dim${dim}_nodes${nodes}_gpus${gpus}_batchsize_${batch_size}.sbatch
Xuan Gu's avatar
Xuan Gu committed
                    sbatch $SBATCH_DIR
                    sleep 180 
Xuan Gu's avatar
Xuan Gu committed
            done
        done
    done
done