From ab69f339337683a6a57327ec2ab6fe30440d01ca Mon Sep 17 00:00:00 2001
From: Xuan Gu <xuan.gu@liu.se>
Date: Thu, 28 Sep 2023 14:11:56 +0000
Subject: [PATCH] Update 4 files

- /PyTorch/Segmentation/nnUNet/submit_benchmark_sbatch.sh
- /PyTorch/Segmentation/nnUNet/run_benchmark_single_node.sh
- /PyTorch/Segmentation/nnUNet/generate_benchmark_jobs.sh
- /PyTorch/Segmentation/nnUNet/submit_benchmark_jobs.sh
---
 ...n_benchmark_single_node.sh => generate_benchmark_jobs.sh} | 5 +----
 .../{submit_benchmark_sbatch.sh => submit_benchmark_jobs.sh} | 4 +++-
 2 files changed, 4 insertions(+), 5 deletions(-)
 rename PyTorch/Segmentation/nnUNet/{run_benchmark_single_node.sh => generate_benchmark_jobs.sh} (97%)
 rename PyTorch/Segmentation/nnUNet/{submit_benchmark_sbatch.sh => submit_benchmark_jobs.sh} (64%)

diff --git a/PyTorch/Segmentation/nnUNet/run_benchmark_single_node.sh b/PyTorch/Segmentation/nnUNet/generate_benchmark_jobs.sh
similarity index 97%
rename from PyTorch/Segmentation/nnUNet/run_benchmark_single_node.sh
rename to PyTorch/Segmentation/nnUNet/generate_benchmark_jobs.sh
index 485eff9..edd2c77 100644
--- a/PyTorch/Segmentation/nnUNet/run_benchmark_single_node.sh
+++ b/PyTorch/Segmentation/nnUNet/generate_benchmark_jobs.sh
@@ -22,7 +22,4 @@ cat <<EOT >  $SBATCH_DIR
 rm -f $WORK_DIR/results/$LOG_DIR
 apptainer exec --nv -B ${WORK_DIR}/data:/data -B ${WORK_DIR}/results:/results --pwd /workspace/nnunet_pyt $CONTAINER_DIR python scripts/benchmark.py --mode ${5} --gpus ${3} --dim ${1} --batch_size ${4} --amp --logname='$LOG_DIR'
 
-
-EOT
-
-sbatch $SBATCH_DIR
\ No newline at end of file
+EOT
\ No newline at end of file
diff --git a/PyTorch/Segmentation/nnUNet/submit_benchmark_sbatch.sh b/PyTorch/Segmentation/nnUNet/submit_benchmark_jobs.sh
similarity index 64%
rename from PyTorch/Segmentation/nnUNet/submit_benchmark_sbatch.sh
rename to PyTorch/Segmentation/nnUNet/submit_benchmark_jobs.sh
index a6958f9..52874a6 100644
--- a/PyTorch/Segmentation/nnUNet/submit_benchmark_sbatch.sh
+++ b/PyTorch/Segmentation/nnUNet/submit_benchmark_jobs.sh
@@ -13,7 +13,9 @@ for nodes in {1..1}; do
                 echo dim ${dim}, nodes ${nodes}, gpus ${gpus}, batch_size ${batch_size}, benchmark_mode ${benchmark_mode}
 
                 # For single node
-                bash $WORK_DIR/run_benchmark_single_node.sh ${dim} ${nodes} ${gpus} ${batch_size} ${benchmark_mode}
+                bash $WORK_DIR/generate_benchmark_jobs.sh ${dim} ${nodes} ${gpus} ${batch_size} ${benchmark_mode}
+                SBATCH_DIR=$WORK_DIR/sbatch_scripts/benchmark_${benchmark_mode}_dim${dim}_nodes${nodes}_gpus${gpus}_batchsize${batch_size}.sbatch
+                sbatch $SBATCH_DIR
                 sleep 1 
                 
             done
-- 
GitLab