Serialization work
This commit is contained in:
parent
9a15ef3c7a
commit
e93a940e80
@ -45,7 +45,9 @@ find_package(OpenMP)
|
|||||||
|
|
||||||
find_package(BISON 2.4 REQUIRED)
|
find_package(BISON 2.4 REQUIRED)
|
||||||
find_package(FLEX REQUIRED)
|
find_package(FLEX REQUIRED)
|
||||||
find_package(Boost REQUIRED)
|
|
||||||
|
find_package(Boost REQUIRED serialization graph)
|
||||||
|
include_directories(${Boost_INCLUDE_DIR})
|
||||||
|
|
||||||
find_package(OpenSSL)
|
find_package(OpenSSL)
|
||||||
find_package(Doxygen)
|
find_package(Doxygen)
|
||||||
@ -75,6 +77,7 @@ include_directories("${CMAKE_SOURCE_DIR}/src/")
|
|||||||
|
|
||||||
file(GLOB ag_gen_src "${CMAKE_SOURCE_DIR}/src/ag_gen/*.cpp")
|
file(GLOB ag_gen_src "${CMAKE_SOURCE_DIR}/src/ag_gen/*.cpp")
|
||||||
file(GLOB utils_src "${CMAKE_SOURCE_DIR}/src/util/*.c" "${CMAKE_SOURCE_DIR}/src/util/*.cpp")
|
file(GLOB utils_src "${CMAKE_SOURCE_DIR}/src/util/*.c" "${CMAKE_SOURCE_DIR}/src/util/*.cpp")
|
||||||
|
file(GLOB mpi_src "${CMAKE_SOURCE_DIR}/src/mpi/*.c" "${CMAKE_SOURCE_DIR}/src/mpi/*.cpp")
|
||||||
|
|
||||||
########################
|
########################
|
||||||
### Network Model Parser
|
### Network Model Parser
|
||||||
@ -122,13 +125,19 @@ ADD_FLEX_BISON_DEPENDENCY(xp_scanner xp_parser)
|
|||||||
add_executable(ag_gen "${CMAKE_SOURCE_DIR}/src/main.cpp"
|
add_executable(ag_gen "${CMAKE_SOURCE_DIR}/src/main.cpp"
|
||||||
${FLEX_nm_scanner_OUTPUTS} ${BISON_nm_parser_OUTPUTS}
|
${FLEX_nm_scanner_OUTPUTS} ${BISON_nm_parser_OUTPUTS}
|
||||||
${FLEX_xp_scanner_OUTPUTS} ${BISON_xp_parser_OUTPUTS}
|
${FLEX_xp_scanner_OUTPUTS} ${BISON_xp_parser_OUTPUTS}
|
||||||
${ag_gen_src} ${utils_src})
|
${ag_gen_src} ${utils_src} ${mpi_src})
|
||||||
target_link_libraries(ag_gen ${PostgreSQL_LIBRARIES})
|
target_link_libraries(ag_gen ${PostgreSQL_LIBRARIES} Boost::serialization)
|
||||||
|
|
||||||
add_executable(decode "${CMAKE_SOURCE_DIR}/src/tools/decode.cpp"
|
add_executable(decode "${CMAKE_SOURCE_DIR}/src/tools/decode.cpp"
|
||||||
${ag_gen_src} ${utils_src})
|
${ag_gen_src} ${utils_src})
|
||||||
target_link_libraries(decode ${PostgreSQL_LIBRARIES})
|
target_link_libraries(decode ${PostgreSQL_LIBRARIES})
|
||||||
|
|
||||||
|
#add_executable(serialize "${CMAKE_SOURCE_DIR}/src/tests/serialize.cpp"
|
||||||
|
# ${FLEX_nm_scanner_OUTPUTS} ${BISON_nm_parser_OUTPUTS}
|
||||||
|
# ${FLEX_xp_scanner_OUTPUTS} ${BISON_xp_parser_OUTPUTS}
|
||||||
|
# ${ag_gen_src} ${utils_src})
|
||||||
|
#target_link_libraries(serialize ${PostgreSQL_LIBRARIES} Boost::serialization)
|
||||||
|
|
||||||
if(CPPREDIS_FOUND)
|
if(CPPREDIS_FOUND)
|
||||||
#include_directories("${CPPREDIS_INCLUDE_DIRS}")
|
#include_directories("${CPPREDIS_INCLUDE_DIRS}")
|
||||||
link_directories("${CPPREDIS_LIBRARY_DIRS}")
|
link_directories("${CPPREDIS_LIBRARY_DIRS}")
|
||||||
@ -137,6 +146,7 @@ if(CPPREDIS_FOUND)
|
|||||||
|
|
||||||
target_link_libraries(ag_gen cpp_redis tacopie)
|
target_link_libraries(ag_gen cpp_redis tacopie)
|
||||||
target_link_libraries(decode cpp_redis tacopie)
|
target_link_libraries(decode cpp_redis tacopie)
|
||||||
|
#target_link_libraries(serialize cpp_redis tacopie)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
################
|
################
|
||||||
|
|||||||
@ -7,572 +7,16 @@ digraph G {
|
|||||||
5;
|
5;
|
||||||
6;
|
6;
|
||||||
7;
|
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;
|
|
||||||
0->1 [label=0];
|
0->1 [label=0];
|
||||||
0->2 [label=0];
|
0->2 [label=1];
|
||||||
0->3 [label=1];
|
0->3 [label=2];
|
||||||
0->4 [label=1];
|
1->4 [label=1];
|
||||||
0->5 [label=2];
|
1->5 [label=2];
|
||||||
0->6 [label=2];
|
2->4 [label=0];
|
||||||
0->7 [label=3];
|
2->6 [label=2];
|
||||||
1->8 [label=0];
|
3->5 [label=0];
|
||||||
1->9 [label=1];
|
3->6 [label=1];
|
||||||
1->10 [label=1];
|
4->7 [label=2];
|
||||||
1->11 [label=2];
|
5->7 [label=1];
|
||||||
1->12 [label=2];
|
6->7 [label=0];
|
||||||
1->13 [label=3];
|
|
||||||
2->8 [label=0];
|
|
||||||
2->14 [label=1];
|
|
||||||
2->15 [label=1];
|
|
||||||
2->16 [label=2];
|
|
||||||
2->17 [label=2];
|
|
||||||
2->18 [label=3];
|
|
||||||
3->9 [label=0];
|
|
||||||
3->14 [label=0];
|
|
||||||
3->19 [label=1];
|
|
||||||
3->20 [label=2];
|
|
||||||
3->21 [label=2];
|
|
||||||
3->22 [label=3];
|
|
||||||
4->10 [label=0];
|
|
||||||
4->15 [label=0];
|
|
||||||
4->19 [label=1];
|
|
||||||
4->23 [label=2];
|
|
||||||
4->24 [label=2];
|
|
||||||
4->25 [label=3];
|
|
||||||
5->11 [label=0];
|
|
||||||
5->16 [label=0];
|
|
||||||
5->20 [label=1];
|
|
||||||
5->23 [label=1];
|
|
||||||
5->26 [label=2];
|
|
||||||
5->27 [label=3];
|
|
||||||
6->12 [label=0];
|
|
||||||
6->17 [label=0];
|
|
||||||
6->21 [label=1];
|
|
||||||
6->24 [label=1];
|
|
||||||
6->26 [label=2];
|
|
||||||
6->28 [label=3];
|
|
||||||
7->13 [label=0];
|
|
||||||
7->18 [label=0];
|
|
||||||
7->22 [label=1];
|
|
||||||
7->25 [label=1];
|
|
||||||
7->27 [label=2];
|
|
||||||
7->28 [label=2];
|
|
||||||
8->29 [label=1];
|
|
||||||
8->30 [label=1];
|
|
||||||
8->31 [label=2];
|
|
||||||
8->32 [label=2];
|
|
||||||
8->33 [label=3];
|
|
||||||
9->29 [label=0];
|
|
||||||
9->34 [label=1];
|
|
||||||
9->35 [label=2];
|
|
||||||
9->36 [label=2];
|
|
||||||
9->37 [label=3];
|
|
||||||
10->30 [label=0];
|
|
||||||
10->34 [label=1];
|
|
||||||
10->38 [label=2];
|
|
||||||
10->39 [label=2];
|
|
||||||
10->40 [label=3];
|
|
||||||
11->31 [label=0];
|
|
||||||
11->35 [label=1];
|
|
||||||
11->38 [label=1];
|
|
||||||
11->41 [label=2];
|
|
||||||
11->42 [label=3];
|
|
||||||
12->32 [label=0];
|
|
||||||
12->36 [label=1];
|
|
||||||
12->39 [label=1];
|
|
||||||
12->41 [label=2];
|
|
||||||
12->43 [label=3];
|
|
||||||
13->33 [label=0];
|
|
||||||
13->37 [label=1];
|
|
||||||
13->40 [label=1];
|
|
||||||
13->42 [label=2];
|
|
||||||
13->43 [label=2];
|
|
||||||
14->29 [label=0];
|
|
||||||
14->44 [label=1];
|
|
||||||
14->45 [label=2];
|
|
||||||
14->46 [label=2];
|
|
||||||
14->47 [label=3];
|
|
||||||
15->30 [label=0];
|
|
||||||
15->44 [label=1];
|
|
||||||
15->48 [label=2];
|
|
||||||
15->49 [label=2];
|
|
||||||
15->50 [label=3];
|
|
||||||
16->31 [label=0];
|
|
||||||
16->45 [label=1];
|
|
||||||
16->48 [label=1];
|
|
||||||
16->51 [label=2];
|
|
||||||
16->52 [label=3];
|
|
||||||
17->32 [label=0];
|
|
||||||
17->46 [label=1];
|
|
||||||
17->49 [label=1];
|
|
||||||
17->51 [label=2];
|
|
||||||
17->53 [label=3];
|
|
||||||
18->33 [label=0];
|
|
||||||
18->47 [label=1];
|
|
||||||
18->50 [label=1];
|
|
||||||
18->52 [label=2];
|
|
||||||
18->53 [label=2];
|
|
||||||
19->34 [label=0];
|
|
||||||
19->44 [label=0];
|
|
||||||
19->54 [label=2];
|
|
||||||
19->55 [label=2];
|
|
||||||
19->56 [label=3];
|
|
||||||
20->35 [label=0];
|
|
||||||
20->45 [label=0];
|
|
||||||
20->54 [label=1];
|
|
||||||
20->57 [label=2];
|
|
||||||
20->58 [label=3];
|
|
||||||
21->36 [label=0];
|
|
||||||
21->46 [label=0];
|
|
||||||
21->55 [label=1];
|
|
||||||
21->57 [label=2];
|
|
||||||
21->59 [label=3];
|
|
||||||
22->37 [label=0];
|
|
||||||
22->47 [label=0];
|
|
||||||
22->56 [label=1];
|
|
||||||
22->58 [label=2];
|
|
||||||
22->59 [label=2];
|
|
||||||
23->38 [label=0];
|
|
||||||
23->48 [label=0];
|
|
||||||
23->54 [label=1];
|
|
||||||
23->60 [label=2];
|
|
||||||
23->61 [label=3];
|
|
||||||
24->39 [label=0];
|
|
||||||
24->49 [label=0];
|
|
||||||
24->55 [label=1];
|
|
||||||
24->60 [label=2];
|
|
||||||
24->62 [label=3];
|
|
||||||
25->40 [label=0];
|
|
||||||
25->50 [label=0];
|
|
||||||
25->56 [label=1];
|
|
||||||
25->61 [label=2];
|
|
||||||
25->62 [label=2];
|
|
||||||
26->41 [label=0];
|
|
||||||
26->51 [label=0];
|
|
||||||
26->57 [label=1];
|
|
||||||
26->60 [label=1];
|
|
||||||
26->63 [label=3];
|
|
||||||
27->42 [label=0];
|
|
||||||
27->52 [label=0];
|
|
||||||
27->58 [label=1];
|
|
||||||
27->61 [label=1];
|
|
||||||
27->63 [label=2];
|
|
||||||
28->43 [label=0];
|
|
||||||
28->53 [label=0];
|
|
||||||
28->59 [label=1];
|
|
||||||
28->62 [label=1];
|
|
||||||
28->63 [label=2];
|
|
||||||
29->64 [label=1];
|
|
||||||
29->65 [label=2];
|
|
||||||
29->66 [label=2];
|
|
||||||
29->67 [label=3];
|
|
||||||
30->64 [label=1];
|
|
||||||
30->68 [label=2];
|
|
||||||
30->69 [label=2];
|
|
||||||
30->70 [label=3];
|
|
||||||
31->65 [label=1];
|
|
||||||
31->68 [label=1];
|
|
||||||
31->71 [label=2];
|
|
||||||
31->72 [label=3];
|
|
||||||
32->66 [label=1];
|
|
||||||
32->69 [label=1];
|
|
||||||
32->71 [label=2];
|
|
||||||
32->73 [label=3];
|
|
||||||
33->67 [label=1];
|
|
||||||
33->70 [label=1];
|
|
||||||
33->72 [label=2];
|
|
||||||
33->73 [label=2];
|
|
||||||
34->64 [label=0];
|
|
||||||
34->74 [label=2];
|
|
||||||
34->75 [label=2];
|
|
||||||
34->76 [label=3];
|
|
||||||
35->65 [label=0];
|
|
||||||
35->74 [label=1];
|
|
||||||
35->77 [label=2];
|
|
||||||
35->78 [label=3];
|
|
||||||
36->66 [label=0];
|
|
||||||
36->75 [label=1];
|
|
||||||
36->77 [label=2];
|
|
||||||
36->79 [label=3];
|
|
||||||
37->67 [label=0];
|
|
||||||
37->76 [label=1];
|
|
||||||
37->78 [label=2];
|
|
||||||
37->79 [label=2];
|
|
||||||
38->68 [label=0];
|
|
||||||
38->74 [label=1];
|
|
||||||
38->80 [label=2];
|
|
||||||
38->81 [label=3];
|
|
||||||
39->69 [label=0];
|
|
||||||
39->75 [label=1];
|
|
||||||
39->80 [label=2];
|
|
||||||
39->82 [label=3];
|
|
||||||
40->70 [label=0];
|
|
||||||
40->76 [label=1];
|
|
||||||
40->81 [label=2];
|
|
||||||
40->82 [label=2];
|
|
||||||
41->71 [label=0];
|
|
||||||
41->77 [label=1];
|
|
||||||
41->80 [label=1];
|
|
||||||
41->83 [label=3];
|
|
||||||
42->72 [label=0];
|
|
||||||
42->78 [label=1];
|
|
||||||
42->81 [label=1];
|
|
||||||
42->83 [label=2];
|
|
||||||
43->73 [label=0];
|
|
||||||
43->79 [label=1];
|
|
||||||
43->82 [label=1];
|
|
||||||
43->83 [label=2];
|
|
||||||
44->64 [label=0];
|
|
||||||
44->84 [label=2];
|
|
||||||
44->85 [label=2];
|
|
||||||
44->86 [label=3];
|
|
||||||
45->65 [label=0];
|
|
||||||
45->84 [label=1];
|
|
||||||
45->87 [label=2];
|
|
||||||
45->88 [label=3];
|
|
||||||
46->66 [label=0];
|
|
||||||
46->85 [label=1];
|
|
||||||
46->87 [label=2];
|
|
||||||
46->89 [label=3];
|
|
||||||
47->67 [label=0];
|
|
||||||
47->86 [label=1];
|
|
||||||
47->88 [label=2];
|
|
||||||
47->89 [label=2];
|
|
||||||
48->68 [label=0];
|
|
||||||
48->84 [label=1];
|
|
||||||
48->90 [label=2];
|
|
||||||
48->91 [label=3];
|
|
||||||
49->69 [label=0];
|
|
||||||
49->85 [label=1];
|
|
||||||
49->90 [label=2];
|
|
||||||
49->92 [label=3];
|
|
||||||
50->70 [label=0];
|
|
||||||
50->86 [label=1];
|
|
||||||
50->91 [label=2];
|
|
||||||
50->92 [label=2];
|
|
||||||
51->71 [label=0];
|
|
||||||
51->87 [label=1];
|
|
||||||
51->90 [label=1];
|
|
||||||
51->93 [label=3];
|
|
||||||
52->72 [label=0];
|
|
||||||
52->88 [label=1];
|
|
||||||
52->91 [label=1];
|
|
||||||
52->93 [label=2];
|
|
||||||
53->73 [label=0];
|
|
||||||
53->89 [label=1];
|
|
||||||
53->92 [label=1];
|
|
||||||
53->93 [label=2];
|
|
||||||
54->74 [label=0];
|
|
||||||
54->84 [label=0];
|
|
||||||
54->94 [label=2];
|
|
||||||
54->95 [label=3];
|
|
||||||
55->75 [label=0];
|
|
||||||
55->85 [label=0];
|
|
||||||
55->94 [label=2];
|
|
||||||
55->96 [label=3];
|
|
||||||
56->76 [label=0];
|
|
||||||
56->86 [label=0];
|
|
||||||
56->95 [label=2];
|
|
||||||
56->96 [label=2];
|
|
||||||
57->77 [label=0];
|
|
||||||
57->87 [label=0];
|
|
||||||
57->94 [label=1];
|
|
||||||
57->97 [label=3];
|
|
||||||
58->78 [label=0];
|
|
||||||
58->88 [label=0];
|
|
||||||
58->95 [label=1];
|
|
||||||
58->97 [label=2];
|
|
||||||
59->79 [label=0];
|
|
||||||
59->89 [label=0];
|
|
||||||
59->96 [label=1];
|
|
||||||
59->97 [label=2];
|
|
||||||
60->80 [label=0];
|
|
||||||
60->90 [label=0];
|
|
||||||
60->94 [label=1];
|
|
||||||
60->98 [label=3];
|
|
||||||
61->81 [label=0];
|
|
||||||
61->91 [label=0];
|
|
||||||
61->95 [label=1];
|
|
||||||
61->98 [label=2];
|
|
||||||
62->82 [label=0];
|
|
||||||
62->92 [label=0];
|
|
||||||
62->96 [label=1];
|
|
||||||
62->98 [label=2];
|
|
||||||
63->83 [label=0];
|
|
||||||
63->93 [label=0];
|
|
||||||
63->97 [label=1];
|
|
||||||
63->98 [label=1];
|
|
||||||
64->99 [label=2];
|
|
||||||
64->100 [label=2];
|
|
||||||
64->101 [label=3];
|
|
||||||
65->99 [label=1];
|
|
||||||
65->102 [label=2];
|
|
||||||
65->103 [label=3];
|
|
||||||
66->100 [label=1];
|
|
||||||
66->102 [label=2];
|
|
||||||
66->104 [label=3];
|
|
||||||
67->101 [label=1];
|
|
||||||
67->103 [label=2];
|
|
||||||
67->104 [label=2];
|
|
||||||
68->99 [label=1];
|
|
||||||
68->105 [label=2];
|
|
||||||
68->106 [label=3];
|
|
||||||
69->100 [label=1];
|
|
||||||
69->105 [label=2];
|
|
||||||
69->107 [label=3];
|
|
||||||
70->101 [label=1];
|
|
||||||
70->106 [label=2];
|
|
||||||
70->107 [label=2];
|
|
||||||
71->102 [label=1];
|
|
||||||
71->105 [label=1];
|
|
||||||
71->108 [label=3];
|
|
||||||
72->103 [label=1];
|
|
||||||
72->106 [label=1];
|
|
||||||
72->108 [label=2];
|
|
||||||
73->104 [label=1];
|
|
||||||
73->107 [label=1];
|
|
||||||
73->108 [label=2];
|
|
||||||
74->99 [label=0];
|
|
||||||
74->109 [label=2];
|
|
||||||
74->110 [label=3];
|
|
||||||
75->100 [label=0];
|
|
||||||
75->109 [label=2];
|
|
||||||
75->111 [label=3];
|
|
||||||
76->101 [label=0];
|
|
||||||
76->110 [label=2];
|
|
||||||
76->111 [label=2];
|
|
||||||
77->102 [label=0];
|
|
||||||
77->109 [label=1];
|
|
||||||
77->112 [label=3];
|
|
||||||
78->103 [label=0];
|
|
||||||
78->110 [label=1];
|
|
||||||
78->112 [label=2];
|
|
||||||
79->104 [label=0];
|
|
||||||
79->111 [label=1];
|
|
||||||
79->112 [label=2];
|
|
||||||
80->105 [label=0];
|
|
||||||
80->109 [label=1];
|
|
||||||
80->113 [label=3];
|
|
||||||
81->106 [label=0];
|
|
||||||
81->110 [label=1];
|
|
||||||
81->113 [label=2];
|
|
||||||
82->107 [label=0];
|
|
||||||
82->111 [label=1];
|
|
||||||
82->113 [label=2];
|
|
||||||
83->108 [label=0];
|
|
||||||
83->112 [label=1];
|
|
||||||
83->113 [label=1];
|
|
||||||
84->99 [label=0];
|
|
||||||
84->114 [label=2];
|
|
||||||
84->115 [label=3];
|
|
||||||
85->100 [label=0];
|
|
||||||
85->114 [label=2];
|
|
||||||
85->116 [label=3];
|
|
||||||
86->101 [label=0];
|
|
||||||
86->115 [label=2];
|
|
||||||
86->116 [label=2];
|
|
||||||
87->102 [label=0];
|
|
||||||
87->114 [label=1];
|
|
||||||
87->117 [label=3];
|
|
||||||
88->103 [label=0];
|
|
||||||
88->115 [label=1];
|
|
||||||
88->117 [label=2];
|
|
||||||
89->104 [label=0];
|
|
||||||
89->116 [label=1];
|
|
||||||
89->117 [label=2];
|
|
||||||
90->105 [label=0];
|
|
||||||
90->114 [label=1];
|
|
||||||
90->118 [label=3];
|
|
||||||
91->106 [label=0];
|
|
||||||
91->115 [label=1];
|
|
||||||
91->118 [label=2];
|
|
||||||
92->107 [label=0];
|
|
||||||
92->116 [label=1];
|
|
||||||
92->118 [label=2];
|
|
||||||
93->108 [label=0];
|
|
||||||
93->117 [label=1];
|
|
||||||
93->118 [label=1];
|
|
||||||
94->109 [label=0];
|
|
||||||
94->114 [label=0];
|
|
||||||
94->119 [label=3];
|
|
||||||
95->110 [label=0];
|
|
||||||
95->115 [label=0];
|
|
||||||
95->119 [label=2];
|
|
||||||
96->111 [label=0];
|
|
||||||
96->116 [label=0];
|
|
||||||
96->119 [label=2];
|
|
||||||
97->112 [label=0];
|
|
||||||
97->117 [label=0];
|
|
||||||
97->119 [label=1];
|
|
||||||
98->113 [label=0];
|
|
||||||
98->118 [label=0];
|
|
||||||
98->119 [label=1];
|
|
||||||
99->120 [label=2];
|
|
||||||
99->121 [label=3];
|
|
||||||
100->120 [label=2];
|
|
||||||
100->122 [label=3];
|
|
||||||
101->121 [label=2];
|
|
||||||
101->122 [label=2];
|
|
||||||
102->120 [label=1];
|
|
||||||
102->123 [label=3];
|
|
||||||
103->121 [label=1];
|
|
||||||
103->123 [label=2];
|
|
||||||
104->122 [label=1];
|
|
||||||
104->123 [label=2];
|
|
||||||
105->120 [label=1];
|
|
||||||
105->124 [label=3];
|
|
||||||
106->121 [label=1];
|
|
||||||
106->124 [label=2];
|
|
||||||
107->122 [label=1];
|
|
||||||
107->124 [label=2];
|
|
||||||
108->123 [label=1];
|
|
||||||
108->124 [label=1];
|
|
||||||
109->120 [label=0];
|
|
||||||
109->125 [label=3];
|
|
||||||
110->121 [label=0];
|
|
||||||
110->125 [label=2];
|
|
||||||
111->122 [label=0];
|
|
||||||
111->125 [label=2];
|
|
||||||
112->123 [label=0];
|
|
||||||
112->125 [label=1];
|
|
||||||
113->124 [label=0];
|
|
||||||
113->125 [label=1];
|
|
||||||
114->120 [label=0];
|
|
||||||
114->126 [label=3];
|
|
||||||
115->121 [label=0];
|
|
||||||
115->126 [label=2];
|
|
||||||
116->122 [label=0];
|
|
||||||
116->126 [label=2];
|
|
||||||
117->123 [label=0];
|
|
||||||
117->126 [label=1];
|
|
||||||
118->124 [label=0];
|
|
||||||
118->126 [label=1];
|
|
||||||
119->125 [label=0];
|
|
||||||
119->126 [label=0];
|
|
||||||
120->127 [label=3];
|
|
||||||
121->127 [label=2];
|
|
||||||
122->127 [label=2];
|
|
||||||
123->127 [label=1];
|
|
||||||
124->127 [label=1];
|
|
||||||
125->127 [label=0];
|
|
||||||
126->127 [label=0];
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -483,6 +483,54 @@ src/main.cpp.s:
|
|||||||
$(MAKE) $(MAKESILENT) -f CMakeFiles/ag_gen.dir/build.make CMakeFiles/ag_gen.dir/src/main.cpp.s
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/ag_gen.dir/build.make CMakeFiles/ag_gen.dir/src/main.cpp.s
|
||||||
.PHONY : src/main.cpp.s
|
.PHONY : src/main.cpp.s
|
||||||
|
|
||||||
|
src/mpi/serialize.o: src/mpi/serialize.cpp.o
|
||||||
|
.PHONY : src/mpi/serialize.o
|
||||||
|
|
||||||
|
# target to build an object file
|
||||||
|
src/mpi/serialize.cpp.o:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/ag_gen.dir/build.make CMakeFiles/ag_gen.dir/src/mpi/serialize.cpp.o
|
||||||
|
.PHONY : src/mpi/serialize.cpp.o
|
||||||
|
|
||||||
|
src/mpi/serialize.i: src/mpi/serialize.cpp.i
|
||||||
|
.PHONY : src/mpi/serialize.i
|
||||||
|
|
||||||
|
# target to preprocess a source file
|
||||||
|
src/mpi/serialize.cpp.i:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/ag_gen.dir/build.make CMakeFiles/ag_gen.dir/src/mpi/serialize.cpp.i
|
||||||
|
.PHONY : src/mpi/serialize.cpp.i
|
||||||
|
|
||||||
|
src/mpi/serialize.s: src/mpi/serialize.cpp.s
|
||||||
|
.PHONY : src/mpi/serialize.s
|
||||||
|
|
||||||
|
# target to generate assembly for a file
|
||||||
|
src/mpi/serialize.cpp.s:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/ag_gen.dir/build.make CMakeFiles/ag_gen.dir/src/mpi/serialize.cpp.s
|
||||||
|
.PHONY : src/mpi/serialize.cpp.s
|
||||||
|
|
||||||
|
src/mpi/tasks.o: src/mpi/tasks.cpp.o
|
||||||
|
.PHONY : src/mpi/tasks.o
|
||||||
|
|
||||||
|
# target to build an object file
|
||||||
|
src/mpi/tasks.cpp.o:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/ag_gen.dir/build.make CMakeFiles/ag_gen.dir/src/mpi/tasks.cpp.o
|
||||||
|
.PHONY : src/mpi/tasks.cpp.o
|
||||||
|
|
||||||
|
src/mpi/tasks.i: src/mpi/tasks.cpp.i
|
||||||
|
.PHONY : src/mpi/tasks.i
|
||||||
|
|
||||||
|
# target to preprocess a source file
|
||||||
|
src/mpi/tasks.cpp.i:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/ag_gen.dir/build.make CMakeFiles/ag_gen.dir/src/mpi/tasks.cpp.i
|
||||||
|
.PHONY : src/mpi/tasks.cpp.i
|
||||||
|
|
||||||
|
src/mpi/tasks.s: src/mpi/tasks.cpp.s
|
||||||
|
.PHONY : src/mpi/tasks.s
|
||||||
|
|
||||||
|
# target to generate assembly for a file
|
||||||
|
src/mpi/tasks.cpp.s:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/ag_gen.dir/build.make CMakeFiles/ag_gen.dir/src/mpi/tasks.cpp.s
|
||||||
|
.PHONY : src/mpi/tasks.cpp.s
|
||||||
|
|
||||||
src/tests/mem_test.o: src/tests/mem_test.c.o
|
src/tests/mem_test.o: src/tests/mem_test.c.o
|
||||||
.PHONY : src/tests/mem_test.o
|
.PHONY : src/tests/mem_test.o
|
||||||
|
|
||||||
@ -900,6 +948,12 @@ help:
|
|||||||
@echo "... src/main.o"
|
@echo "... src/main.o"
|
||||||
@echo "... src/main.i"
|
@echo "... src/main.i"
|
||||||
@echo "... src/main.s"
|
@echo "... src/main.s"
|
||||||
|
@echo "... src/mpi/serialize.o"
|
||||||
|
@echo "... src/mpi/serialize.i"
|
||||||
|
@echo "... src/mpi/serialize.s"
|
||||||
|
@echo "... src/mpi/tasks.o"
|
||||||
|
@echo "... src/mpi/tasks.i"
|
||||||
|
@echo "... src/mpi/tasks.s"
|
||||||
@echo "... src/tests/mem_test.o"
|
@echo "... src/tests/mem_test.o"
|
||||||
@echo "... src/tests/mem_test.i"
|
@echo "... src/tests/mem_test.i"
|
||||||
@echo "... src/tests/mem_test.s"
|
@echo "... src/tests/mem_test.s"
|
||||||
|
|||||||
3934
build/ag.svg
3934
build/ag.svg
File diff suppressed because it is too large
Load Diff
|
Before Width: | Height: | Size: 239 KiB After Width: | Height: | Size: 6.9 KiB |
BIN
build/ag_gen
BIN
build/ag_gen
Binary file not shown.
@ -111,122 +111,132 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/usr/bin/c++ -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/main.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/main.cpp\"",
|
"command": "/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/main.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/main.cpp\"",
|
||||||
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/main.cpp"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/main.cpp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/usr/bin/cc -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -o CMakeFiles/ag_gen.dir/nm_scanner.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_scanner.c\"",
|
"command": "/usr/bin/cc -DBOOST_ALL_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -o CMakeFiles/ag_gen.dir/nm_scanner.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_scanner.c\"",
|
||||||
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_scanner.c"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_scanner.c"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/usr/bin/cc -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -o CMakeFiles/ag_gen.dir/nm_parser.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_parser.c\"",
|
"command": "/usr/bin/cc -DBOOST_ALL_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -o CMakeFiles/ag_gen.dir/nm_parser.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_parser.c\"",
|
||||||
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_parser.c"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_parser.c"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/usr/bin/cc -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -o CMakeFiles/ag_gen.dir/xp_scanner.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_scanner.c\"",
|
"command": "/usr/bin/cc -DBOOST_ALL_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -o CMakeFiles/ag_gen.dir/xp_scanner.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_scanner.c\"",
|
||||||
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_scanner.c"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_scanner.c"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/usr/bin/cc -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -o CMakeFiles/ag_gen.dir/xp_parser.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c\"",
|
"command": "/usr/bin/cc -DBOOST_ALL_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -o CMakeFiles/ag_gen.dir/xp_parser.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c\"",
|
||||||
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/usr/bin/c++ -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/ag_gen/ag_gen.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/ag_gen.cpp\"",
|
"command": "/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/ag_gen/ag_gen.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/ag_gen.cpp\"",
|
||||||
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/ag_gen.cpp"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/ag_gen.cpp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/usr/bin/c++ -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/ag_gen/asset.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/asset.cpp\"",
|
"command": "/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/ag_gen/asset.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/asset.cpp\"",
|
||||||
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/asset.cpp"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/asset.cpp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/usr/bin/c++ -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/ag_gen/assetgroup.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/assetgroup.cpp\"",
|
"command": "/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/ag_gen/assetgroup.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/assetgroup.cpp\"",
|
||||||
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/assetgroup.cpp"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/assetgroup.cpp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/usr/bin/c++ -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/ag_gen/edge.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/edge.cpp\"",
|
"command": "/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/ag_gen/edge.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/edge.cpp\"",
|
||||||
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/edge.cpp"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/edge.cpp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/usr/bin/c++ -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/ag_gen/exploit.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/exploit.cpp\"",
|
"command": "/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/ag_gen/exploit.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/exploit.cpp\"",
|
||||||
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/exploit.cpp"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/exploit.cpp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/usr/bin/c++ -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/ag_gen/factbase.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/factbase.cpp\"",
|
"command": "/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/ag_gen/factbase.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/factbase.cpp\"",
|
||||||
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/factbase.cpp"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/factbase.cpp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/usr/bin/c++ -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/ag_gen/network_state.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/network_state.cpp\"",
|
"command": "/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/ag_gen/network_state.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/network_state.cpp\"",
|
||||||
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/network_state.cpp"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/network_state.cpp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/usr/bin/c++ -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/ag_gen/quality.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/quality.cpp\"",
|
"command": "/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/ag_gen/quality.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/quality.cpp\"",
|
||||||
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/quality.cpp"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/quality.cpp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/usr/bin/c++ -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/ag_gen/topology.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/topology.cpp\"",
|
"command": "/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/ag_gen/topology.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/topology.cpp\"",
|
||||||
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/topology.cpp"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/topology.cpp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/usr/bin/c++ -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/util/avail_mem.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/avail_mem.cpp\"",
|
"command": "/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/util/avail_mem.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/avail_mem.cpp\"",
|
||||||
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/avail_mem.cpp"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/avail_mem.cpp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/usr/bin/cc -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -o CMakeFiles/ag_gen.dir/src/util/build_sql.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/build_sql.c\"",
|
"command": "/usr/bin/cc -DBOOST_ALL_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -o CMakeFiles/ag_gen.dir/src/util/build_sql.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/build_sql.c\"",
|
||||||
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/build_sql.c"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/build_sql.c"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/usr/bin/c++ -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/util/common.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/common.cpp\"",
|
"command": "/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/util/common.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/common.cpp\"",
|
||||||
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/common.cpp"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/common.cpp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/usr/bin/c++ -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/util/db_functions.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/db_functions.cpp\"",
|
"command": "/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/util/db_functions.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/db_functions.cpp\"",
|
||||||
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/db_functions.cpp"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/db_functions.cpp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/usr/bin/cc -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -o CMakeFiles/ag_gen.dir/src/util/hash.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/hash.c\"",
|
"command": "/usr/bin/cc -DBOOST_ALL_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -o CMakeFiles/ag_gen.dir/src/util/hash.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/hash.c\"",
|
||||||
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/hash.c"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/hash.c"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/usr/bin/cc -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -o CMakeFiles/ag_gen.dir/src/util/list.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/list.c\"",
|
"command": "/usr/bin/cc -DBOOST_ALL_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -o CMakeFiles/ag_gen.dir/src/util/list.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/list.c\"",
|
||||||
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/list.c"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/list.c"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/usr/bin/cc -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -o CMakeFiles/ag_gen.dir/src/util/mem.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/mem.c\"",
|
"command": "/usr/bin/cc -DBOOST_ALL_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -o CMakeFiles/ag_gen.dir/src/util/mem.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/mem.c\"",
|
||||||
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/mem.c"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/mem.c"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/usr/bin/c++ -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/util/redis_manager.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/redis_manager.cpp\"",
|
"command": "/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/util/redis_manager.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/redis_manager.cpp\"",
|
||||||
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/redis_manager.cpp"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/redis_manager.cpp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/usr/bin/cc -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -o CMakeFiles/ag_gen.dir/src/util/str_array.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/str_array.c\"",
|
"command": "/usr/bin/cc -DBOOST_ALL_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -o CMakeFiles/ag_gen.dir/src/util/str_array.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/str_array.c\"",
|
||||||
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/str_array.c"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/str_array.c"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/usr/bin/cc -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -o CMakeFiles/ag_gen.dir/src/util/vector.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/vector.c\"",
|
"command": "/usr/bin/cc -DBOOST_ALL_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -o CMakeFiles/ag_gen.dir/src/util/vector.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/vector.c\"",
|
||||||
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/vector.c"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/vector.c"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
|
"command": "/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/mpi/serialize.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/mpi/serialize.cpp\"",
|
||||||
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/mpi/serialize.cpp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
|
"command": "/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -o CMakeFiles/ag_gen.dir/src/mpi/tasks.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/mpi/tasks.cpp\"",
|
||||||
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/mpi/tasks.cpp"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
BIN
build/decode
BIN
build/decode
Binary file not shown.
1
build/qualfile.txt
Normal file
1
build/qualfile.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
22 serialization::archive 19 0 0 0 0 0 0 0 8 0 0 0 0 12 brake_months 1 = 1 6 17 0 14 exhaust_months 1 = 2 12 17 0 11 ac_odometer 1 = 6 120000 17 0 6 engine 1 = 3 gas 17 0 9 brake_vio 1 = 5 false 17 0 11 exhaust_vio 1 = 5 false 17 0 6 ac_vio 1 = 5 false 17 0 14 compliance_vio 1 = 5 false 17 0 0 1 0 0 0 0 0 4 road 0 0 2
|
||||||
@ -3,7 +3,7 @@ sudo -u postgres -i sh -c "createdb ag_gen ag_gen"
|
|||||||
psql ag_gen < schema.sql
|
psql ag_gen < schema.sql
|
||||||
#./ag_gen -n ../car_examples/generic_timeline_maintenance.nm -x ../car_examples/tmp.xp -g DOTFILE.dot -t 1 -q 1
|
#./ag_gen -n ../car_examples/generic_timeline_maintenance.nm -x ../car_examples/tmp.xp -g DOTFILE.dot -t 1 -q 1
|
||||||
#./ag_gen -n ../car_examples/generic_maintenance.nm -x ../car_examples/generic_maintenance.xp -g DOTFILE.dot -t 1 -q 1
|
#./ag_gen -n ../car_examples/generic_maintenance.nm -x ../car_examples/generic_maintenance.xp -g DOTFILE.dot -t 1 -q 1
|
||||||
./ag_gen -n ../fpga_examples/Network_5/car_network5.nm -x ../fpga_examples/Network_5/car_network5.xp -g DOTFILE.dot -t 1 -q 1 -p -a .20
|
./ag_gen -n ../fpga_examples/Network_1/car_network1.nm -x ../fpga_examples/Network_1/car_network1.xp -g DOTFILE.dot -t 1 -q 1 -p -a .20
|
||||||
#./ag_gen -n ../car_examples/generic_timeline_maintenance.nm -x ../car_examples/sync_timeline_maintenance.xp -g DOTFILE.dot -t 1 -q 1
|
#./ag_gen -n ../car_examples/generic_timeline_maintenance.nm -x ../car_examples/sync_timeline_maintenance.xp -g DOTFILE.dot -t 1 -q 1
|
||||||
|
|
||||||
# python3 ../tools/color_code.py ../build/states.txt DOTFILE.dot new.dot
|
# python3 ../tools/color_code.py ../build/states.txt DOTFILE.dot new.dot
|
||||||
|
|||||||
BIN
build/serialize
Executable file
BIN
build/serialize
Executable file
Binary file not shown.
11
build/serialize.sh
Executable file
11
build/serialize.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
sudo -u postgres -i sh -c "dropdb ag_gen" || true
|
||||||
|
sudo -u postgres -i sh -c "createdb ag_gen ag_gen"
|
||||||
|
psql ag_gen < schema.sql
|
||||||
|
#./ag_gen -n ../car_examples/generic_timeline_maintenance.nm -x ../car_examples/tmp.xp -g DOTFILE.dot -t 1 -q 1
|
||||||
|
#./ag_gen -n ../car_examples/generic_maintenance.nm -x ../car_examples/generic_maintenance.xp -g DOTFILE.dot -t 1 -q 1
|
||||||
|
./serialize -n ../fpga_examples/Network_5/car_network5.nm -x ../fpga_examples/Network_5/car_network5.xp -g DOTFILE.dot -t 1 -q 1 -p -a .20
|
||||||
|
#./ag_gen -n ../car_examples/generic_timeline_maintenance.nm -x ../car_examples/sync_timeline_maintenance.xp -g DOTFILE.dot -t 1 -q 1
|
||||||
|
|
||||||
|
# python3 ../tools/color_code.py ../build/states.txt DOTFILE.dot new.dot
|
||||||
|
#dot -Tsvg new.dot > ag.svg
|
||||||
|
dot -Tsvg DOTFILE.dot > ag.svg
|
||||||
1761512
build/states.txt
1761512
build/states.txt
File diff suppressed because it is too large
Load Diff
7
deps.sh
7
deps.sh
@ -12,15 +12,16 @@ if [[ $OS = 'darwin' ]]; then
|
|||||||
fi
|
fi
|
||||||
elif [[ $OS = 'linux' ]]; then
|
elif [[ $OS = 'linux' ]]; then
|
||||||
if hash pacman 2>/dev/null; then
|
if hash pacman 2>/dev/null; then
|
||||||
sudo pacman -S cmake postgresql boost cppcheck clang doxygen graphviz libconfig
|
sudo pacman -S cmake postgresql boost cppcheck clang doxygen graphviz libconfig openmpi
|
||||||
elif hash apt-get 2>/dev/null; then
|
elif hash apt-get 2>/dev/null; then
|
||||||
sudo apt-get -y install libboost-graph-dev postgresql postgresql-contrib \
|
sudo apt-get -y install libboost-graph-dev postgresql postgresql-contrib \
|
||||||
libpq-dev cppcheck clang valgrind doxygen graphviz cmake \
|
libpq-dev cppcheck clang valgrind doxygen graphviz cmake \
|
||||||
build-essential bison flex libssl-dev libconfig++-dev libyaml-cpp-dev
|
build-essential bison flex libssl-dev libconfig++-dev libyaml-cpp-dev \
|
||||||
|
openmpi
|
||||||
elif hash yum 2>/dev/null; then
|
elif hash yum 2>/dev/null; then
|
||||||
sudo yum install cmake epel-release postgresql-devel boost-devel \
|
sudo yum install cmake epel-release postgresql-devel boost-devel \
|
||||||
openssl-devel graphviz-devel bison-devel flex-devel cppcheck valgrind \
|
openssl-devel graphviz-devel bison-devel flex-devel cppcheck valgrind \
|
||||||
tbb libconfig-devel
|
tbb libconfig-devel openmpi
|
||||||
else
|
else
|
||||||
echo "Your distro is currently not supported."
|
echo "Your distro is currently not supported."
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -16,6 +16,7 @@
|
|||||||
#include "../util/odometer.h"
|
#include "../util/odometer.h"
|
||||||
#include "../util/db_functions.h"
|
#include "../util/db_functions.h"
|
||||||
#include "../util/avail_mem.h"
|
#include "../util/avail_mem.h"
|
||||||
|
#include "../mpi/tasks.h"
|
||||||
|
|
||||||
#ifdef REDIS
|
#ifdef REDIS
|
||||||
|
|
||||||
|
|||||||
@ -26,6 +26,11 @@ Factbase::Factbase(std::vector<Quality> q, std::vector<Topology> t)
|
|||||||
id = 0;
|
id = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Factbase::Factbase()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Increments the current ID.
|
* @brief Increments the current ID.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -5,6 +5,18 @@
|
|||||||
#include <functional>
|
#include <functional>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include <boost/archive/tmpdir.hpp>
|
||||||
|
#include <boost/archive/text_iarchive.hpp>
|
||||||
|
#include <boost/archive/text_oarchive.hpp>
|
||||||
|
|
||||||
|
#include <boost/serialization/base_object.hpp>
|
||||||
|
#include <boost/serialization/utility.hpp>
|
||||||
|
#include <boost/serialization/vector.hpp>
|
||||||
|
#include <boost/serialization/assume_abstract.hpp>
|
||||||
|
#include <boost/serialization/string.hpp>
|
||||||
|
|
||||||
|
#include <boost/serialization/is_bitwise_serializable.hpp>
|
||||||
|
|
||||||
#include "quality.h"
|
#include "quality.h"
|
||||||
#include "topology.h"
|
#include "topology.h"
|
||||||
|
|
||||||
@ -18,7 +30,13 @@ class NetworkState;
|
|||||||
class Factbase {
|
class Factbase {
|
||||||
static int current_id;
|
static int current_id;
|
||||||
|
|
||||||
|
friend std::ostream & operator << (std::ostream &os, const Factbase &fb);
|
||||||
|
friend class boost::serialization::access;
|
||||||
int id;
|
int id;
|
||||||
|
|
||||||
|
int qsize;
|
||||||
|
int tsize;
|
||||||
|
|
||||||
std::vector<Quality> qualities;
|
std::vector<Quality> qualities;
|
||||||
std::vector<Topology> topologies;
|
std::vector<Topology> topologies;
|
||||||
|
|
||||||
@ -26,8 +44,17 @@ class Factbase {
|
|||||||
|
|
||||||
friend class NetworkState;
|
friend class NetworkState;
|
||||||
|
|
||||||
|
template<class Archive>
|
||||||
|
void serialize(Archive &ar, const unsigned int /* file_version */){
|
||||||
|
ar & id;
|
||||||
|
ar & qualities;
|
||||||
|
ar & topologies;
|
||||||
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
Factbase();
|
||||||
|
|
||||||
std::tuple<std::vector<Quality>, std::vector<Topology>> get_facts_tuple() const;
|
std::tuple<std::vector<Quality>, std::vector<Topology>> get_facts_tuple() const;
|
||||||
|
|
||||||
bool find_quality(Quality &q) const;
|
bool find_quality(Quality &q) const;
|
||||||
@ -50,4 +77,6 @@ class Factbase {
|
|||||||
int get_size();
|
int get_size();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
BOOST_SERIALIZATION_ASSUME_ABSTRACT(Factbase)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -27,6 +27,11 @@ NetworkState::NetworkState(std::vector<Quality> q, std::vector<Topology> t)
|
|||||||
*/
|
*/
|
||||||
NetworkState::NetworkState(const NetworkState &ns) = default;
|
NetworkState::NetworkState(const NetworkState &ns) = default;
|
||||||
|
|
||||||
|
NetworkState::NetworkState()
|
||||||
|
{
|
||||||
|
//: Factbase()
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Sets the ID of the Factbase
|
* @brief Sets the ID of the Factbase
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -10,6 +10,18 @@
|
|||||||
#include "quality.h"
|
#include "quality.h"
|
||||||
#include "topology.h"
|
#include "topology.h"
|
||||||
|
|
||||||
|
#include <boost/archive/tmpdir.hpp>
|
||||||
|
#include <boost/archive/text_iarchive.hpp>
|
||||||
|
#include <boost/archive/text_oarchive.hpp>
|
||||||
|
|
||||||
|
#include <boost/serialization/base_object.hpp>
|
||||||
|
#include <boost/serialization/utility.hpp>
|
||||||
|
#include <boost/serialization/list.hpp>
|
||||||
|
#include <boost/serialization/assume_abstract.hpp>
|
||||||
|
#include <boost/serialization/string.hpp>
|
||||||
|
|
||||||
|
#include <boost/serialization/is_bitwise_serializable.hpp>
|
||||||
|
|
||||||
#include "../util/keyvalue.h"
|
#include "../util/keyvalue.h"
|
||||||
#include "../util/redis_manager.h"
|
#include "../util/redis_manager.h"
|
||||||
|
|
||||||
@ -25,9 +37,18 @@ class NetworkState {
|
|||||||
Factbase factbase;
|
Factbase factbase;
|
||||||
friend class Factbase;
|
friend class Factbase;
|
||||||
|
|
||||||
|
friend std::ostream & operator << (std::ostream &os, const NetworkState &nsb);
|
||||||
|
friend class boost::serialization::access;
|
||||||
|
|
||||||
|
template<class Archive>
|
||||||
|
void serialize(Archive &ar, const unsigned int version){
|
||||||
|
ar & factbase;
|
||||||
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NetworkState(std::vector<Quality> q, std::vector<Topology> t);
|
NetworkState(std::vector<Quality> q, std::vector<Topology> t);
|
||||||
NetworkState(const NetworkState &ns);
|
NetworkState(const NetworkState &ns);
|
||||||
|
NetworkState();
|
||||||
|
|
||||||
const Factbase &get_factbase() const;
|
const Factbase &get_factbase() const;
|
||||||
size_t get_hash(Keyvalue &factlist) const;
|
size_t get_hash(Keyvalue &factlist) const;
|
||||||
@ -51,4 +72,6 @@ class NetworkState {
|
|||||||
void delete_topology(Topology &t);
|
void delete_topology(Topology &t);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
BOOST_SERIALIZATION_ASSUME_ABSTRACT(NetworkState)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -24,6 +24,11 @@
|
|||||||
Quality::Quality(int asset, std::string qualName, std::string o, std::string qualValue, Keyvalue &facts)
|
Quality::Quality(int asset, std::string qualName, std::string o, std::string qualValue, Keyvalue &facts)
|
||||||
: asset_id(asset), name(std::move(qualName)), op(std::move(o)), value(std::move(qualValue)), encoded((size_t)facts.size()) {}
|
: asset_id(asset), name(std::move(qualName)), op(std::move(o)), value(std::move(qualValue)), encoded((size_t)facts.size()) {}
|
||||||
|
|
||||||
|
Quality::Quality()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
int Quality::get_asset_id() const { return asset_id; }
|
int Quality::get_asset_id() const { return asset_id; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -7,8 +7,23 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include <boost/archive/tmpdir.hpp>
|
||||||
|
#include <boost/archive/text_iarchive.hpp>
|
||||||
|
#include <boost/archive/text_oarchive.hpp>
|
||||||
|
|
||||||
|
#include <boost/serialization/base_object.hpp>
|
||||||
|
#include <boost/serialization/utility.hpp>
|
||||||
|
#include <boost/serialization/list.hpp>
|
||||||
|
#include <boost/serialization/assume_abstract.hpp>
|
||||||
|
#include <boost/serialization/string.hpp>
|
||||||
|
|
||||||
|
#include <boost/serialization/is_bitwise_serializable.hpp>
|
||||||
|
|
||||||
|
|
||||||
#include "../util/keyvalue.h"
|
#include "../util/keyvalue.h"
|
||||||
|
|
||||||
|
|
||||||
|
//EncodedQuality is a POD: can leverage bitwise serialization
|
||||||
union EncodedQuality {
|
union EncodedQuality {
|
||||||
struct {
|
struct {
|
||||||
int asset_id : 16;
|
int asset_id : 16;
|
||||||
@ -19,6 +34,8 @@ union EncodedQuality {
|
|||||||
size_t enc;
|
size_t enc;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
BOOST_IS_BITWISE_SERIALIZABLE(EncodedQuality)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Holds information about a Quality and a parameter number.
|
* @brief Holds information about a Quality and a parameter number.
|
||||||
*/
|
*/
|
||||||
@ -44,6 +61,10 @@ using PostconditionQuality = std::tuple<ParameterizedQuality, std::string>;
|
|||||||
* @brief Holds information for the Quality
|
* @brief Holds information for the Quality
|
||||||
*/
|
*/
|
||||||
class Quality {
|
class Quality {
|
||||||
|
|
||||||
|
friend std::ostream & operator << (std::ostream &os, const Quality &ql);
|
||||||
|
friend class boost::serialization::access;
|
||||||
|
|
||||||
int asset_id;
|
int asset_id;
|
||||||
std::string name;
|
std::string name;
|
||||||
std::string op;
|
std::string op;
|
||||||
@ -55,9 +76,15 @@ class Quality {
|
|||||||
|
|
||||||
friend class Factbase;
|
friend class Factbase;
|
||||||
|
|
||||||
|
template<class Archive>
|
||||||
|
void serialize(Archive &ar, const unsigned int /* file_version */){
|
||||||
|
ar & asset_id & name & op & value & encoded;
|
||||||
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Quality(int assetId, std::string qualName, std::string op,
|
Quality(int assetId, std::string qualName, std::string op,
|
||||||
std::string qualValue, Keyvalue &facts);
|
std::string qualValue, Keyvalue &facts);
|
||||||
|
Quality();
|
||||||
|
|
||||||
int get_asset_id() const;
|
int get_asset_id() const;
|
||||||
std::string get_name() const;
|
std::string get_name() const;
|
||||||
@ -77,6 +104,7 @@ class Quality {
|
|||||||
bool operator>(const Quality &rhs) const;
|
bool operator>(const Quality &rhs) const;
|
||||||
bool operator>=(const Quality &rhs) const;
|
bool operator>=(const Quality &rhs) const;
|
||||||
bool operator<=(const Quality &rhs) const;
|
bool operator<=(const Quality &rhs) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // AG_GEN_QUALITY_H
|
#endif // AG_GEN_QUALITY_H
|
||||||
|
|||||||
@ -18,6 +18,11 @@ Topology::Topology(int f_asset, int t_asset, DIRECTION_T dir, std::string proper
|
|||||||
: from_asset_id(f_asset), to_asset_id(t_asset), property(move(property)),
|
: from_asset_id(f_asset), to_asset_id(t_asset), property(move(property)),
|
||||||
op(move(op)), value(move(val)), dir(std::move(dir)), encoded(encode(facts).enc) {}
|
op(move(op)), value(move(val)), dir(std::move(dir)), encoded(encode(facts).enc) {}
|
||||||
|
|
||||||
|
Topology::Topology()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return The From Asset ID
|
* @return The From Asset ID
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -3,6 +3,17 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <boost/archive/tmpdir.hpp>
|
||||||
|
#include <boost/archive/text_iarchive.hpp>
|
||||||
|
#include <boost/archive/text_oarchive.hpp>
|
||||||
|
|
||||||
|
#include <boost/serialization/base_object.hpp>
|
||||||
|
#include <boost/serialization/utility.hpp>
|
||||||
|
#include <boost/serialization/list.hpp>
|
||||||
|
#include <boost/serialization/assume_abstract.hpp>
|
||||||
|
#include <boost/serialization/string.hpp>
|
||||||
|
|
||||||
|
#include <boost/serialization/is_bitwise_serializable.hpp>
|
||||||
|
|
||||||
#include "../util/keyvalue.h"
|
#include "../util/keyvalue.h"
|
||||||
|
|
||||||
@ -25,6 +36,9 @@ union EncodedTopology {
|
|||||||
size_t enc;
|
size_t enc;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
BOOST_IS_BITWISE_SERIALIZABLE(EncodedTopology)
|
||||||
|
|
||||||
|
|
||||||
struct ParameterizedTopology {
|
struct ParameterizedTopology {
|
||||||
int from_param;
|
int from_param;
|
||||||
int to_param;
|
int to_param;
|
||||||
@ -56,6 +70,10 @@ using PostconditionTopology = std::tuple<ParameterizedTopology, std::string>;
|
|||||||
* @brief Holds information for the Topology
|
* @brief Holds information for the Topology
|
||||||
*/
|
*/
|
||||||
class Topology {
|
class Topology {
|
||||||
|
|
||||||
|
friend std::ostream & operator << (std::ostream &os, const Topology &tl);
|
||||||
|
friend class boost::serialization::access;
|
||||||
|
|
||||||
int from_asset_id;
|
int from_asset_id;
|
||||||
int to_asset_id;
|
int to_asset_id;
|
||||||
std::string property;
|
std::string property;
|
||||||
@ -69,9 +87,15 @@ class Topology {
|
|||||||
|
|
||||||
friend class Factbase;
|
friend class Factbase;
|
||||||
|
|
||||||
|
template<class Archive>
|
||||||
|
void serialize(Archive &ar, const unsigned int /* file_version */){
|
||||||
|
ar & from_asset_id & to_asset_id & property & op & value & dir;
|
||||||
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Topology(int f_asset, int t_asset, DIRECTION_T dir, std::string property,
|
Topology(int f_asset, int t_asset, DIRECTION_T dir, std::string property,
|
||||||
std::string op, std::string val, Keyvalue &facts);
|
std::string op, std::string val, Keyvalue &facts);
|
||||||
|
Topology();
|
||||||
|
|
||||||
int get_from_asset_id() const;
|
int get_from_asset_id() const;
|
||||||
int get_to_asset_id() const;
|
int get_to_asset_id() const;
|
||||||
|
|||||||
@ -32,6 +32,7 @@
|
|||||||
#include "util/hash.h"
|
#include "util/hash.h"
|
||||||
#include "util/list.h"
|
#include "util/list.h"
|
||||||
#include "util/mem.h"
|
#include "util/mem.h"
|
||||||
|
#include "mpi/serialize.h"
|
||||||
|
|
||||||
#ifdef REDIS
|
#ifdef REDIS
|
||||||
#include "util/redis_manager.h"
|
#include "util/redis_manager.h"
|
||||||
@ -624,10 +625,17 @@ int main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
AGGenInstance postinstance;
|
AGGenInstance postinstance;
|
||||||
|
|
||||||
|
//Serialization Unit Testing on Initial Data
|
||||||
|
//serialization_unit_testing(_instance);
|
||||||
|
|
||||||
std::cout << "Generating Attack Graph: " << std::flush;
|
std::cout << "Generating Attack Graph: " << std::flush;
|
||||||
AGGen gen(_instance);//use AGGen class to instantiate an obj with the name gen! _instance obj as the parameter! constructor defined in ag_gen.cpp
|
AGGen gen(_instance);//use AGGen class to instantiate an obj with the name gen! _instance obj as the parameter! constructor defined in ag_gen.cpp
|
||||||
postinstance = gen.generate(batch_process, batch_size, thread_count, init_qsize, alpha); //The method call to generate the attack graph, defined in ag_gen.cpp.
|
postinstance = gen.generate(batch_process, batch_size, thread_count, init_qsize, alpha); //The method call to generate the attack graph, defined in ag_gen.cpp.
|
||||||
|
|
||||||
|
//Serialization Unit Testing on Postinstance Data
|
||||||
|
serialization_unit_testing(postinstance);
|
||||||
|
|
||||||
|
|
||||||
std::cout << "Done\n";
|
std::cout << "Done\n";
|
||||||
//std::cout << "# of edges " <<postinstance.edges.size()<<std::endl;
|
//std::cout << "# of edges " <<postinstance.edges.size()<<std::endl;
|
||||||
//std::cout << "# of edge_asset_binding" <<postinstance.edges.size()<<std::endl;
|
//std::cout << "# of edge_asset_binding" <<postinstance.edges.size()<<std::endl;
|
||||||
|
|||||||
316
src/mpi/serialize.cpp
Normal file
316
src/mpi/serialize.cpp
Normal file
@ -0,0 +1,316 @@
|
|||||||
|
//! main.cpp contains the main fuction that runs the program including flag
|
||||||
|
//! handling and calls to functions that access the database and generate the
|
||||||
|
//! attack graph.
|
||||||
|
//!
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
#include <fstream>
|
||||||
|
#include <vector>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#include "../ag_gen/asset.h"
|
||||||
|
#include "../ag_gen/assetgroup.h"
|
||||||
|
#include "../ag_gen/edge.h"
|
||||||
|
#include "../ag_gen/exploit.h"
|
||||||
|
#include "../ag_gen/factbase.h"
|
||||||
|
#include "../ag_gen/network_state.h"
|
||||||
|
#include "../ag_gen/ag_gen.h"
|
||||||
|
|
||||||
|
#include <boost/graph/adjacency_list.hpp>
|
||||||
|
#include <boost/graph/properties.hpp>
|
||||||
|
#include <boost/graph/graphviz.hpp>
|
||||||
|
#include <boost/property_tree/ptree.hpp>
|
||||||
|
#include <boost/property_tree/ini_parser.hpp>
|
||||||
|
#include <boost/graph/visitors.hpp>
|
||||||
|
#include <boost/graph/depth_first_search.hpp>
|
||||||
|
|
||||||
|
|
||||||
|
#include <boost/archive/tmpdir.hpp>
|
||||||
|
#include <boost/archive/text_iarchive.hpp>
|
||||||
|
#include <boost/archive/text_oarchive.hpp>
|
||||||
|
|
||||||
|
#include <boost/serialization/base_object.hpp>
|
||||||
|
#include <boost/serialization/utility.hpp>
|
||||||
|
#include <boost/serialization/list.hpp>
|
||||||
|
#include <boost/serialization/assume_abstract.hpp>
|
||||||
|
#include <boost/serialization/string.hpp>
|
||||||
|
|
||||||
|
#include <boost/serialization/is_bitwise_serializable.hpp>
|
||||||
|
|
||||||
|
|
||||||
|
void save_quality(const Quality &q, const char * filename){
|
||||||
|
std::ofstream ofs(filename);
|
||||||
|
boost::archive::text_oarchive oa(ofs);
|
||||||
|
oa << q;
|
||||||
|
}
|
||||||
|
|
||||||
|
void restore_quality(Quality &q, const char * filename){
|
||||||
|
std::ifstream ifs(filename);
|
||||||
|
boost::archive::text_iarchive ia(ifs);
|
||||||
|
ia >> q;
|
||||||
|
}
|
||||||
|
|
||||||
|
int quality_check(Quality &q1, Quality &q2){
|
||||||
|
if (q1.get_asset_id() == q2.get_asset_id() &&
|
||||||
|
q1.get_name() == q2.get_name() &&
|
||||||
|
q1.get_op() == q2.get_op() &&
|
||||||
|
q1.get_value() == q2.get_value())
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
else return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void save_topology(const Topology &t, const char * filename){
|
||||||
|
std::ofstream ofs(filename);
|
||||||
|
boost::archive::text_oarchive oa(ofs);
|
||||||
|
oa << t;
|
||||||
|
}
|
||||||
|
|
||||||
|
void restore_topology(Topology &t, const char * filename){
|
||||||
|
std::ifstream ifs(filename);
|
||||||
|
boost::archive::text_iarchive ia(ifs);
|
||||||
|
ia >> t;
|
||||||
|
}
|
||||||
|
|
||||||
|
int topology_check(Topology &t1, Topology &t2){
|
||||||
|
if (t1.get_from_asset_id() == t2.get_from_asset_id() &&
|
||||||
|
t1.get_to_asset_id() == t2.get_to_asset_id() &&
|
||||||
|
t1.get_dir() == t2.get_dir() &&
|
||||||
|
t1.get_property() == t2.get_property() &&
|
||||||
|
t1.get_op() == t2.get_op() &&
|
||||||
|
t1.get_value() == t2.get_value())
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
else return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void save_factbase(const Factbase &fb, const char * filename){
|
||||||
|
std::ofstream ofs(filename);
|
||||||
|
boost::archive::text_oarchive oa(ofs);
|
||||||
|
oa << fb;
|
||||||
|
}
|
||||||
|
|
||||||
|
void restore_factbase(Factbase &fb, const char * filename){
|
||||||
|
std::ifstream ifs(filename);
|
||||||
|
boost::archive::text_iarchive ia(ifs);
|
||||||
|
ia >> fb;
|
||||||
|
}
|
||||||
|
|
||||||
|
int factbase_check(Factbase &fb1, Factbase &fb2){
|
||||||
|
int qual_count = 0;
|
||||||
|
int qual_corr = 0;
|
||||||
|
int topo_count = 0;
|
||||||
|
int topo_corr = 0;
|
||||||
|
|
||||||
|
auto fb1_tuple = fb1.get_facts_tuple();
|
||||||
|
auto fb1_quals = std::get<0>(fb1_tuple);
|
||||||
|
auto fb1_topos = std::get<1>(fb1_tuple);
|
||||||
|
|
||||||
|
auto fb2_tuple = fb2.get_facts_tuple();
|
||||||
|
auto fb2_quals = std::get<0>(fb2_tuple);
|
||||||
|
auto fb2_topos = std::get<1>(fb2_tuple);
|
||||||
|
|
||||||
|
auto itq1 = fb1_quals.begin();
|
||||||
|
auto itq2 = fb2_quals.begin();
|
||||||
|
|
||||||
|
auto itt1 = fb1_topos.begin();
|
||||||
|
auto itt2 = fb2_topos.begin();
|
||||||
|
|
||||||
|
while(itq1 != fb1_quals.end() || itq2 != fb2_quals.end())
|
||||||
|
{
|
||||||
|
qual_corr += quality_check(*itq1, *itq2);
|
||||||
|
qual_count++;
|
||||||
|
|
||||||
|
if(itq1 != fb1_quals.end())
|
||||||
|
++itq1;
|
||||||
|
|
||||||
|
if(itq2 != fb2_quals.end())
|
||||||
|
++itq2;
|
||||||
|
}
|
||||||
|
|
||||||
|
while(itt1 != fb1_topos.end() || itt2 != fb2_topos.end())
|
||||||
|
{
|
||||||
|
topo_corr += topology_check(*itt1, *itt2);
|
||||||
|
topo_count++;
|
||||||
|
|
||||||
|
if(itt1 != fb1_topos.end())
|
||||||
|
++itt1;
|
||||||
|
|
||||||
|
if(itt2 != fb2_topos.end())
|
||||||
|
++itt2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(fb1.get_id() == fb2.get_id() &&
|
||||||
|
qual_count == qual_corr &&
|
||||||
|
topo_count == topo_corr)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
else return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void save_network_state(const NetworkState &ns, const char * filename){
|
||||||
|
std::ofstream ofs(filename);
|
||||||
|
boost::archive::text_oarchive oa(ofs);
|
||||||
|
oa << ns;
|
||||||
|
}
|
||||||
|
|
||||||
|
void restore_network_state(NetworkState &ns, const char * filename){
|
||||||
|
std::ifstream ifs(filename);
|
||||||
|
boost::archive::text_iarchive ia(ifs);
|
||||||
|
ia >> ns;
|
||||||
|
}
|
||||||
|
|
||||||
|
int network_state_check(NetworkState &ns1, NetworkState &ns2){
|
||||||
|
auto fb1 = ns1.get_factbase();
|
||||||
|
auto fb2 = ns2.get_factbase();
|
||||||
|
|
||||||
|
return factbase_check(fb1, fb2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void serialization_unit_testing(AGGenInstance &instance){
|
||||||
|
|
||||||
|
printf("\n");
|
||||||
|
std::cout << "---------STARTING SERIALIZATION UNIT TESTING---------" << std::endl;
|
||||||
|
std::string filename(boost::archive::tmpdir());
|
||||||
|
filename += "/qualfile.txt";
|
||||||
|
|
||||||
|
auto init_quals = instance.initial_qualities;
|
||||||
|
auto init_topos = instance.initial_topologies;
|
||||||
|
NetworkState init_state(init_quals, init_topos);//instantiate an obj init_state with initial input
|
||||||
|
|
||||||
|
int e_flag = 0;
|
||||||
|
int qual_count = 0;
|
||||||
|
int qual_corr = 0;
|
||||||
|
int top_count = 0;
|
||||||
|
int top_corr = 0;
|
||||||
|
int fb_count = 0;
|
||||||
|
int fb_corr = 0;
|
||||||
|
int ns_count = 0;
|
||||||
|
int ns_corr = 0;
|
||||||
|
|
||||||
|
std::cout << "Performing Unit Testing on Quality Serialization." << std::endl;
|
||||||
|
for (auto qual : instance.initial_qualities)
|
||||||
|
{
|
||||||
|
//std::cout << "Orginial Quality:" << std::endl;
|
||||||
|
//qual.print();
|
||||||
|
//printf("\n");
|
||||||
|
|
||||||
|
save_quality(qual, filename.c_str());
|
||||||
|
|
||||||
|
Quality new_qual;
|
||||||
|
restore_quality(new_qual, filename.c_str());
|
||||||
|
|
||||||
|
//std::cout << "Quality after restoring from serialization:" << std::endl;
|
||||||
|
//new_qual.print();
|
||||||
|
//std::cout << "-------------------------------------------" << std::endl;
|
||||||
|
//printf("\n");
|
||||||
|
qual_count++;
|
||||||
|
qual_corr += quality_check(qual, new_qual);
|
||||||
|
}
|
||||||
|
std::cout << "Quality Unit Testing: " << std::to_string(qual_corr) << "/" << std::to_string(qual_count) << std::endl;
|
||||||
|
printf("\n");
|
||||||
|
|
||||||
|
|
||||||
|
std::cout << "Performing Unit Testing on Topology Serialization." << std::endl;
|
||||||
|
for (auto topo : instance.initial_topologies)
|
||||||
|
{
|
||||||
|
//std::cout << "Original Topology: " << std::endl;
|
||||||
|
//topo.print();
|
||||||
|
|
||||||
|
save_topology(topo, filename.c_str());
|
||||||
|
|
||||||
|
Topology new_top;
|
||||||
|
restore_topology(new_top, filename.c_str());
|
||||||
|
|
||||||
|
//std::cout << "Topology after restoring from serialization:" << std::endl;
|
||||||
|
//new_top.print();
|
||||||
|
//std::cout << "-------------------------------------------" << std::endl;
|
||||||
|
//printf("\n");
|
||||||
|
top_count++;
|
||||||
|
top_corr += topology_check(topo, new_top);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::cout << "Topology Unit Testing: " << std::to_string(top_corr) << "/" << std::to_string(top_count) << std::endl;
|
||||||
|
printf("\n");
|
||||||
|
|
||||||
|
std::cout << "Performing Unit Testing on Factbase Serialization." << std::endl;
|
||||||
|
for (auto fb : instance.factbases)
|
||||||
|
{
|
||||||
|
save_factbase(fb, filename.c_str());
|
||||||
|
|
||||||
|
Factbase new_fb;
|
||||||
|
restore_factbase(new_fb, filename.c_str());
|
||||||
|
|
||||||
|
fb_count++;
|
||||||
|
fb_corr += factbase_check(fb, new_fb);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::cout << "Factbase Unit Testing: " << std::to_string(fb_corr) << "/" << std::to_string(fb_count) << std::endl;
|
||||||
|
printf("\n");
|
||||||
|
|
||||||
|
std::cout << "Performing Unit Testing on Network State Serialization." << std::endl;
|
||||||
|
save_network_state(init_state, filename.c_str());
|
||||||
|
|
||||||
|
NetworkState new_ns;
|
||||||
|
restore_network_state(new_ns, filename.c_str());
|
||||||
|
|
||||||
|
ns_count++;
|
||||||
|
ns_corr += network_state_check(init_state, new_ns);
|
||||||
|
|
||||||
|
std::cout << "Network State Unit Testing: " << std::to_string(ns_corr) << "/" << std::to_string(ns_count) << std::endl;
|
||||||
|
printf("\n");
|
||||||
|
|
||||||
|
if(qual_corr == qual_count)
|
||||||
|
{
|
||||||
|
std::cout << "100% Success Rate for Quality Serialization." << std::endl;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
std::cout << "Errors occurred in the Quality Serialization." << std::endl;
|
||||||
|
e_flag = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(top_corr == top_count)
|
||||||
|
{
|
||||||
|
std::cout << "100% Success Rate for Topology Serialization." << std::endl;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
std::cout << "Errors occurred in the Topology Serialization." << std::endl;
|
||||||
|
e_flag = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(fb_corr == fb_count)
|
||||||
|
{
|
||||||
|
std::cout << "100% Success Rate for Factbase Serialization." << std::endl;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
std::cout << "Errors occurred in the Factbase Serialization." << std::endl;
|
||||||
|
e_flag = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(ns_corr == ns_count)
|
||||||
|
{
|
||||||
|
std::cout << "100% Success Rate for Network State Serialization." << std::endl;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
std::cout << "Errors occurred in the Network State Serialization." << std::endl;
|
||||||
|
e_flag = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(e_flag == 1)
|
||||||
|
std::cout << "-------------ERRORS OCCURRED DURING SERIALIZATION UNIT TESTING---------------" << std::endl;
|
||||||
|
std::cout << "---------FINISHED SERIALIZATION UNIT TESTING---------" << std::endl;
|
||||||
|
printf("\n");
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
15
src/mpi/serialize.h
Normal file
15
src/mpi/serialize.h
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#ifndef SERIALIZE_H
|
||||||
|
#define SERIALIZE_H
|
||||||
|
|
||||||
|
void save_quality(const Quality &q, const char * filename);
|
||||||
|
void restore_quality(Quality &q, const char * filename);
|
||||||
|
int quality_check(Quality &q1, Quality &q2);
|
||||||
|
|
||||||
|
void save_topology(const Topology &t, const char * filename);
|
||||||
|
void restore_topology(Topology &t, const char * filename);
|
||||||
|
int topology_check(Topology &t1, Topology &t2);
|
||||||
|
|
||||||
|
void serialization_unit_testing(AGGenInstance &instance);
|
||||||
|
|
||||||
|
#endif //SERIALIZE_H
|
||||||
|
|
||||||
2
src/mpi/tasks.cpp
Normal file
2
src/mpi/tasks.cpp
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#include <boost/mpi.hpp>
|
||||||
|
#include <iostream>
|
||||||
0
src/mpi/tasks.h
Normal file
0
src/mpi/tasks.h
Normal file
Loading…
x
Reference in New Issue
Block a user