From 6cb358722275de4667283972aec0ac35f7c656e8 Mon Sep 17 00:00:00 2001 From: niklas Date: Sat, 27 Jul 2024 15:27:39 +0200 Subject: [PATCH] Add PBS scripts --- pwr_project.script | 63 ++++++++++++++++++++++++++++++++++ pwr_project_timeit.script | 37 ++++++++++++++++++++ pwr_project_timeit_weak.script | 36 +++++++++++++++++++ 3 files changed, 136 insertions(+) create mode 100644 pwr_project.script create mode 100644 pwr_project_timeit.script create mode 100644 pwr_project_timeit_weak.script diff --git a/pwr_project.script b/pwr_project.script new file mode 100644 index 0000000..323d4ee --- /dev/null +++ b/pwr_project.script @@ -0,0 +1,63 @@ +#!/bin/bash + +## parameters +#PBS -N pwr_project +#PBS -q entry_teachingq +#PBS -l select=1:ncpus=32:mpiprocs=32:mem=192gb +#PBS -o pwr_project_log.out +#PBS -e pwr_project_log.err + +module load python/gcc +module load openmpi/gcc + +## environment +cd ~/pwr_project + +## delete previous runs +rm pwr_project_log.* + +## execute Diag-Vec +echo "---------------------" > times_diag_vec.txt +echo "Durchlauf `date`:" >> times_diag_vec.txt + +echo "Invoke with size of 8:" >> times_diag_vec.txt +{ time mpiexec -n 8 python3 ./src/main_diag_vec.py ; } 2>> times_diag_vec.txt + +echo "Invoke with size of 16:" >> times_diag_vec.txt +{ time mpiexec -n 16 python3 ./src/main_diag_vec.py ; } 2>> times_diag_vec.txt + +echo "Invoke with size of 32:" >> times_diag_vec.txt +{ time mpiexec -n 32 python3 ./src/main_diag_vec.py ; } 2>> times_diag_vec.txt + +echo "---------------------" >> times_diag_vec.txt + +## execute Matrix-Vector +echo "---------------------" > times_matrix_vec.txt +echo "Durchlauf `date`:" >> times_matrix_vec.txt + +echo "Invoke with size of 8:" >> times_matrix_vec.txt +{ time mpiexec -n 8 python3 ./src/main_matrix_vec.py ; } 2>> times_matrix_vec.txt + +echo "Invoke with size of 16:" >> times_matrix_vec.txt +{ time mpiexec -n 16 python3 ./src/main_matrix_vec.py ; } 2>> times_matrix_vec.txt + +echo "Invoke with size of 32:" >> times_matrix_vec.txt +{ time mpiexec -n 32 python3 ./src/main_matrix_vec.py ; } 2>> times_matrix_vec.txt + +echo "---------------------" >> times_matrix_vec.txt + +## execute CG +echo "---------------------" > times_cg.txt +echo "Durchlauf `date`:" >> times_cg.txt + +echo "Invoke with size of 8:" >> times_cg.txt +{ time mpiexec -n 8 python3 ./src/main_cg.py ; } 2>> times_cg.txt + +echo "Invoke with size of 16:" >> times_cg.txt +{ time mpiexec -n 16 python3 ./src/main_cg.py ; } 2>> times_cg.txt + +echo "Invoke with size of 32:" >> times_cg.txt +{ time mpiexec -n 32 python3 ./src/main_cg.py ; } 2>> times_cg.txt + +echo "---------------------" >> times_cg.txt +echo "" >> times_cg.txt diff --git a/pwr_project_timeit.script b/pwr_project_timeit.script new file mode 100644 index 0000000..54aa34c --- /dev/null +++ b/pwr_project_timeit.script @@ -0,0 +1,37 @@ +#!/bin/bash + +## parameters +#PBS -N pwr_project_timeit +#PBS -q entry_teachingq +#PBS -l select=1:ncpus=32:mpiprocs=32:mem=512gb +#PBS -o pwr_project_timeit_log.out +#PBS -e pwr_project_timeit_log.err + +module load python/gcc +module load openmpi/gcc + +## environment +cd ~/pwr_project + +## delete previous runs +rm pwr_project_timeit_log.* + +N=10000 + +## execute Diag-Vec +echo "Diag-Vec" +mpiexec -n 8 python3 ./src/main_diag_vec_timeit.py $N +mpiexec -n 16 python3 ./src/main_diag_vec_timeit.py $N +mpiexec -n 32 python3 ./src/main_diag_vec_timeit.py $N + +## execute Matrix-Vector +echo "Matrix-Vec" +mpiexec -n 8 python3 ./src/main_matrix_vec_timeit.py $N +mpiexec -n 16 python3 ./src/main_matrix_vec_timeit.py $N +mpiexec -n 32 python3 ./src/main_matrix_vec_timeit.py $N + +## execute CG +echo "CG" +mpiexec -n 8 python3 ./src/main_cg_timeit.py $(expr $N / 10) +mpiexec -n 16 python3 ./src/main_cg_timeit.py $(expr $N / 10) +mpiexec -n 32 python3 ./src/main_cg_timeit.py $(expr $N / 10) diff --git a/pwr_project_timeit_weak.script b/pwr_project_timeit_weak.script new file mode 100644 index 0000000..78356a9 --- /dev/null +++ b/pwr_project_timeit_weak.script @@ -0,0 +1,36 @@ +#!/bin/bash + +## parameters +#PBS -N pwr_project_timeit_weak +#PBS -q entry_teachingq +#PBS -l select=1:ncpus=32:mpiprocs=32:mem=512gb +#PBS -o pwr_project_timeit_weak_log.out +#PBS -e pwr_project_timeit_weak_log.err + +module load python/gcc +module load openmpi/gcc + +## environment +cd ~/pwr_project + +## delete previous runs +rm pwr_project_timeit_weak_log.* + +N=10000 +DN=$(expr 2 \* $N) + +## execute Diag-Vec +echo "Diag-Vec" +mpiexec -n 8 python3 ./src/main_diag_vec_timeit.py $N +mpiexec -n 32 python3 ./src/main_diag_vec_timeit.py $DN + +## execute Matrix-Vector +echo "Matrix-Vec" +mpiexec -n 8 python3 ./src/main_matrix_vec_timeit.py $N +mpiexec -n 32 python3 ./src/main_matrix_vec_timeit.py $DN + + +## execute CG +echo "CG" +mpiexec -n 8 python3 ./src/main_cg_timeit.py $(expr $N / 10) +mpiexec -n 32 python3 ./src/main_cg_timeit.py $(expr $DN / 10)