-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun_5000_16.sl
55 lines (45 loc) · 1.27 KB
/
run_5000_16.sl
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --cpus-per-task=16
#SBATCH --time=08:00:00
#SBATCH --output=run_5000_16.out
#SBATCH --account=anakano_429
##SBATCH -p qcb
N=5000
MAX_T=16
gcc -fopenmp -lstdc++ -lm -o max_pair src/max_pair.cpp
gcc -fopenmp -lstdc++ -lm -o max_pair_omp src/max_pair_omp.cpp
gcc -fopenmp -lstdc++ -lm -o max_pair_unsup_omp src/max_pair_unsup_omp.cpp
gcc -fopenmp -lstdc++ -lm -o max_pair_omp_tri src/max_pair_omp_tri.cpp
echo "***omp algorithm***"
for t in $( eval echo {1..$MAX_T} )
do
echo "sample input = ${N}, nthread = ${t}"
./max_pair_omp sample_inputs/input_${N}.txt $t
echo ""
done
echo "**************************"
echo ""
echo "***omp_tri algorithm***"
for t in $( eval echo {1..$MAX_T} )
do
echo "sample input = ${N}, nthread = ${t}"
./max_pair_omp_tri sample_inputs/input_${N}.txt $t
echo ""
done
echo "**************************"
echo ""
echo "***unsup_omp algorithm***"
for t in $( eval echo {1..$MAX_T} )
do
echo "sample input = ${N}, nthread = ${t}"
./max_pair_unsup_omp sample_inputs/input_${N}.txt $t
echo ""
done
echo "**************************"
#sequential method
echo "***Sequential algorithm***"
echo "sample input = ${N}"
./max_pair sample_inputs/input_${N}.txt
echo "**************************"