-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotes.txt
127 lines (112 loc) · 7.48 KB
/
notes.txt
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# Running test.
for ((i=0;i<10; i++)); do ./stl_par_knn 2 10 data/input_10k_s100.txt -d ; done | awk '{sum+=$6} END {print (sum/NR)/1000000}'
# building the docker file. The '.' indicates to look the docker file in the current directory.
# -t is for the tag of docker container.
sudo docker build -t joet .
# connecting to a docker container.
docker run -it marcod/ae2020 bash # -it stands for interactively opening the bash
# creating a new file.
touch main.py # creating a file
# exiting from the docker container
exit
# connectin with local file.
docker run -v "/Users/JoeKifle/Documents/EDU/Pisa_2020_2021/Semester_2/spm/PDS_testcode/2022:/home/spm2021user/SPM_code" -it joetspm
# connectin to the remote machine
# copying file to the server
rsync -avzh --stats PDS_testcode/ [email protected]:/home/y.telila/PDS_testcode/
# compiling your code
g++ -o code code.cpp # -o flag is the output name of your compiled output.
# linking library when compiling.
g++ code.cpp -lpthread
# flags when compiling.
-o # output of the compiling code.
-O3 # sets optimization level Eg. fastflow need highest optimization level.
# your reference should be https://en.cppreference.com/w/
# MEASURING TIME
# you can use the time command to measure the time. But this measures the whole
# time it takes for the code to execure. Including the time it took for the code
# to fetch, load and execute the code.
# Includes the time spent on loading the code, start the code, end the code.
$ time ./a.out # Gives you the time in msec, which is not good always. because we want our measure to be more accurate than msec.
[y.telila@c6320p-2 Multi-Thread-KNN]$ ./executeTest.sh
---------------Running sequential version---------------
[STL CPP Sequential], [input_10k_s100.txt], [10 runs]: 3744877
[STL CPP Sequential], [input_50k_s200.txt], [10 runs]: 94805036
[STL CPP Sequential], [input_100k_s300.txt], [10 runs]: 372073573
---------------Running STL CPP parallel version---------------
[STL CPP Parallel] , [input_10k_s100.txt],[1 threads] [10 runs] : 3776222
[STL CPP Parallel] , [input_10k_s100.txt],[2 threads] [10 runs] : 5769884
[STL CPP Parallel] , [input_10k_s100.txt],[4 threads] [10 runs] : 6771237
[STL CPP Parallel] , [input_10k_s100.txt],[8 threads] [10 runs] : 7289624
[STL CPP Parallel] , [input_10k_s100.txt],[16 threads] [10 runs] : 7588830
[STL CPP Parallel] , [input_10k_s100.txt],[32 threads] [10 runs] : 7815029
[STL CPP Parallel] , [input_10k_s100.txt],[64 threads] [10 runs] : 7958853
[STL CPP Parallel] , [input_10k_s100.txt],[128 threads] [10 runs] : 8095927
[STL CPP Parallel] , [input_10k_s100.txt],[256 threads] [10 runs] : 8233801
[STL CPP Parallel] , [input_50k_s200.txt],[1 threads] [10 runs] : 95822291
[STL CPP Parallel] , [input_50k_s200.txt],[2 threads] [10 runs] : 145906655
[STL CPP Parallel] , [input_50k_s200.txt],[4 threads] [10 runs] : 171031920
[STL CPP Parallel] , [input_50k_s200.txt],[8 threads] [10 runs] : 183662821
[STL CPP Parallel] , [input_50k_s200.txt],[16 threads] [10 runs] : 190175093
[STL CPP Parallel] , [input_50k_s200.txt],[32 threads] [10 runs] : 193723379
[STL CPP Parallel] , [input_50k_s200.txt],[64 threads] [10 runs] : 196010002
[STL CPP Parallel] , [input_50k_s200.txt],[128 threads] [10 runs] : 197739857
[STL CPP Parallel] , [input_50k_s200.txt],[256 threads] [10 runs] : 199259843
[STL CPP Parallel] , [input_100k_s300.txt],[1 threads] [10 runs] : 373559613
[STL CPP Parallel] , [input_100k_s300.txt],[2 threads] [10 runs] : 570781578
[STL CPP Parallel] , [input_100k_s300.txt],[4 threads] [10 runs] : 669413589
[STL CPP Parallel] , [input_100k_s300.txt],[8 threads] [10 runs] : 718979442
[STL CPP Parallel] , [input_100k_s300.txt],[16 threads] [10 runs] : 744112360
[STL CPP Parallel] , [input_100k_s300.txt],[32 threads] [10 runs] : 757097875
[STL CPP Parallel] , [input_100k_s300.txt],[64 threads] [10 runs] : 765196324
[STL CPP Parallel] , [input_100k_s300.txt],[128 threads] [10 runs] : 770888040
[STL CPP Parallel] , [input_100k_s300.txt],[256 threads] [10 runs] : 776237635
---------------Running FF parallel for version---------------
[FF Parallel for] , [input_10k_s100.txt],[1 threads] [10 runs] : 3743759
[FF Parallel for] , [input_10k_s100.txt],[2 threads] [10 runs] : 5645892
[FF Parallel for] , [input_10k_s100.txt],[4 threads] [10 runs] : 6654671
[FF Parallel for] , [input_10k_s100.txt],[8 threads] [10 runs] : 7166189
[FF Parallel for] , [input_10k_s100.txt],[16 threads] [10 runs] : 7494721
[FF Parallel for] , [input_10k_s100.txt],[32 threads] [10 runs] : 7648862
[FF Parallel for] , [input_10k_s100.txt],[64 threads] [10 runs] : 7793584
[FF Parallel for] , [input_10k_s100.txt],[128 threads] [10 runs] : 7942890
[FF Parallel for] , [input_10k_s100.txt],[256 threads] [10 runs] : 8130937
[FF Parallel for] , [input_50k_s200.txt],[1 threads] [10 runs] : 98202341
[FF Parallel for] , [input_50k_s200.txt],[2 threads] [10 runs] : 147394212
[FF Parallel for] , [input_50k_s200.txt],[4 threads] [10 runs] : 173105621
[FF Parallel for] , [input_50k_s200.txt],[8 threads] [10 runs] : 186037959
[FF Parallel for] , [input_50k_s200.txt],[16 threads] [10 runs] : 192528426
[FF Parallel for] , [input_50k_s200.txt],[32 threads] [10 runs] : 196020961
[FF Parallel for] , [input_50k_s200.txt],[64 threads] [10 runs] : 198341238
[FF Parallel for] , [input_50k_s200.txt],[128 threads] [10 runs] : 200139919
[FF Parallel for] , [input_50k_s200.txt],[256 threads] [10 runs] : 201454318
[FF Parallel for] , [input_100k_s300.txt],[1 threads] [10 runs] : 376661565
[FF Parallel for] , [input_100k_s300.txt],[2 threads] [10 runs] : 563950061
[FF Parallel for] , [input_100k_s300.txt],[4 threads] [10 runs] : 665061583
[FF Parallel for] , [input_100k_s300.txt],[8 threads] [10 runs] : 715836550
[FF Parallel for] , [input_100k_s300.txt],[16 threads] [10 runs] : 741259864
[FF Parallel for] , [input_100k_s300.txt],[32 threads] [10 runs] : 754119194
[FF Parallel for] , [input_100k_s300.txt],[64 threads] [10 runs] : 761001617
[FF Parallel for] , [input_100k_s300.txt],[128 threads] [10 runs] : 766082799
[FF Parallel for] , [input_100k_s300.txt],[256 threads] [10 runs] : 770394690
---------------Running openMP parallel version---------------
[openMP Parallel] , [input_10k_s100.txt],[1 threads] [10 runs] : 3757566
[openMP Parallel] , [input_10k_s100.txt],[2 threads] [10 runs] : 5748439
[openMP Parallel] , [input_10k_s100.txt],[4 threads] [10 runs] : 6744950
[openMP Parallel] , [input_10k_s100.txt],[8 threads] [10 runs] : 7247691
[openMP Parallel] , [input_10k_s100.txt],[16 threads] [10 runs] : 7510042
[openMP Parallel] , [input_10k_s100.txt],[32 threads] [10 runs] : 7652880
[openMP Parallel] , [input_10k_s100.txt],[64 threads] [10 runs] : 7761247
[openMP Parallel] , [input_10k_s100.txt],[128 threads] [10 runs] : 7898865
[openMP Parallel] , [input_10k_s100.txt],[256 threads] [10 runs] : 8099464
[openMP Parallel] , [input_50k_s200.txt],[1 threads] [10 runs] : 94980151
[openMP Parallel] , [input_50k_s200.txt],[2 threads] [10 runs] : 145729235
[openMP Parallel] , [input_50k_s200.txt],[4 threads] [10 runs] : 171183845
[openMP Parallel] , [input_50k_s200.txt],[8 threads] [10 runs] : 183907075
[openMP Parallel] , [input_50k_s200.txt],[16 threads] [10 runs] : 190297346
[openMP Parallel] , [input_50k_s200.txt],[32 threads] [10 runs] : 193559411
[openMP Parallel] , [input_50k_s200.txt],[64 threads] [10 runs] : 195674904
[openMP Parallel] , [input_50k_s200.txt],[128 threads] [10 runs] : 197357545
[openMP Parallel] , [input_50k_s200.txt],[256 threads] [10 runs] : 198676834
[openMP Parallel] , [input_100k_s300.txt],[1 threads] [10 runs] : 372187615