-
Notifications
You must be signed in to change notification settings - Fork 0
/
getdata_strong.sh
38 lines (38 loc) · 1.05 KB
/
getdata_strong.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
#SBATCH --no-requeue
#SBATCH --job-name="HPC_ex2"
#SBATCH --get-user-env
#SBATCH --partition=EPYC
#SBATCH --nodes=1
#SBATCH --exclusive
#SBATCH --time=02:00:00
#SBATCH --output=StrongScalability.out
#--------------------------------------------------------------------------------
# Global settings
csv=$1
exe="../apps/main.x"
N=160000000
OMP_threads=4
#--------------------------------------------------------------------------------
# Load modules
module load architecture/AMD
module load openMPI/4.1.5/gnu/12.2.1
#--------------------------------------------------------------------------------
# Run benchmark
echo "Processes,Threads,Time" > $csv
# Step 1: benchmark serial version (1 process 1 thread)
export OMP_NUM_THREADS=1
for iter in {1..5..1}
do
$exe $N >> $csv
done
# Step 2: benchmark hybrid version
export OMP_NUM_THREADS=$OMP_threads
for p in {1..128..1}
do
for iter in {1..5..1}
do
mpirun -np $p --map-by socket $exe $N >> $csv
done
done
#--------------------------------------------------------------------------------