Added partition argument to mpibench script
This commit is contained in:
@@ -3,10 +3,13 @@
|
|||||||
#defaults
|
#defaults
|
||||||
default_num_procs=8
|
default_num_procs=8
|
||||||
default_num_nodes=2
|
default_num_nodes=2
|
||||||
|
default_partition=gpu
|
||||||
|
|
||||||
num_procs=$default_num_procs
|
num_procs=$default_num_procs
|
||||||
num_nodes=$default_num_nodes
|
num_nodes=$default_num_nodes
|
||||||
|
|
||||||
|
partition=$default_partition
|
||||||
|
|
||||||
script_name=$0
|
script_name=$0
|
||||||
|
|
||||||
print_usage(){
|
print_usage(){
|
||||||
@@ -19,6 +22,8 @@ print_usage(){
|
|||||||
echo " number of tasks for slurm, default=$default_num_procs"
|
echo " number of tasks for slurm, default=$default_num_procs"
|
||||||
echo " -N <num_nodes>"
|
echo " -N <num_nodes>"
|
||||||
echo " number of nodes for slurm, default=$default_num_nodes"
|
echo " number of nodes for slurm, default=$default_num_nodes"
|
||||||
|
echo " -p <partition>"
|
||||||
|
echo " which partition to use for slurm, default=$default_partition"
|
||||||
echo " -t <tag>"
|
echo " -t <tag>"
|
||||||
echo " A benchmark tag that will be added to the mpi_reduction_benchmark.csv file"
|
echo " A benchmark tag that will be added to the mpi_reduction_benchmark.csv file"
|
||||||
echo " By default the current git HEAD short hash will be used as a tag"
|
echo " By default the current git HEAD short hash will be used as a tag"
|
||||||
@@ -28,7 +33,7 @@ print_usage(){
|
|||||||
echo " Print this message"
|
echo " Print this message"
|
||||||
}
|
}
|
||||||
|
|
||||||
while getopts :n:N:t:ih opt
|
while getopts :n:N:t:p:ih opt
|
||||||
do
|
do
|
||||||
case "$opt" in
|
case "$opt" in
|
||||||
n)
|
n)
|
||||||
@@ -43,6 +48,9 @@ do
|
|||||||
i)
|
i)
|
||||||
interactively=1
|
interactively=1
|
||||||
;;
|
;;
|
||||||
|
p)
|
||||||
|
partition=$OPTARG
|
||||||
|
;;
|
||||||
h)
|
h)
|
||||||
print_usage
|
print_usage
|
||||||
exit 0
|
exit 0
|
||||||
@@ -67,12 +75,12 @@ sbatch <<EOF
|
|||||||
#SBATCH --account=project_2000403
|
#SBATCH --account=project_2000403
|
||||||
#SBATCH --time=00:14:59
|
#SBATCH --time=00:14:59
|
||||||
#SBATCH --mem=48000
|
#SBATCH --mem=48000
|
||||||
#SBATCH --partition=gpu
|
#SBATCH --partition=${partition}
|
||||||
#SBATCH --gres=gpu:v100:4
|
#SBATCH --gres=gpu:v100:4
|
||||||
#SBATCH -n ${num_procs}
|
#SBATCH -n ${num_procs}
|
||||||
#SBATCH -N ${num_nodes}
|
#SBATCH -N ${num_nodes}
|
||||||
srun ./mpi_reduce_bench ${benchmark_label}
|
srun ./mpi_reduce_bench ${benchmark_label}
|
||||||
EOF
|
EOF
|
||||||
else
|
else
|
||||||
srun --account=project_2000403 --gres=gpu:v100:4 --mem=48000 -t 00:14:59 -p gpu -n ${num_procs} -N ${num_nodes} ./mpi_reduce_bench ${benchmark_label}
|
srun --account=project_2000403 --gres=gpu:v100:4 --mem=48000 -t 00:14:59 -p ${partition} -n ${num_procs} -N ${num_nodes} ./mpi_reduce_bench ${benchmark_label}
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user