Loading Benchmark/run_mpi_benchmark.sh 0 → 100755 +47 −0 Original line number Diff line number Diff line #!/bin/bash #SBATCH --job-name=mpi-grid # job name (default is the name of this file) #SBATCH --output=log.%x.job_%j # file name for stdout/stderr (%x will be replaced with the job name, %j with the jobid) #SBATCH --partition=gpXY # partition/queue name for the job submission #SBATCH --nodes=4 # number of nodes #SBATCH --ntasks-per-node=2 # MPI processes per node #SBATCH --threads-per-core=1 # do not use hyperthreads (i.e. CPUs = physical cores below) #SBATCH --cpus-per-task=2 # number of CPUs per process #SBATCH --gpus-per-task=0 # number of GPUs per process #SBATCH --gpu-bind=single:1 # bind each process to its own GPU (single:<tasks_per_gpu>) # how much RAM per node can be allocated for the job (default: 2G, max: 60G) #SBATCH --mem=10G # start the job in the directory it was submitted from cd "$SLURM_SUBMIT_DIR" # Stop on error set -e USAGE="Usage: ./script <bin> <instances_dir> <result_csv>" if [ $# -ne 3 ]; then echo $USAGE exit 1 fi BIN="$1" INSTANCES_DIR="$2" RESULT_CSV="$3" run_benchmark() { local instance="$1" srun $BIN "$INSTANCES_DIR/$instance" >> $RESULT_CSV } echo "REFINES;INSIDE;OUTSIDE;SEQ;AVG;BEST;WORST" > $RESULT_CSV for instance in $(ls -A1 $INSTANCES_DIR | sort -t '-' -k5n ); do run_benchmark "$instance" done No newline at end of file Benchmark/run_seq_benchmark.sh +12 −0 Original line number Diff line number Diff line #!/bin/bash #SBATCH --job-name=seq-grid # job name (default is the name of this file) #SBATCH --output=log.%x.job_%j # file name for stdout/stderr (%x will be replaced with the job name, %j with the jobid) #SBATCH --partition=gpXY # partition/queue name for the job submission #SBATCH --ntasks=1 # number of tasks/processes # how much RAM per node can be allocated for the job (default: 2G, max: 60G) #SBATCH --mem=10G # start the job in the directory it was submitted from cd "$SLURM_SUBMIT_DIR" # Stop on error set -e Loading Loading
Benchmark/run_mpi_benchmark.sh 0 → 100755 +47 −0 Original line number Diff line number Diff line #!/bin/bash #SBATCH --job-name=mpi-grid # job name (default is the name of this file) #SBATCH --output=log.%x.job_%j # file name for stdout/stderr (%x will be replaced with the job name, %j with the jobid) #SBATCH --partition=gpXY # partition/queue name for the job submission #SBATCH --nodes=4 # number of nodes #SBATCH --ntasks-per-node=2 # MPI processes per node #SBATCH --threads-per-core=1 # do not use hyperthreads (i.e. CPUs = physical cores below) #SBATCH --cpus-per-task=2 # number of CPUs per process #SBATCH --gpus-per-task=0 # number of GPUs per process #SBATCH --gpu-bind=single:1 # bind each process to its own GPU (single:<tasks_per_gpu>) # how much RAM per node can be allocated for the job (default: 2G, max: 60G) #SBATCH --mem=10G # start the job in the directory it was submitted from cd "$SLURM_SUBMIT_DIR" # Stop on error set -e USAGE="Usage: ./script <bin> <instances_dir> <result_csv>" if [ $# -ne 3 ]; then echo $USAGE exit 1 fi BIN="$1" INSTANCES_DIR="$2" RESULT_CSV="$3" run_benchmark() { local instance="$1" srun $BIN "$INSTANCES_DIR/$instance" >> $RESULT_CSV } echo "REFINES;INSIDE;OUTSIDE;SEQ;AVG;BEST;WORST" > $RESULT_CSV for instance in $(ls -A1 $INSTANCES_DIR | sort -t '-' -k5n ); do run_benchmark "$instance" done No newline at end of file
Benchmark/run_seq_benchmark.sh +12 −0 Original line number Diff line number Diff line #!/bin/bash #SBATCH --job-name=seq-grid # job name (default is the name of this file) #SBATCH --output=log.%x.job_%j # file name for stdout/stderr (%x will be replaced with the job name, %j with the jobid) #SBATCH --partition=gpXY # partition/queue name for the job submission #SBATCH --ntasks=1 # number of tasks/processes # how much RAM per node can be allocated for the job (default: 2G, max: 60G) #SBATCH --mem=10G # start the job in the directory it was submitted from cd "$SLURM_SUBMIT_DIR" # Stop on error set -e Loading