-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun_iso.sl
58 lines (49 loc) · 1.31 KB
/
run_iso.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
54
55
56
#!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --cpus-per-task=16
#SBATCH --time=12:00:00
#SBATCH --output=run_iso.out
#SBATCH --account=anakano_429
##SBATCH -p qcb
%%N=5000
MAX_T=16
base=500
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
N=$((base * t))
echo "input length = ${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
N=$((base * t))
echo "input length = ${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
N=$((base * t))
echo "input length = ${N}, nthread = ${t}"
./max_pair_unsup_omp_tri sample_inputs/input_${N}.txt $t
echo ""
done
echo "**************************"
echo ""
%#sequential method
%echo "***Sequential algorithm***"
%./max_pair sample_inputs/input_${N}.txt
%echo "**************************"