Code Cleanup and Polishing
This commit is contained in:
parent
daf5d6bbbc
commit
1f72cfbfad
@ -48,19 +48,19 @@ cmake_force:
|
|||||||
SHELL = /bin/sh
|
SHELL = /bin/sh
|
||||||
|
|
||||||
# The CMake executable.
|
# The CMake executable.
|
||||||
CMAKE_COMMAND = /storage/home/nschrick/pkg/cmake/3.22.0/bin/cmake
|
CMAKE_COMMAND = /usr/bin/cmake
|
||||||
|
|
||||||
# The command to remove a file.
|
# The command to remove a file.
|
||||||
RM = /storage/home/nschrick/pkg/cmake/3.22.0/bin/cmake -E rm -f
|
RM = /usr/bin/cmake -E rm -f
|
||||||
|
|
||||||
# Escaping for special characters.
|
# Escaping for special characters.
|
||||||
EQUALS = =
|
EQUALS = =
|
||||||
|
|
||||||
# The top-level source directory on which CMake was run.
|
# The top-level source directory on which CMake was run.
|
||||||
CMAKE_SOURCE_DIR = /home/nschrick/ag_parallel
|
CMAKE_SOURCE_DIR = "/home/noah/Documents/School/Thesis Work/ag_parallel"
|
||||||
|
|
||||||
# The top-level build directory on which CMake was run.
|
# The top-level build directory on which CMake was run.
|
||||||
CMAKE_BINARY_DIR = /home/nschrick/ag_parallel/build
|
CMAKE_BINARY_DIR = "/home/noah/Documents/School/Thesis Work/ag_parallel/build"
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Targets provided globally by CMake.
|
# Targets provided globally by CMake.
|
||||||
@ -68,7 +68,7 @@ CMAKE_BINARY_DIR = /home/nschrick/ag_parallel/build
|
|||||||
# Special rule for the target edit_cache
|
# Special rule for the target edit_cache
|
||||||
edit_cache:
|
edit_cache:
|
||||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
|
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
|
||||||
/storage/home/nschrick/pkg/cmake/3.22.0/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
/usr/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
||||||
.PHONY : edit_cache
|
.PHONY : edit_cache
|
||||||
|
|
||||||
# Special rule for the target edit_cache
|
# Special rule for the target edit_cache
|
||||||
@ -78,7 +78,7 @@ edit_cache/fast: edit_cache
|
|||||||
# Special rule for the target rebuild_cache
|
# Special rule for the target rebuild_cache
|
||||||
rebuild_cache:
|
rebuild_cache:
|
||||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
|
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
|
||||||
/storage/home/nschrick/pkg/cmake/3.22.0/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
/usr/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
||||||
.PHONY : rebuild_cache
|
.PHONY : rebuild_cache
|
||||||
|
|
||||||
# Special rule for the target rebuild_cache
|
# Special rule for the target rebuild_cache
|
||||||
@ -87,9 +87,9 @@ rebuild_cache/fast: rebuild_cache
|
|||||||
|
|
||||||
# The main all target
|
# The main all target
|
||||||
all: cmake_check_build_system
|
all: cmake_check_build_system
|
||||||
$(CMAKE_COMMAND) -E cmake_progress_start /home/nschrick/ag_parallel/build/CMakeFiles /home/nschrick/ag_parallel/build//CMakeFiles/progress.marks
|
$(CMAKE_COMMAND) -E cmake_progress_start "/home/noah/Documents/School/Thesis Work/ag_parallel/build/CMakeFiles" "/home/noah/Documents/School/Thesis Work/ag_parallel/build//CMakeFiles/progress.marks"
|
||||||
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 all
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 all
|
||||||
$(CMAKE_COMMAND) -E cmake_progress_start /home/nschrick/ag_parallel/build/CMakeFiles 0
|
$(CMAKE_COMMAND) -E cmake_progress_start "/home/noah/Documents/School/Thesis Work/ag_parallel/build/CMakeFiles" 0
|
||||||
.PHONY : all
|
.PHONY : all
|
||||||
|
|
||||||
# The main clean target
|
# The main clean target
|
||||||
@ -116,6 +116,19 @@ depend:
|
|||||||
$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
|
$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
|
||||||
.PHONY : depend
|
.PHONY : depend
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Target rules for targets named doc
|
||||||
|
|
||||||
|
# Build rule for target.
|
||||||
|
doc: cmake_check_build_system
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 doc
|
||||||
|
.PHONY : doc
|
||||||
|
|
||||||
|
# fast build rule for target.
|
||||||
|
doc/fast:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/doc.dir/build.make CMakeFiles/doc.dir/build
|
||||||
|
.PHONY : doc/fast
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Target rules for targets named ag_gen
|
# Target rules for targets named ag_gen
|
||||||
|
|
||||||
@ -129,6 +142,19 @@ ag_gen/fast:
|
|||||||
$(MAKE) $(MAKESILENT) -f CMakeFiles/ag_gen.dir/build.make CMakeFiles/ag_gen.dir/build
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/ag_gen.dir/build.make CMakeFiles/ag_gen.dir/build
|
||||||
.PHONY : ag_gen/fast
|
.PHONY : ag_gen/fast
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Target rules for targets named dynstr_test
|
||||||
|
|
||||||
|
# Build rule for target.
|
||||||
|
dynstr_test: cmake_check_build_system
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 dynstr_test
|
||||||
|
.PHONY : dynstr_test
|
||||||
|
|
||||||
|
# fast build rule for target.
|
||||||
|
dynstr_test/fast:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/dynstr_test.dir/build.make CMakeFiles/dynstr_test.dir/build
|
||||||
|
.PHONY : dynstr_test/fast
|
||||||
|
|
||||||
nm_parser.o: nm_parser.c.o
|
nm_parser.o: nm_parser.c.o
|
||||||
.PHONY : nm_parser.o
|
.PHONY : nm_parser.o
|
||||||
|
|
||||||
@ -465,6 +491,30 @@ src/mpi/tasks.cpp.s:
|
|||||||
$(MAKE) $(MAKESILENT) -f CMakeFiles/ag_gen.dir/build.make CMakeFiles/ag_gen.dir/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
|
.PHONY : src/mpi/tasks.cpp.s
|
||||||
|
|
||||||
|
src/tests/mem_test.o: src/tests/mem_test.c.o
|
||||||
|
.PHONY : src/tests/mem_test.o
|
||||||
|
|
||||||
|
# target to build an object file
|
||||||
|
src/tests/mem_test.c.o:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/dynstr_test.dir/build.make CMakeFiles/dynstr_test.dir/src/tests/mem_test.c.o
|
||||||
|
.PHONY : src/tests/mem_test.c.o
|
||||||
|
|
||||||
|
src/tests/mem_test.i: src/tests/mem_test.c.i
|
||||||
|
.PHONY : src/tests/mem_test.i
|
||||||
|
|
||||||
|
# target to preprocess a source file
|
||||||
|
src/tests/mem_test.c.i:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/dynstr_test.dir/build.make CMakeFiles/dynstr_test.dir/src/tests/mem_test.c.i
|
||||||
|
.PHONY : src/tests/mem_test.c.i
|
||||||
|
|
||||||
|
src/tests/mem_test.s: src/tests/mem_test.c.s
|
||||||
|
.PHONY : src/tests/mem_test.s
|
||||||
|
|
||||||
|
# target to generate assembly for a file
|
||||||
|
src/tests/mem_test.c.s:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/dynstr_test.dir/build.make CMakeFiles/dynstr_test.dir/src/tests/mem_test.c.s
|
||||||
|
.PHONY : src/tests/mem_test.c.s
|
||||||
|
|
||||||
src/util/avail_mem.o: src/util/avail_mem.cpp.o
|
src/util/avail_mem.o: src/util/avail_mem.cpp.o
|
||||||
.PHONY : src/util/avail_mem.o
|
.PHONY : src/util/avail_mem.o
|
||||||
|
|
||||||
@ -615,6 +665,7 @@ src/util/mem.o: src/util/mem.c.o
|
|||||||
# target to build an object file
|
# target to build an object file
|
||||||
src/util/mem.c.o:
|
src/util/mem.c.o:
|
||||||
$(MAKE) $(MAKESILENT) -f CMakeFiles/ag_gen.dir/build.make CMakeFiles/ag_gen.dir/src/util/mem.c.o
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/ag_gen.dir/build.make CMakeFiles/ag_gen.dir/src/util/mem.c.o
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/dynstr_test.dir/build.make CMakeFiles/dynstr_test.dir/src/util/mem.c.o
|
||||||
.PHONY : src/util/mem.c.o
|
.PHONY : src/util/mem.c.o
|
||||||
|
|
||||||
src/util/mem.i: src/util/mem.c.i
|
src/util/mem.i: src/util/mem.c.i
|
||||||
@ -623,6 +674,7 @@ src/util/mem.i: src/util/mem.c.i
|
|||||||
# target to preprocess a source file
|
# target to preprocess a source file
|
||||||
src/util/mem.c.i:
|
src/util/mem.c.i:
|
||||||
$(MAKE) $(MAKESILENT) -f CMakeFiles/ag_gen.dir/build.make CMakeFiles/ag_gen.dir/src/util/mem.c.i
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/ag_gen.dir/build.make CMakeFiles/ag_gen.dir/src/util/mem.c.i
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/dynstr_test.dir/build.make CMakeFiles/dynstr_test.dir/src/util/mem.c.i
|
||||||
.PHONY : src/util/mem.c.i
|
.PHONY : src/util/mem.c.i
|
||||||
|
|
||||||
src/util/mem.s: src/util/mem.c.s
|
src/util/mem.s: src/util/mem.c.s
|
||||||
@ -631,6 +683,7 @@ src/util/mem.s: src/util/mem.c.s
|
|||||||
# target to generate assembly for a file
|
# target to generate assembly for a file
|
||||||
src/util/mem.c.s:
|
src/util/mem.c.s:
|
||||||
$(MAKE) $(MAKESILENT) -f CMakeFiles/ag_gen.dir/build.make CMakeFiles/ag_gen.dir/src/util/mem.c.s
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/ag_gen.dir/build.make CMakeFiles/ag_gen.dir/src/util/mem.c.s
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/dynstr_test.dir/build.make CMakeFiles/dynstr_test.dir/src/util/mem.c.s
|
||||||
.PHONY : src/util/mem.c.s
|
.PHONY : src/util/mem.c.s
|
||||||
|
|
||||||
src/util/redis_manager.o: src/util/redis_manager.cpp.o
|
src/util/redis_manager.o: src/util/redis_manager.cpp.o
|
||||||
@ -761,7 +814,9 @@ help:
|
|||||||
@echo "... depend"
|
@echo "... depend"
|
||||||
@echo "... edit_cache"
|
@echo "... edit_cache"
|
||||||
@echo "... rebuild_cache"
|
@echo "... rebuild_cache"
|
||||||
|
@echo "... doc"
|
||||||
@echo "... ag_gen"
|
@echo "... ag_gen"
|
||||||
|
@echo "... dynstr_test"
|
||||||
@echo "... nm_parser.o"
|
@echo "... nm_parser.o"
|
||||||
@echo "... nm_parser.i"
|
@echo "... nm_parser.i"
|
||||||
@echo "... nm_parser.s"
|
@echo "... nm_parser.s"
|
||||||
@ -804,6 +859,9 @@ help:
|
|||||||
@echo "... src/mpi/tasks.o"
|
@echo "... src/mpi/tasks.o"
|
||||||
@echo "... src/mpi/tasks.i"
|
@echo "... src/mpi/tasks.i"
|
||||||
@echo "... src/mpi/tasks.s"
|
@echo "... src/mpi/tasks.s"
|
||||||
|
@echo "... src/tests/mem_test.o"
|
||||||
|
@echo "... src/tests/mem_test.i"
|
||||||
|
@echo "... src/tests/mem_test.s"
|
||||||
@echo "... src/util/avail_mem.o"
|
@echo "... src/util/avail_mem.o"
|
||||||
@echo "... src/util/avail_mem.i"
|
@echo "... src/util/avail_mem.i"
|
||||||
@echo "... src/util/avail_mem.s"
|
@echo "... src/util/avail_mem.s"
|
||||||
|
|||||||
BIN
build/ag_gen
BIN
build/ag_gen
Binary file not shown.
@ -1,132 +1,142 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"directory": "/home/nschrick/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/main.cpp.o -c /home/nschrick/ag_parallel/src/main.cpp",
|
"command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -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 -pthread -o CMakeFiles/ag_gen.dir/src/main.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/main.cpp\"",
|
||||||
"file": "/home/nschrick/ag_parallel/src/main.cpp"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/main.cpp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/nschrick/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/opt/apps/gcc/8.2.0/bin/gcc -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -g -pthread -o CMakeFiles/ag_gen.dir/nm_scanner.c.o -c /home/nschrick/ag_parallel/build/nm_scanner.c",
|
"command": "/usr/bin/cc -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -pthread -o CMakeFiles/ag_gen.dir/nm_scanner.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_scanner.c\"",
|
||||||
"file": "/home/nschrick/ag_parallel/build/nm_scanner.c"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_scanner.c"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/nschrick/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/opt/apps/gcc/8.2.0/bin/gcc -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -g -pthread -o CMakeFiles/ag_gen.dir/nm_parser.c.o -c /home/nschrick/ag_parallel/build/nm_parser.c",
|
"command": "/usr/bin/cc -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -pthread -o CMakeFiles/ag_gen.dir/nm_parser.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_parser.c\"",
|
||||||
"file": "/home/nschrick/ag_parallel/build/nm_parser.c"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_parser.c"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/nschrick/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/opt/apps/gcc/8.2.0/bin/gcc -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -g -pthread -o CMakeFiles/ag_gen.dir/xp_scanner.c.o -c /home/nschrick/ag_parallel/build/xp_scanner.c",
|
"command": "/usr/bin/cc -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -pthread -o CMakeFiles/ag_gen.dir/xp_scanner.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_scanner.c\"",
|
||||||
"file": "/home/nschrick/ag_parallel/build/xp_scanner.c"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_scanner.c"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/nschrick/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/opt/apps/gcc/8.2.0/bin/gcc -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -g -pthread -o CMakeFiles/ag_gen.dir/xp_parser.c.o -c /home/nschrick/ag_parallel/build/xp_parser.c",
|
"command": "/usr/bin/cc -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -pthread -o CMakeFiles/ag_gen.dir/xp_parser.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c\"",
|
||||||
"file": "/home/nschrick/ag_parallel/build/xp_parser.c"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/nschrick/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/ag_gen/ag_gen.cpp.o -c /home/nschrick/ag_parallel/src/ag_gen/ag_gen.cpp",
|
"command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -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 -pthread -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/nschrick/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/nschrick/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/ag_gen/asset.cpp.o -c /home/nschrick/ag_parallel/src/ag_gen/asset.cpp",
|
"command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -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 -pthread -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/nschrick/ag_parallel/src/ag_gen/asset.cpp"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/asset.cpp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/nschrick/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/ag_gen/assetgroup.cpp.o -c /home/nschrick/ag_parallel/src/ag_gen/assetgroup.cpp",
|
"command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -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 -pthread -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/nschrick/ag_parallel/src/ag_gen/assetgroup.cpp"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/assetgroup.cpp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/nschrick/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/ag_gen/edge.cpp.o -c /home/nschrick/ag_parallel/src/ag_gen/edge.cpp",
|
"command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -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 -pthread -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/nschrick/ag_parallel/src/ag_gen/edge.cpp"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/edge.cpp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/nschrick/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/ag_gen/exploit.cpp.o -c /home/nschrick/ag_parallel/src/ag_gen/exploit.cpp",
|
"command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -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 -pthread -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/nschrick/ag_parallel/src/ag_gen/exploit.cpp"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/exploit.cpp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/nschrick/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/ag_gen/factbase.cpp.o -c /home/nschrick/ag_parallel/src/ag_gen/factbase.cpp",
|
"command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -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 -pthread -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/nschrick/ag_parallel/src/ag_gen/factbase.cpp"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/factbase.cpp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/nschrick/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/ag_gen/network_state.cpp.o -c /home/nschrick/ag_parallel/src/ag_gen/network_state.cpp",
|
"command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -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 -pthread -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/nschrick/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/nschrick/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/ag_gen/quality.cpp.o -c /home/nschrick/ag_parallel/src/ag_gen/quality.cpp",
|
"command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -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 -pthread -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/nschrick/ag_parallel/src/ag_gen/quality.cpp"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/quality.cpp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/nschrick/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/ag_gen/topology.cpp.o -c /home/nschrick/ag_parallel/src/ag_gen/topology.cpp",
|
"command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -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 -pthread -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/nschrick/ag_parallel/src/ag_gen/topology.cpp"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/topology.cpp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/nschrick/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/util/avail_mem.cpp.o -c /home/nschrick/ag_parallel/src/util/avail_mem.cpp",
|
"command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -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 -pthread -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/nschrick/ag_parallel/src/util/avail_mem.cpp"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/avail_mem.cpp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/nschrick/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/opt/apps/gcc/8.2.0/bin/gcc -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -g -pthread -o CMakeFiles/ag_gen.dir/src/util/build_sql.c.o -c /home/nschrick/ag_parallel/src/util/build_sql.c",
|
"command": "/usr/bin/cc -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -pthread -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/nschrick/ag_parallel/src/util/build_sql.c"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/build_sql.c"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/nschrick/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/util/common.cpp.o -c /home/nschrick/ag_parallel/src/util/common.cpp",
|
"command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -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 -pthread -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/nschrick/ag_parallel/src/util/common.cpp"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/common.cpp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/nschrick/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/util/db_functions.cpp.o -c /home/nschrick/ag_parallel/src/util/db_functions.cpp",
|
"command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -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 -pthread -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/nschrick/ag_parallel/src/util/db_functions.cpp"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/db_functions.cpp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/nschrick/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/opt/apps/gcc/8.2.0/bin/gcc -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -g -pthread -o CMakeFiles/ag_gen.dir/src/util/hash.c.o -c /home/nschrick/ag_parallel/src/util/hash.c",
|
"command": "/usr/bin/cc -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -pthread -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/nschrick/ag_parallel/src/util/hash.c"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/hash.c"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/nschrick/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/opt/apps/gcc/8.2.0/bin/gcc -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -g -pthread -o CMakeFiles/ag_gen.dir/src/util/list.c.o -c /home/nschrick/ag_parallel/src/util/list.c",
|
"command": "/usr/bin/cc -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -pthread -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/nschrick/ag_parallel/src/util/list.c"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/list.c"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/nschrick/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/opt/apps/gcc/8.2.0/bin/gcc -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -g -pthread -o CMakeFiles/ag_gen.dir/src/util/mem.c.o -c /home/nschrick/ag_parallel/src/util/mem.c",
|
"command": "/usr/bin/cc -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -pthread -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/nschrick/ag_parallel/src/util/mem.c"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/mem.c"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/nschrick/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/util/redis_manager.cpp.o -c /home/nschrick/ag_parallel/src/util/redis_manager.cpp",
|
"command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -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 -pthread -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/nschrick/ag_parallel/src/util/redis_manager.cpp"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/redis_manager.cpp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/nschrick/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/opt/apps/gcc/8.2.0/bin/gcc -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -g -pthread -o CMakeFiles/ag_gen.dir/src/util/str_array.c.o -c /home/nschrick/ag_parallel/src/util/str_array.c",
|
"command": "/usr/bin/cc -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -pthread -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/nschrick/ag_parallel/src/util/str_array.c"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/str_array.c"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/nschrick/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/opt/apps/gcc/8.2.0/bin/gcc -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -g -pthread -o CMakeFiles/ag_gen.dir/src/util/vector.c.o -c /home/nschrick/ag_parallel/src/util/vector.c",
|
"command": "/usr/bin/cc -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -pthread -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/nschrick/ag_parallel/src/util/vector.c"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/vector.c"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/nschrick/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/mpi/serialize.cpp.o -c /home/nschrick/ag_parallel/src/mpi/serialize.cpp",
|
"command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -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 -pthread -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/nschrick/ag_parallel/src/mpi/serialize.cpp"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/mpi/serialize.cpp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"directory": "/home/nschrick/ag_parallel/build",
|
"directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build",
|
||||||
"command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/mpi/tasks.cpp.o -c /home/nschrick/ag_parallel/src/mpi/tasks.cpp",
|
"command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -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 -pthread -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/nschrick/ag_parallel/src/mpi/tasks.cpp"
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/mpi/tasks.cpp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"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/dynstr_test.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"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"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/dynstr_test.dir/src/tests/mem_test.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/tests/mem_test.c\"",
|
||||||
|
"file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/tests/mem_test.c"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -62,7 +62,7 @@ if [ "$TYPE" == "$strval1" ]; then
|
|||||||
#6 Exploit Option
|
#6 Exploit Option
|
||||||
#mpiexec --mca btl_openib_allow_ib 1 --mca btl openib,self,vader --mca opal_warn_on_missing_libcuda 0 --bind-to numa --map-by numa -np "$NODES" --timeout 129600 ./ag_gen -n ../Oct_2021/nm_files/"$CARS"_car_timeline_maintenance.nm -x ../Oct_2021/Sync/6_Exploits/"$NUM_SERV"_Serv/sync_timeline_maintenance.xp -t "$NUM_THREADS" -q 1 -p -a 0.6 -z "$DBNAME" -s -l 20
|
#mpiexec --mca btl_openib_allow_ib 1 --mca btl openib,self,vader --mca opal_warn_on_missing_libcuda 0 --bind-to numa --map-by numa -np "$NODES" --timeout 129600 ./ag_gen -n ../Oct_2021/nm_files/"$CARS"_car_timeline_maintenance.nm -x ../Oct_2021/Sync/6_Exploits/"$NUM_SERV"_Serv/sync_timeline_maintenance.xp -t "$NUM_THREADS" -q 1 -p -a 0.6 -z "$DBNAME" -s -l 20
|
||||||
else
|
else
|
||||||
mpiexec --mca btl_openib_allow_ib 1 --mca opal_warn_on_missing_libcuda 0 --bind-to numa --map-by numa -np "$NODES" --timeout 129600 ./ag_gen -n ../Oct_2021/nm_files/"$CARS"_car_timeline_maintenance.nm -x ../Oct_2021/Sync/4_Exploits/"$NUM_SERV"_Serv/sync_timeline_maintenance.xp -t "$NUM_THREADS" -q 1 -p -s -l 20 -a 0.6 -g DOTFILE.dot -z "$DBNAME"
|
mpiexec --mca btl_openib_allow_ib 1 --mca opal_warn_on_missing_libcuda 0 --bind-to numa --map-by numa -np "$NODES" --timeout 129600 ./ag_gen -n ../Oct_2021/nm_files/"$CARS"_car_timeline_maintenance.nm -x ../Oct_2021/Sync/4_Exploits/"$NUM_SERV"_Serv/sync_timeline_maintenance.xp -t "$NUM_THREADS" -q 1 -p -a 0.6 -g DOTFILE.dot -z "$DBNAME" -l 20 -e
|
||||||
fi
|
fi
|
||||||
# 4 Exploit
|
# 4 Exploit
|
||||||
#mpiexec -np "$NODES" --bind-to numa --map-by numa ./ag_gen -n ../Oct_2021/nm_files/"$CARS"_car_timeline_maintenance.nm -x ../Oct_2021/Sync/4_Exploits/"$NUM_SERV"_Serv/sync_timeline_maintenance.xp -t 1 -q 1 -p -a 0.6 -z "$DBNAME"
|
#mpiexec -np "$NODES" --bind-to numa --map-by numa ./ag_gen -n ../Oct_2021/nm_files/"$CARS"_car_timeline_maintenance.nm -x ../Oct_2021/Sync/4_Exploits/"$NUM_SERV"_Serv/sync_timeline_maintenance.xp -t 1 -q 1 -p -a 0.6 -z "$DBNAME"
|
||||||
|
|||||||
26318
build/states.txt
26318
build/states.txt
File diff suppressed because it is too large
Load Diff
@ -160,8 +160,9 @@ return make_tuple(postconds_q, postconds_t);
|
|||||||
* break and continue checking with the next exploit.
|
* break and continue checking with the next exploit.
|
||||||
* 5. Push the new network state onto the frontier to be expanded later.
|
* 5. Push the new network state onto the frontier to be expanded later.
|
||||||
*/
|
*/
|
||||||
AGGenInstance &AGGen::generate(bool batch_process, int batch_size, int numThrd, int initQSize,\
|
AGGenInstance &AGGen::tasking_generate(bool batch_process, int batch_size, int numThrd, int initQSize,\
|
||||||
double mem_threshold, mpi::communicator &world) {
|
double mem_threshold, mpi::communicator &world)
|
||||||
|
{
|
||||||
|
|
||||||
//Init all Nodes with these variables
|
//Init all Nodes with these variables
|
||||||
std::vector<Exploit> exploit_list = instance.exploits;
|
std::vector<Exploit> exploit_list = instance.exploits;
|
||||||
@ -175,9 +176,9 @@ if(!(std::find(ex_groups.begin(), ex_groups.end(), ex.get_group()) !=ex_groups.e
|
|||||||
if(ex.get_group()!="null")
|
if(ex.get_group()!="null")
|
||||||
ex_groups.emplace_back(ex.get_group());
|
ex_groups.emplace_back(ex.get_group());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int last_known_id = 0;
|
||||||
//Print out the groups if desired
|
//Print out the groups if desired
|
||||||
if (world.rank() == 0){
|
if (world.rank() == 0){
|
||||||
std::cout <<"\nGenerating through MPI Tasking" << std::endl;
|
std::cout <<"\nGenerating through MPI Tasking" << std::endl;
|
||||||
@ -197,9 +198,6 @@ if (world.rank() ==0){
|
|||||||
}
|
}
|
||||||
bool save_queued = false;
|
bool save_queued = false;
|
||||||
|
|
||||||
if (world.rank() == 0){
|
|
||||||
std::cout << "Generating Attack Graph" << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::unordered_map<size_t, PermSet<size_t>> od_map;
|
std::unordered_map<size_t, PermSet<size_t>> od_map;
|
||||||
size_t assets_size = instance.assets.size();
|
size_t assets_size = instance.assets.size();
|
||||||
@ -210,139 +208,7 @@ if (od_map.find(num_params) == od_map.end()) {
|
|||||||
od_map[num_params] = od.get_all();
|
od_map[num_params] = od.get_all();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
//might be where to apply parallelization.
|
|
||||||
while (frontier.size()<initQSize){//while starts, test multiple thread case THIS WAS THE ONE MING USED
|
|
||||||
//while (frontier.size()!=0){//while starts, test single thread case
|
|
||||||
// while(!frontier.empty()) {
|
|
||||||
auto current_state = frontier.back();
|
|
||||||
auto current_hash = current_state.get_hash(instance.facts);
|
|
||||||
frontier.pop_back();
|
|
||||||
std::vector<std::tuple<Exploit, AssetGroup>> appl_exploits;
|
|
||||||
for (size_t i = 0; i < esize; i++) {//for loop for applicable exploits starts
|
|
||||||
auto e = exploit_list.at(i);
|
|
||||||
size_t num_params = e.get_num_params();
|
|
||||||
auto preconds_q = e.precond_list_q();
|
|
||||||
auto preconds_t = e.precond_list_t();
|
|
||||||
auto perms = od_map[num_params];
|
|
||||||
std::vector<AssetGroup> asset_groups;
|
|
||||||
for (auto perm : perms) {
|
|
||||||
std::vector<Quality> asset_group_quals;
|
|
||||||
std::vector<Topology> asset_group_topos;
|
|
||||||
asset_group_quals.reserve(preconds_q.size());
|
|
||||||
asset_group_topos.reserve(preconds_t.size());
|
|
||||||
for (auto &precond : preconds_q) {
|
|
||||||
asset_group_quals.emplace_back(
|
|
||||||
perm[precond.get_param_num()], precond.name, precond.op,
|
|
||||||
precond.value, instance.facts);
|
|
||||||
}
|
|
||||||
for (auto &precond : preconds_t) {
|
|
||||||
auto dir = precond.get_dir();
|
|
||||||
auto prop = precond.get_property();
|
|
||||||
auto op = precond.get_operation();
|
|
||||||
auto val = precond.get_value();
|
|
||||||
|
|
||||||
asset_group_topos.emplace_back(
|
|
||||||
perm[precond.get_from_param()],
|
|
||||||
perm[precond.get_to_param()], dir, prop, op, val, instance.facts);
|
|
||||||
}
|
|
||||||
|
|
||||||
asset_groups.emplace_back(asset_group_quals, asset_group_topos,
|
|
||||||
perm);
|
|
||||||
}
|
|
||||||
auto assetgroup_size = asset_groups.size();
|
|
||||||
for (size_t j = 0; j < assetgroup_size; j++) {
|
|
||||||
auto asset_group = asset_groups.at(j);
|
|
||||||
for (auto &quality : asset_group.get_hypo_quals()) {
|
|
||||||
if (!current_state.get_factbase().find_quality(quality)) {
|
|
||||||
goto LOOPCONTINUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (auto &topology : asset_group.get_hypo_topos()) {
|
|
||||||
if (!current_state.get_factbase().find_topology(topology)) {
|
|
||||||
goto LOOPCONTINUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//MING DID NOT HAVE THIS CRITICAL, BUT KYLE DID
|
|
||||||
// #pragma omp critical
|
|
||||||
{
|
|
||||||
auto new_appl_exploit = std::make_tuple(e, asset_group);
|
|
||||||
appl_exploits.push_back(new_appl_exploit);
|
|
||||||
}
|
|
||||||
LOOPCONTINUE:;
|
|
||||||
}
|
|
||||||
} //for loop for applicable exploits ends
|
|
||||||
|
|
||||||
auto appl_expl_size = appl_exploits.size();
|
|
||||||
for (size_t j = 0; j < appl_expl_size; j++) { //for loop for new states starts
|
|
||||||
auto e = appl_exploits.at(j);
|
|
||||||
auto exploit = std::get<0>(e);
|
|
||||||
auto assetGroup = std::get<1>(e);
|
|
||||||
auto postconditions = createPostConditions(e, instance.facts);
|
|
||||||
auto qualities = std::get<0>(postconditions);
|
|
||||||
auto topologies = std::get<1>(postconditions);
|
|
||||||
NetworkState new_state{current_state};
|
|
||||||
for(auto &qual : qualities) {
|
|
||||||
auto action = std::get<0>(qual);
|
|
||||||
auto fact = std::get<1>(qual);
|
|
||||||
switch(action) {
|
|
||||||
case ADD_T:
|
|
||||||
new_state.add_quality(fact);
|
|
||||||
break;
|
|
||||||
case UPDATE_T:
|
|
||||||
new_state.update_quality(fact);
|
|
||||||
break;
|
|
||||||
case DELETE_T:
|
|
||||||
new_state.delete_quality(fact);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for(auto &topo : topologies) {
|
|
||||||
auto action = std::get<0>(topo);
|
|
||||||
auto fact = std::get<1>(topo);
|
|
||||||
switch(action) {
|
|
||||||
case ADD_T:
|
|
||||||
new_state.add_topology(fact);
|
|
||||||
break;
|
|
||||||
case UPDATE_T:
|
|
||||||
new_state.update_topology(fact);
|
|
||||||
break;
|
|
||||||
case DELETE_T:
|
|
||||||
new_state.delete_topology(fact);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
auto hash_num = new_state.get_hash(instance.facts);
|
|
||||||
if (hash_num == current_hash)
|
|
||||||
continue;
|
|
||||||
if (hash_map.find(hash_num) == hash_map.end()) {
|
|
||||||
new_state.set_id();
|
|
||||||
auto facts_tuple = new_state.get_factbase().get_facts_tuple();
|
|
||||||
FactbaseItems new_items =
|
|
||||||
std::make_tuple(facts_tuple, new_state.get_id());
|
|
||||||
instance.factbase_items.push_back(new_items);
|
|
||||||
instance.factbases.push_back(new_state.get_factbase());
|
|
||||||
hash_map.insert(std::make_pair(new_state.get_hash(instance.facts), new_state.get_id()));
|
|
||||||
frontier.emplace_front(new_state);
|
|
||||||
Edge ed(current_state.get_id(), new_state.get_id(), exploit, assetGroup);
|
|
||||||
ed.set_id();
|
|
||||||
instance.edges.push_back(ed);
|
|
||||||
counter++;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
int id = hash_map[hash_num];
|
|
||||||
Edge ed(current_state.get_id(), id, exploit, assetGroup);
|
|
||||||
ed.set_id();
|
|
||||||
instance.edges.push_back(ed);
|
|
||||||
}
|
|
||||||
} //for loop for new states ends
|
|
||||||
} //while ends
|
|
||||||
|
|
||||||
//int numThrd=32;
|
|
||||||
printf("The number of threads used is %d\n",numThrd);
|
|
||||||
printf("The initial QSize is %d\n",initQSize);
|
|
||||||
*/
|
|
||||||
|
|
||||||
int frt_size=frontier.size();
|
int frt_size=frontier.size();
|
||||||
if (world.rank() ==0){
|
if (world.rank() ==0){
|
||||||
@ -359,10 +225,9 @@ gettimeofday(&t1,NULL);
|
|||||||
int num_tasks = 6;
|
int num_tasks = 6;
|
||||||
#pragma omp parallel for num_threads(numThrd) default(none) shared(esize,counter,\
|
#pragma omp parallel for num_threads(numThrd) default(none) shared(esize,counter,\
|
||||||
exploit_list,od_map,frt_size,total_t,t1,t2,std::cout, mem_threshold, num_tasks,\
|
exploit_list,od_map,frt_size,total_t,t1,t2,std::cout, mem_threshold, num_tasks,\
|
||||||
ex_groups, world, total_task0, total_task1, total_task2, total_task3, total_task4) schedule(dynamic,1)
|
ex_groups, world, total_task0, total_task1, total_task2, total_task3, total_task4, last_known_id) schedule(dynamic,1)
|
||||||
//auto ag_start = std::chrono::system_clock::now();
|
//auto ag_start = std::chrono::system_clock::now();
|
||||||
for(int k=0;k<frt_size;k++){
|
for(int k=0;k<frt_size;k++){
|
||||||
|
|
||||||
int mpi_exit = 0;
|
int mpi_exit = 0;
|
||||||
double f_alpha = 0.0;
|
double f_alpha = 0.0;
|
||||||
int zero_queue = 0;
|
int zero_queue = 0;
|
||||||
@ -391,7 +256,6 @@ if(world.size() % 2 != 0 && world.size() > num_tasks){
|
|||||||
two_alloc = alloc-1;
|
two_alloc = alloc-1;
|
||||||
reduc_factor = 1;
|
reduc_factor = 1;
|
||||||
}
|
}
|
||||||
//std::cout << "World Size: " << world.size() << " Allocated to Task 1: " << alloc << " Allocated to Task 2: " << two_alloc << "Ceil val: " << ceil_val << std::endl;
|
|
||||||
|
|
||||||
//Create Communicators
|
//Create Communicators
|
||||||
//Note, these each return 2 handles!
|
//Note, these each return 2 handles!
|
||||||
@ -402,8 +266,7 @@ if(world.size() == 2){
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
ttwo_comm = world.split(world.rank() >= send_check(world, alloc) && world.rank() <= (alloc+two_alloc));
|
ttwo_comm = world.split(world.rank() >= send_check(world, alloc) && world.rank() <= (alloc+two_alloc));
|
||||||
//std::cout << "TCOMM SIZE: " << tcomm.size() << std::endl;
|
|
||||||
//std::cout << "TTWO_COMM SIZE: " << ttwo_comm.size() << std::endl;
|
|
||||||
while (!localFrontier.empty() || !unex_empty() || world.rank() > 0){//while starts
|
while (!localFrontier.empty() || !unex_empty() || world.rank() > 0){//while starts
|
||||||
|
|
||||||
if (world.rank() == 0){
|
if (world.rank() == 0){
|
||||||
@ -466,7 +329,6 @@ while (!localFrontier.empty() || !unex_empty() || world.rank() > 0){//while star
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Execute Task 2
|
//Execute Task 2
|
||||||
//if(world.rank() == send_check(world, alloc) && world.rank() <= send_check(world, 2*two_alloc))
|
|
||||||
//Edge case: 2 nodes: This prevents node 1 from accessing the execution of task 2
|
//Edge case: 2 nodes: This prevents node 1 from accessing the execution of task 2
|
||||||
if((world.size() == 2 && world.rank() == 0) || world.size() > 2)
|
if((world.size() == 2 && world.rank() == 0) || world.size() > 2)
|
||||||
{
|
{
|
||||||
@ -491,6 +353,7 @@ while (!localFrontier.empty() || !unex_empty() || world.rank() > 0){//while star
|
|||||||
instance.facts.length++;
|
instance.facts.length++;
|
||||||
instance.facts.str_vector.push_back(new_state.compound_assign(fact));
|
instance.facts.str_vector.push_back(new_state.compound_assign(fact));
|
||||||
}
|
}
|
||||||
|
|
||||||
ttwo_comm.barrier();
|
ttwo_comm.barrier();
|
||||||
gettimeofday(&t22,NULL);
|
gettimeofday(&t22,NULL);
|
||||||
total_task2+=(t22.tv_sec-t21.tv_sec)*1000.0+(t22.tv_usec-t21.tv_usec)/1000.0;
|
total_task2+=(t22.tv_sec-t21.tv_sec)*1000.0+(t22.tv_usec-t21.tv_usec)/1000.0;
|
||||||
@ -503,49 +366,35 @@ while (!localFrontier.empty() || !unex_empty() || world.rank() > 0){//while star
|
|||||||
//2 Node Edge case
|
//2 Node Edge case
|
||||||
if(world.size() == 2){
|
if(world.size() == 2){
|
||||||
mpi::request tdone_req = world.isend(1, 2, 1);
|
mpi::request tdone_req = world.isend(1, 2, 1);
|
||||||
tdone_req.wait();
|
//tdone_req.wait();
|
||||||
//std::cout << "Node " << world.rank() << " sent finished message." << std::endl;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(w < world.rank() || w > alloc+two_alloc)
|
else if(w < world.rank() || w > alloc+two_alloc)
|
||||||
{
|
{
|
||||||
mpi::request tdone_req = world.isend(w, 2, 1);
|
mpi::request tdone_req = world.isend(w, 2, 1);
|
||||||
tdone_req.wait();
|
//tdone_req.wait();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
//std::cout << "Task 2 Finished." << std::endl;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else{
|
else{
|
||||||
/*
|
|
||||||
One, need to listen for Updates to instances.facts
|
|
||||||
MPI TAGS:
|
|
||||||
Tag 2 = Task 2 is done
|
|
||||||
Tag 3 = New state
|
|
||||||
Tag 4 = New fact
|
|
||||||
Tag 5 = Critical New State
|
|
||||||
*/
|
|
||||||
//If we haven't been told that task 2 is finished, and if we still more facts or states to update:
|
//If we haven't been told that task 2 is finished, and if we still more facts or states to update:
|
||||||
//while(!world.iprobe(1+alloc, 2) && world.iprobe(mpi::any_source, 3) && world.iprobe(mpi::any_source, 4) && world.iprobe(mpi::any_source, 5))
|
|
||||||
//std::cout << "Node " << world.rank() << " is waiting for Task 2 completion." << std::endl;
|
|
||||||
int finished_signal = 0;
|
int finished_signal = 0;
|
||||||
if(world.iprobe(mpi::any_source, 2)){
|
if(world.iprobe(mpi::any_source, 2)){
|
||||||
world.recv(mpi::any_source, 2, finished_signal);
|
world.recv(mpi::any_source, 2, finished_signal);
|
||||||
}
|
}
|
||||||
|
|
||||||
//while(!world.iprobe(send_check(world, alloc), 2) || world.iprobe(mpi::any_source, 3) || world.iprobe(mpi::any_source, 4) || world.iprobe(mpi::any_source, 5))
|
|
||||||
while(!finished_signal || world.iprobe(mpi::any_source, 3) || world.iprobe(mpi::any_source, 4) || world.iprobe(mpi::any_source, 5))
|
while(!finished_signal || world.iprobe(mpi::any_source, 3) || world.iprobe(mpi::any_source, 4) || world.iprobe(mpi::any_source, 5))
|
||||||
{
|
{
|
||||||
//Check for the finished signal
|
//Check for the finished signal
|
||||||
if(world.iprobe(mpi::any_source, 2)){
|
if(world.iprobe(mpi::any_source, 2)){
|
||||||
//Prevent double-pulling
|
//Prevent double-pulling
|
||||||
if(!finished_signal){
|
if(!finished_signal){
|
||||||
//std::cout << "Else nodes received task 2 completion message." << std::endl;
|
|
||||||
world.recv(mpi::any_source, 2, finished_signal);
|
world.recv(mpi::any_source, 2, finished_signal);
|
||||||
//std::cout << "Receive message complete." << std::endl;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -561,6 +410,7 @@ while (!localFrontier.empty() || !unex_empty() || world.rank() > 0){//while star
|
|||||||
instance.facts.length++;
|
instance.facts.length++;
|
||||||
instance.facts.str_vector.push_back(new_state.compound_assign(fact));
|
instance.facts.str_vector.push_back(new_state.compound_assign(fact));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(world.rank() == 0){
|
if(world.rank() == 0){
|
||||||
if(world.iprobe(mpi::any_source, 5)){
|
if(world.iprobe(mpi::any_source, 5)){
|
||||||
NetworkState critical_state;
|
NetworkState critical_state;
|
||||||
@ -575,29 +425,26 @@ while (!localFrontier.empty() || !unex_empty() || world.rank() > 0){//while star
|
|||||||
struct timeval t31,t32;
|
struct timeval t31,t32;
|
||||||
gettimeofday(&t31,NULL);
|
gettimeofday(&t31,NULL);
|
||||||
task_three(instance, critical_state, localFrontier, mem_threshold, world,\
|
task_three(instance, critical_state, localFrontier, mem_threshold, world,\
|
||||||
alloc, two_alloc, current_state, exploit, assetGroup, hash_map);
|
alloc, two_alloc, current_state, exploit, assetGroup, hash_map, last_known_id);
|
||||||
//std::cout << "Task 3 finished." << std::endl;
|
//std::cout << "Task 3 finished." << std::endl;
|
||||||
gettimeofday(&t32,NULL);
|
gettimeofday(&t32,NULL);
|
||||||
total_task3+=(t32.tv_sec-t31.tv_sec)*1000.0+(t32.tv_usec-t31.tv_usec)/1000.0;
|
total_task3+=(t32.tv_sec-t31.tv_sec)*1000.0+(t32.tv_usec-t31.tv_usec)/1000.0;
|
||||||
}
|
}
|
||||||
} //Node 0 Task 3 wait ends
|
} //Node 0 Task 3 wait ends
|
||||||
} //while probe/instance update ends
|
} //while probe/instance update ends
|
||||||
//std::cout << "Node " << world.rank() << " has finished Task 2 waiting." << std::endl;
|
|
||||||
} //else wait ends
|
} //else wait ends
|
||||||
}
|
}
|
||||||
|
|
||||||
//Task Four
|
//Task Four
|
||||||
if (world.rank() == send_check(world, alloc+two_alloc)){
|
if (world.rank() == send_check(world, alloc+two_alloc)){
|
||||||
if(world.iprobe(0, 7) || world.iprobe(0, 8)){
|
if(world.iprobe(0, 7) || world.iprobe(0, 8)){
|
||||||
//std::cout << "Node " << world.rank() << " is starting Task 4." << std::endl;
|
|
||||||
std::vector<Factbase> factbases_dump;
|
std::vector<Factbase> factbases_dump;
|
||||||
std::vector<Edge> edges_dump;
|
std::vector<Edge> edges_dump;
|
||||||
world.recv(0, 7, factbases_dump);
|
world.recv(0, 7, factbases_dump);
|
||||||
world.recv(0, 8, edges_dump);
|
world.recv(0, 8, edges_dump);
|
||||||
|
|
||||||
instance.factbases = factbases_dump;
|
instance.factbases = factbases_dump;
|
||||||
instance.edges = edges_dump;
|
instance.edges = edges_dump;
|
||||||
//task_four(instance);
|
|
||||||
//std::cout << "Task 4 finished." << std::endl;
|
|
||||||
struct timeval t41,t42;
|
struct timeval t41,t42;
|
||||||
gettimeofday(&t41,NULL);
|
gettimeofday(&t41,NULL);
|
||||||
save_ag_to_db(instance, true);
|
save_ag_to_db(instance, true);
|
||||||
@ -630,7 +477,6 @@ while (!localFrontier.empty() || !unex_empty() || world.rank() > 0){//while star
|
|||||||
f_alpha = (static_cast<double>(localFrontier.size()) * (localFrontier.back().get_size()))/tot_sys_mem;
|
f_alpha = (static_cast<double>(localFrontier.size()) * (localFrontier.back().get_size()))/tot_sys_mem;
|
||||||
else
|
else
|
||||||
f_alpha = 0;
|
f_alpha = 0;
|
||||||
//std::cout << "Frontier Alpha after database storing: " << f_alpha << std::endl;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -641,8 +487,6 @@ while (!localFrontier.empty() || !unex_empty() || world.rank() > 0){//while star
|
|||||||
save_unexplored_to_db(save_state);
|
save_unexplored_to_db(save_state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//std::cout << "Node " << world.rank() << " moving to next iter" << std::endl;
|
|
||||||
} //while ends
|
} //while ends
|
||||||
|
|
||||||
if(world.rank() == 0){
|
if(world.rank() == 0){
|
||||||
@ -657,31 +501,32 @@ if (mpi_exit == 1){
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto ag_end = std::chrono::system_clock::now();
|
auto ag_end = std::chrono::system_clock::now();
|
||||||
|
|
||||||
}//OpenMP block ends
|
}//OpenMP block ends
|
||||||
//std::cout << "Process " << world.rank() << " is finishing." << std::endl;
|
|
||||||
//Wait for db ops to finish
|
//Wait for db ops to finish
|
||||||
world.barrier();
|
world.barrier();
|
||||||
if(world.rank() == 0){
|
if(world.rank() == 0){
|
||||||
gettimeofday(&t2,NULL);
|
gettimeofday(&t2,NULL);
|
||||||
total_t+=(t2.tv_sec-t1.tv_sec)*1000.0+(t2.tv_usec-t1.tv_usec)/1000.0;
|
total_t+=(t2.tv_sec-t1.tv_sec)*1000.0+(t2.tv_usec-t1.tv_usec)/1000.0;
|
||||||
printf("AG TOOK %lf ms.\n", total_t);
|
printf("AG TOOK %lf ms.\n", total_t);
|
||||||
|
}
|
||||||
|
|
||||||
auto end = std::chrono::system_clock::now();
|
auto end = std::chrono::system_clock::now();
|
||||||
|
|
||||||
if(world.rank() != 0){
|
if(world.rank() != 0){
|
||||||
if (total_task1 != 0.0)
|
if (total_task1 > 0.0)
|
||||||
world.send(0, 24, total_task1);
|
world.isend(0, 24, total_task1);
|
||||||
if (total_task2 != 0.0)
|
if (total_task2 > 0.0)
|
||||||
world.send(0, 25, total_task2);
|
world.isend(0, 25, total_task2);
|
||||||
if (total_task3 != 0.0)
|
if (total_task3 > 0.0)
|
||||||
world.send(0, 26, total_task3);
|
world.isend(0, 26, total_task3);
|
||||||
if (total_task4 != 0.0)
|
if (total_task4 > 0.0)
|
||||||
world.send(0, 27, total_task4);
|
world.isend(0, 27, total_task4);
|
||||||
}
|
}
|
||||||
|
world.barrier();
|
||||||
//Don't really care about each node's time, we just want a time (node 1 time ~= node 2 time)
|
//Don't really care about each node's time, we just want a time (node 1 time ~= node 2 time)
|
||||||
//Just grab any value.
|
//Just grab any value.
|
||||||
else{
|
if(world.rank() == 0){
|
||||||
world.irecv(mpi::any_source, 24, total_task1);
|
world.irecv(mpi::any_source, 24, total_task1);
|
||||||
world.irecv(mpi::any_source, 25, total_task2);
|
world.irecv(mpi::any_source, 25, total_task2);
|
||||||
world.irecv(mpi::any_source, 26, total_task3);
|
world.irecv(mpi::any_source, 26, total_task3);
|
||||||
@ -697,13 +542,13 @@ else{
|
|||||||
|
|
||||||
std::chrono::duration<double> elapsed_seconds = end - start;
|
std::chrono::duration<double> elapsed_seconds = end - start;
|
||||||
instance.elapsed_seconds = elapsed_seconds;
|
instance.elapsed_seconds = elapsed_seconds;
|
||||||
}
|
|
||||||
|
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
AGGenInstance &AGGen::single_generate(bool batch_process, int batch_num, int numThrd,\
|
AGGenInstance &AGGen::omp_generate(bool batch_process, int batch_num, int numThrd,\
|
||||||
int initQSize, double mem_threshold, mpi::communicator &world){
|
int initQSize, double mem_threshold, mpi::communicator &world)
|
||||||
|
{
|
||||||
|
|
||||||
std::vector<Exploit> exploit_list = instance.exploits;
|
std::vector<Exploit> exploit_list = instance.exploits;
|
||||||
|
|
||||||
@ -716,7 +561,6 @@ if(!(std::find(ex_groups.begin(), ex_groups.end(), ex.get_group()) !=ex_groups.e
|
|||||||
if(ex.get_group()!="null")
|
if(ex.get_group()!="null")
|
||||||
ex_groups.emplace_back(ex.get_group());
|
ex_groups.emplace_back(ex.get_group());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Print out the groups if desired
|
//Print out the groups if desired
|
||||||
@ -743,11 +587,10 @@ if (od_map.find(num_params) == od_map.end()) {
|
|||||||
od_map[num_params] = od.get_all();
|
od_map[num_params] = od.get_all();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
//might be where to apply parallelization.
|
//might be where to apply parallelization.
|
||||||
while (frontier.size()<initQSize){//while starts, test multiple thread case THIS WAS THE ONE MING USED
|
while (frontier.size()<initQSize){//while starts, test multiple thread case
|
||||||
//while (frontier.size()!=0){//while starts, test single thread case
|
//while (frontier.size()!=0){//while starts, test single thread case
|
||||||
// while(!frontier.empty()) {
|
|
||||||
auto current_state = frontier.back();
|
auto current_state = frontier.back();
|
||||||
auto current_hash = current_state.get_hash(instance.facts);
|
auto current_hash = current_state.get_hash(instance.facts);
|
||||||
frontier.pop_back();
|
frontier.pop_back();
|
||||||
@ -774,14 +617,11 @@ for (size_t i = 0; i < esize; i++) {//for loop for applicable exploits starts
|
|||||||
auto prop = precond.get_property();
|
auto prop = precond.get_property();
|
||||||
auto op = precond.get_operation();
|
auto op = precond.get_operation();
|
||||||
auto val = precond.get_value();
|
auto val = precond.get_value();
|
||||||
|
|
||||||
asset_group_topos.emplace_back(
|
asset_group_topos.emplace_back(
|
||||||
perm[precond.get_from_param()],
|
perm[precond.get_from_param()],
|
||||||
perm[precond.get_to_param()], dir, prop, op, val, instance.facts);
|
perm[precond.get_to_param()], dir, prop, op, val, instance.facts);
|
||||||
}
|
}
|
||||||
|
asset_groups.emplace_back(asset_group_quals, asset_group_topos, perm);
|
||||||
asset_groups.emplace_back(asset_group_quals, asset_group_topos,
|
|
||||||
perm);
|
|
||||||
}
|
}
|
||||||
auto assetgroup_size = asset_groups.size();
|
auto assetgroup_size = asset_groups.size();
|
||||||
for (size_t j = 0; j < assetgroup_size; j++) {
|
for (size_t j = 0; j < assetgroup_size; j++) {
|
||||||
@ -796,8 +636,7 @@ for (size_t i = 0; i < esize; i++) {//for loop for applicable exploits starts
|
|||||||
goto LOOPCONTINUE;
|
goto LOOPCONTINUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//MING DID NOT HAVE THIS CRITICAL, BUT KYLE DID
|
|
||||||
// #pragma omp critical
|
|
||||||
{
|
{
|
||||||
auto new_appl_exploit = std::make_tuple(e, asset_group);
|
auto new_appl_exploit = std::make_tuple(e, asset_group);
|
||||||
appl_exploits.push_back(new_appl_exploit);
|
appl_exploits.push_back(new_appl_exploit);
|
||||||
@ -861,7 +700,6 @@ for (size_t j = 0; j < appl_expl_size; j++) { //for loop for new states starts
|
|||||||
Edge ed(current_state.get_id(), new_state.get_id(), exploit, assetGroup);
|
Edge ed(current_state.get_id(), new_state.get_id(), exploit, assetGroup);
|
||||||
ed.set_id();
|
ed.set_id();
|
||||||
instance.edges.push_back(ed);
|
instance.edges.push_back(ed);
|
||||||
counter++;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
int id = hash_map[hash_num];
|
int id = hash_map[hash_num];
|
||||||
@ -875,7 +713,7 @@ for (size_t j = 0; j < appl_expl_size; j++) { //for loop for new states starts
|
|||||||
//int numThrd=32;
|
//int numThrd=32;
|
||||||
printf("The number of threads used is %d\n",numThrd);
|
printf("The number of threads used is %d\n",numThrd);
|
||||||
printf("The initial QSize is %d\n",initQSize);
|
printf("The initial QSize is %d\n",initQSize);
|
||||||
*/
|
|
||||||
int frt_size=frontier.size();
|
int frt_size=frontier.size();
|
||||||
printf("The actual QSize to start using multiple threads is %d\n",frt_size);
|
printf("The actual QSize to start using multiple threads is %d\n",frt_size);
|
||||||
|
|
||||||
@ -917,7 +755,7 @@ while (!localFrontier.empty() || !unex_empty()){//while starts
|
|||||||
total_tt+=(tt2.tv_sec-tt1.tv_sec)*1000.0+(tt2.tv_usec-tt1.tv_usec)/1000.0;
|
total_tt+=(tt2.tv_sec-tt1.tv_sec)*1000.0+(tt2.tv_usec-tt1.tv_usec)/1000.0;
|
||||||
//printf("Retrieving from db took %lf s.\n", total_tt);
|
//printf("Retrieving from db took %lf s.\n", total_tt);
|
||||||
}
|
}
|
||||||
//std::cout<<"FRONTIER SIZE: "<<localFrontier.size()<<std::endl;
|
|
||||||
auto current_state = localFrontier.back();
|
auto current_state = localFrontier.back();
|
||||||
auto current_hash = current_state.get_hash(instance.facts);
|
auto current_hash = current_state.get_hash(instance.facts);
|
||||||
localFrontier.pop_back();
|
localFrontier.pop_back();
|
||||||
@ -935,12 +773,7 @@ while (!localFrontier.empty() || !unex_empty()){//while starts
|
|||||||
asset_group_quals.reserve(preconds_q.size());
|
asset_group_quals.reserve(preconds_q.size());
|
||||||
asset_group_topos.reserve(preconds_t.size());
|
asset_group_topos.reserve(preconds_t.size());
|
||||||
|
|
||||||
|
|
||||||
//std::vector<int>::size_type sz;
|
|
||||||
//sz=asset_group_quals.capacity();
|
|
||||||
for (auto &precond : preconds_q) {
|
for (auto &precond : preconds_q) {
|
||||||
|
|
||||||
//Old quality encode caused this to crash
|
|
||||||
asset_group_quals.emplace_back(
|
asset_group_quals.emplace_back(
|
||||||
perm[precond.get_param_num()], precond.name, precond.op,
|
perm[precond.get_param_num()], precond.name, precond.op,
|
||||||
precond.value, instance.facts);
|
precond.value, instance.facts);
|
||||||
@ -954,8 +787,7 @@ while (!localFrontier.empty() || !unex_empty()){//while starts
|
|||||||
perm[precond.get_from_param()],
|
perm[precond.get_from_param()],
|
||||||
perm[precond.get_to_param()], dir, prop, op, val, instance.facts);
|
perm[precond.get_to_param()], dir, prop, op, val, instance.facts);
|
||||||
}
|
}
|
||||||
asset_groups.emplace_back(asset_group_quals, asset_group_topos,
|
asset_groups.emplace_back(asset_group_quals, asset_group_topos, perm);
|
||||||
perm);
|
|
||||||
}
|
}
|
||||||
auto assetgroup_size = asset_groups.size();
|
auto assetgroup_size = asset_groups.size();
|
||||||
for (size_t j = 0; j < assetgroup_size; j++) {
|
for (size_t j = 0; j < assetgroup_size; j++) {
|
||||||
@ -970,6 +802,7 @@ while (!localFrontier.empty() || !unex_empty()){//while starts
|
|||||||
goto LOOPCONTINUE1;
|
goto LOOPCONTINUE1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
auto new_appl_exploit = std::make_tuple(e, asset_group);
|
auto new_appl_exploit = std::make_tuple(e, asset_group);
|
||||||
appl_exploits.push_back(new_appl_exploit);
|
appl_exploits.push_back(new_appl_exploit);
|
||||||
@ -999,7 +832,6 @@ while (!localFrontier.empty() || !unex_empty()){//while starts
|
|||||||
|
|
||||||
//loop through the vector
|
//loop through the vector
|
||||||
for(auto itr=appl_exploits.begin(); itr!=appl_exploits.end(); itr++){
|
for(auto itr=appl_exploits.begin(); itr!=appl_exploits.end(); itr++){
|
||||||
|
|
||||||
auto e = *itr;
|
auto e = *itr;
|
||||||
auto exploit = std::get<0>(e);
|
auto exploit = std::get<0>(e);
|
||||||
auto assetGroup = std::get<1>(e);
|
auto assetGroup = std::get<1>(e);
|
||||||
@ -1047,8 +879,6 @@ while (!localFrontier.empty() || !unex_empty()){//while starts
|
|||||||
|
|
||||||
//TODO: if fact!= "="" call new_state function, passing fact and instance.facts. Update the quality, and insert it into the hash_table instead of this convoluted mess
|
//TODO: if fact!= "="" call new_state function, passing fact and instance.facts. Update the quality, and insert it into the hash_table instead of this convoluted mess
|
||||||
if(fact.get_op()=="+="){
|
if(fact.get_op()=="+="){
|
||||||
|
|
||||||
//std::cout<<" AFTER UPDATE "<<new_state.compound_assign(fact)<<std::endl;
|
|
||||||
std::unordered_map<std::string,int>::const_iterator got = instance.facts.hash_table.find(new_state.compound_assign(fact));
|
std::unordered_map<std::string,int>::const_iterator got = instance.facts.hash_table.find(new_state.compound_assign(fact));
|
||||||
|
|
||||||
//If the value is not already in the hash_table, insert it.
|
//If the value is not already in the hash_table, insert it.
|
||||||
@ -1145,7 +975,6 @@ while (!localFrontier.empty() || !unex_empty()){//while starts
|
|||||||
sizeof(instance.edges) + (sizeof(instance.edges[0]) * instance.edges.size()));
|
sizeof(instance.edges) + (sizeof(instance.edges[0]) * instance.edges.size()));
|
||||||
i_alpha = i_usage/tot_sys_mem;
|
i_alpha = i_usage/tot_sys_mem;
|
||||||
//std::cout << "Instance Alpha after database storing: " << i_alpha << std::endl;
|
//std::cout << "Instance Alpha after database storing: " << i_alpha << std::endl;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Edge ed(current_state.get_id(), new_state.get_id(), exploit, assetGroup);
|
Edge ed(current_state.get_id(), new_state.get_id(), exploit, assetGroup);
|
||||||
@ -1179,7 +1008,8 @@ return instance;
|
|||||||
}
|
}
|
||||||
|
|
||||||
AGGenInstance &AGGen::sg_generate(bool batch_process, int batch_num, int numThrd,\
|
AGGenInstance &AGGen::sg_generate(bool batch_process, int batch_num, int numThrd,\
|
||||||
int initQSize, double mem_threshold, mpi::communicator &world, int state_limit){
|
int initQSize, double mem_threshold, mpi::communicator &world, int state_limit)
|
||||||
|
{
|
||||||
//Init all Nodes with these variables
|
//Init all Nodes with these variables
|
||||||
std::vector<Exploit> exploit_list = instance.exploits;
|
std::vector<Exploit> exploit_list = instance.exploits;
|
||||||
|
|
||||||
@ -1192,7 +1022,6 @@ if(!(std::find(ex_groups.begin(), ex_groups.end(), ex.get_group()) !=ex_groups.e
|
|||||||
if(ex.get_group()!="null")
|
if(ex.get_group()!="null")
|
||||||
ex_groups.emplace_back(ex.get_group());
|
ex_groups.emplace_back(ex.get_group());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Print out the groups if desired
|
//Print out the groups if desired
|
||||||
@ -1256,7 +1085,6 @@ NetworkState buffer_state;
|
|||||||
Quality buffer_fact;
|
Quality buffer_fact;
|
||||||
std::unordered_set<size_t> front_expl;
|
std::unordered_set<size_t> front_expl;
|
||||||
|
|
||||||
|
|
||||||
std::random_device rd; // obtain a random number from hardware
|
std::random_device rd; // obtain a random number from hardware
|
||||||
std::mt19937 gen(rd()); // seed the generator
|
std::mt19937 gen(rd()); // seed the generator
|
||||||
|
|
||||||
@ -1270,16 +1098,12 @@ std::unordered_set<size_t> front_expl;
|
|||||||
//2 offset for root node and db node
|
//2 offset for root node and db node
|
||||||
for (int w = 0; w < std::min((int)world.size()-2, (int)localFrontier.size()); w++){
|
for (int w = 0; w < std::min((int)world.size()-2, (int)localFrontier.size()); w++){
|
||||||
//localFrontier.front().force_set_id(localFrontier.front().get_hash(instance.facts));
|
//localFrontier.front().force_set_id(localFrontier.front().get_hash(instance.facts));
|
||||||
std::cout << "Root says initial state has ID: " << localFrontier.front().get_id() << std::endl;
|
|
||||||
last_known_id = localFrontier.front().get_id();
|
last_known_id = localFrontier.front().get_id();
|
||||||
mpi::request state_req = world.isend(w+2, 1, localFrontier.front());
|
mpi::request state_req = world.isend(w+2, 1, localFrontier.front());
|
||||||
localFrontier.pop_front();
|
localFrontier.pop_front();
|
||||||
state_req.wait();
|
state_req.wait();
|
||||||
msg_sends++;
|
msg_sends++;
|
||||||
std::cout << "Root has sent initial states as a total of " << msg_sends << " messages." << std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << "World Size: " << world.size() << std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mpi::request requests[20];
|
mpi::request requests[20];
|
||||||
@ -1289,16 +1113,14 @@ std::unordered_set<size_t> front_expl;
|
|||||||
first_loop = 0;
|
first_loop = 0;
|
||||||
//Refill localFrontier if needed
|
//Refill localFrontier if needed
|
||||||
if(localFrontier.empty() && world.rank() == 0 && !unex_empty()) {
|
if(localFrontier.empty() && world.rank() == 0 && !unex_empty()) {
|
||||||
std::cout << "Running Task 0" << std::endl;
|
|
||||||
task_zero(instance, localFrontier, mem_threshold);
|
task_zero(instance, localFrontier, mem_threshold);
|
||||||
std::cout << "Frontier is now of size: " << localFrontier.size() << std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (world.rank() > 1){
|
//Worker Nodes
|
||||||
|
if (world.rank() > 1 || world.size() == 1 || (world.size() == 2 && world.rank() == 1)){
|
||||||
|
|
||||||
//Check for finished signal
|
//Check for finished signal
|
||||||
if(world.iprobe(0, 99)){
|
if(world.iprobe(0, 99)){
|
||||||
std::cout << "Node " << world.rank() << " received finalize signal" << std::endl;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1316,7 +1138,6 @@ std::unordered_set<size_t> front_expl;
|
|||||||
state_count = 0;
|
state_count = 0;
|
||||||
send_msg = 1;
|
send_msg = 1;
|
||||||
localFrontier.emplace_front(current_state);
|
localFrontier.emplace_front(current_state);
|
||||||
std::cout << "Node " << world.rank() << " received a new state to explore with ID " <<current_state.get_id() << std::endl;
|
|
||||||
while(!localFrontier.empty()){
|
while(!localFrontier.empty()){
|
||||||
if (state_count < state_limit){
|
if (state_count < state_limit){
|
||||||
//Do work
|
//Do work
|
||||||
@ -1337,12 +1158,7 @@ std::unordered_set<size_t> front_expl;
|
|||||||
asset_group_quals.reserve(preconds_q.size());
|
asset_group_quals.reserve(preconds_q.size());
|
||||||
asset_group_topos.reserve(preconds_t.size());
|
asset_group_topos.reserve(preconds_t.size());
|
||||||
|
|
||||||
|
|
||||||
//std::vector<int>::size_type sz;
|
|
||||||
//sz=asset_group_quals.capacity();
|
|
||||||
for (auto &precond : preconds_q) {
|
for (auto &precond : preconds_q) {
|
||||||
|
|
||||||
//Old quality encode caused this to crash
|
|
||||||
asset_group_quals.emplace_back(
|
asset_group_quals.emplace_back(
|
||||||
perm[precond.get_param_num()], precond.name, precond.op,
|
perm[precond.get_param_num()], precond.name, precond.op,
|
||||||
precond.value, instance.facts);
|
precond.value, instance.facts);
|
||||||
@ -1509,13 +1325,11 @@ std::unordered_set<size_t> front_expl;
|
|||||||
//although local frontier is updated, the global hash is also updated to avoid testing on explored states.
|
//although local frontier is updated, the global hash is also updated to avoid testing on explored states.
|
||||||
if (hash_map.find(hash_num) == hash_map.end()) {
|
if (hash_map.find(hash_num) == hash_map.end()) {
|
||||||
new_state.set_id();
|
new_state.set_id();
|
||||||
//new_state.force_set_id(hash_num);
|
|
||||||
instance.factbases.push_back(new_state.get_factbase());
|
instance.factbases.push_back(new_state.get_factbase());
|
||||||
hash_map.insert(std::make_pair(new_state.get_hash(instance.facts), new_state.get_id()));
|
hash_map.insert(std::make_pair(new_state.get_hash(instance.facts), new_state.get_id()));
|
||||||
|
|
||||||
localFrontier.emplace_front(new_state);
|
localFrontier.emplace_front(new_state);
|
||||||
Edge ed(current_state.get_id(), new_state.get_id(), exploit, assetGroup);
|
Edge ed(current_state.get_id(), new_state.get_id(), exploit, assetGroup);
|
||||||
//Edge ed(current_state.get_hash(instance.facts), new_state.get_id(), exploit, assetGroup);
|
|
||||||
ed.set_id();
|
ed.set_id();
|
||||||
instance.edges.push_back(ed);
|
instance.edges.push_back(ed);
|
||||||
} //END if (hash_map.find(hash_num) == hash_map.end())
|
} //END if (hash_map.find(hash_num) == hash_map.end())
|
||||||
@ -1543,33 +1357,19 @@ std::unordered_set<size_t> front_expl;
|
|||||||
//Let root node we finished, but only if we have done work since our last message
|
//Let root node we finished, but only if we have done work since our last message
|
||||||
if(send_msg == 1){
|
if(send_msg == 1){
|
||||||
send_msg = 0;
|
send_msg = 0;
|
||||||
std::cout << "Node " << world.rank() << " finished subgraphing work." << std::endl;
|
|
||||||
|
|
||||||
if(!localFrontier.empty()){
|
if(!localFrontier.empty()){
|
||||||
//std::vector<NetworkState> tmp_lf(localFrontier.begin(), localFrontier.end());
|
|
||||||
//std::cout << "Tmp LF size: " << tmp_lf.size() << std::endl;
|
|
||||||
requests[2] = world.isend(0, 3, localFrontier);
|
requests[2] = world.isend(0, 3, localFrontier);
|
||||||
//mpi::request lf_req = world.isend(0, 3, tmp_lf);
|
|
||||||
std::cout << "Node " << world.rank() << " has sent a localFrontier of size " << localFrontier.size() << std::endl;
|
|
||||||
//lf_req.wait();
|
|
||||||
//std::cout << "Node " << world.rank() << " has finished sending localFrontier" << std::endl;
|
|
||||||
}
|
}
|
||||||
//Send new states and edges, then clear worker instance
|
//Send new states and edges, then clear worker instance
|
||||||
if(!instance.factbases.empty()){
|
if(!instance.factbases.empty()){
|
||||||
std::cout << "Node " << world.rank() << " preparing to send " << instance.factbases.size() << " factbases" << std::endl;
|
|
||||||
requests[3] = world.isend(0, 10, instance.factbases);
|
requests[3] = world.isend(0, 10, instance.factbases);
|
||||||
//if_req.wait();
|
|
||||||
//std::cout << "Node " << world.rank() << " finished sending new factbases" << std::endl;
|
|
||||||
}
|
}
|
||||||
if(!instance.edges.empty()){
|
if(!instance.edges.empty()){
|
||||||
std::cout << "Node " << world.rank() << " preparing to send new edges: " << instance.edges.size() << std::endl;
|
|
||||||
requests[4] = world.isend(0, 11, instance.edges);
|
requests[4] = world.isend(0, 11, instance.edges);
|
||||||
//ie_req.wait();
|
|
||||||
//std::cout << "Node " << world.rank() << " finished sending new edges" << std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Finish Signal
|
//Finish Signal
|
||||||
std::cout << "Node " << world.rank() << " is sending the finish message" << std::endl;
|
|
||||||
requests[5] = world.isend(0, 2, 1);
|
requests[5] = world.isend(0, 2, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1582,24 +1382,21 @@ std::unordered_set<size_t> front_expl;
|
|||||||
}
|
}
|
||||||
NetworkState update_state;
|
NetworkState update_state;
|
||||||
Quality update_fact;
|
Quality update_fact;
|
||||||
std::cout << "Node " << world.rank() << " receiving new hash state and fact" << std::endl;
|
|
||||||
world.recv(mpi::any_source, 5, update_state);
|
world.recv(mpi::any_source, 5, update_state);
|
||||||
world.recv(mpi::any_source, 6, update_fact);
|
world.recv(mpi::any_source, 6, update_fact);
|
||||||
//Update
|
|
||||||
std::cout << "Node " << world.rank() << " finished receiving new state and fact" << std::endl;
|
|
||||||
|
|
||||||
|
//Update
|
||||||
instance.facts.hash_table[update_state.compound_assign(update_fact)]=instance.facts.size();
|
instance.facts.hash_table[update_state.compound_assign(update_fact)]=instance.facts.size();
|
||||||
instance.facts.length++;
|
instance.facts.length++;
|
||||||
instance.facts.str_vector.push_back(update_state.compound_assign(update_fact));
|
instance.facts.str_vector.push_back(update_state.compound_assign(update_fact));
|
||||||
}
|
}
|
||||||
//std::cout << "Node " << world.rank() << " finished loop " << std::endl;
|
|
||||||
mpi::wait_all(requests, requests+5);
|
mpi::wait_all(requests, requests+5);
|
||||||
} //end worker nodes
|
} //end worker nodes
|
||||||
|
|
||||||
else if (world.rank() == 1){
|
//Database Node
|
||||||
|
if (world.rank() == 1 || world.size() == 1 || (world.size() == 2 && world.rank() == 0)){
|
||||||
//Check for finished signal, assuming we have no more storage requests
|
//Check for finished signal, assuming we have no more storage requests
|
||||||
if(world.iprobe(0, 99) && !world.iprobe(0,7) && !world.iprobe(0,8)){
|
if(world.iprobe(0, 99) && !world.iprobe(0,7) && !world.iprobe(0,8)){
|
||||||
std::cout << "Node " << world.rank() << " received finalize signal" << std::endl;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1621,7 +1418,6 @@ std::unordered_set<size_t> front_expl;
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Check for frontier storage requests
|
//Check for frontier storage requests
|
||||||
//while(world.iprobe(0, 50)){
|
|
||||||
while(true){
|
while(true){
|
||||||
if(!world.iprobe(0, 50)){
|
if(!world.iprobe(0, 50)){
|
||||||
break;
|
break;
|
||||||
@ -1633,17 +1429,14 @@ std::unordered_set<size_t> front_expl;
|
|||||||
|
|
||||||
} //end world rank =1
|
} //end world rank =1
|
||||||
|
|
||||||
//World Rank = 0
|
//Root Node
|
||||||
else{
|
if (world.rank() == 0){
|
||||||
std::map<int, int> deque_marker;
|
std::map<int, int> deque_marker;
|
||||||
int finish_count = 0;
|
int finish_count = 0;
|
||||||
std::vector<Factbase> node_factbases;
|
std::vector<Factbase> node_factbases;
|
||||||
std::vector<Edge> node_edges;
|
std::vector<Edge> node_edges;
|
||||||
//Receive states and edges when nodes finish
|
//Receive states and edges when nodes finish
|
||||||
//while(finish_count != world.size() -2){
|
|
||||||
std::cout << "Waiting for " << msg_sends << " total messages." << std::endl;
|
|
||||||
while(finish_count != msg_sends){
|
while(finish_count != msg_sends){
|
||||||
//while(world.iprobe(mpi::any_source, 10) || world.iprobe(mpi::any_source, 11)) {
|
|
||||||
while(true){
|
while(true){
|
||||||
if(!world.iprobe(mpi::any_source, 10) && !world.iprobe(mpi::any_source, 11)){
|
if(!world.iprobe(mpi::any_source, 10) && !world.iprobe(mpi::any_source, 11)){
|
||||||
break;
|
break;
|
||||||
@ -1656,26 +1449,21 @@ std::unordered_set<size_t> front_expl;
|
|||||||
world.recv(mpi::any_source, 11, node_edges);
|
world.recv(mpi::any_source, 11, node_edges);
|
||||||
}
|
}
|
||||||
if(!node_factbases.empty() || !node_edges.empty()){
|
if(!node_factbases.empty() || !node_edges.empty()){
|
||||||
std::cout << "Merging states. Starting with: " << instance.factbases.size() << " states." << std::endl;
|
|
||||||
std::cout << "We are merging " << node_factbases.size() << " node fbs and " << node_edges.size() << " node edges" << std::endl;
|
|
||||||
state_merge(node_factbases, node_edges, hash_map, instance, mem_threshold, world, last_known_id);
|
state_merge(node_factbases, node_edges, hash_map, instance, mem_threshold, world, last_known_id);
|
||||||
last_known_id = instance.factbases.size()-1;
|
last_known_id = instance.factbases.size()-1;
|
||||||
std::cout << "Finished merging. Now have: " << instance.factbases.size() << " states." << std::endl;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Nodes finish
|
//Nodes finish
|
||||||
for(int w = 2; w < world.size(); w++){
|
for(int w = 0; w < world.size(); w++){
|
||||||
int dummy_finish = 0;
|
int dummy_finish = 0;
|
||||||
if(world.iprobe(w, 2)){
|
if(world.iprobe(w, 2)){
|
||||||
world.recv(w, 2, dummy_finish);
|
world.recv(w, 2, dummy_finish);
|
||||||
finish_count++;
|
finish_count++;
|
||||||
std::cout << "Root received subgraph finish message from node " << w << std::endl;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Check for new fact and new state that caused an update in the hash table and facts
|
//Check for new fact and new state that caused an update in the hash table and facts
|
||||||
//while(world.iprobe(mpi::any_source, 5) || world.iprobe(mpi::any_source, 6)){
|
|
||||||
while(true){
|
while(true){
|
||||||
if(!world.iprobe(mpi::any_source, 5) || !world.iprobe(mpi::any_source, 6)){
|
if(!world.iprobe(mpi::any_source, 5) || !world.iprobe(mpi::any_source, 6)){
|
||||||
break;
|
break;
|
||||||
@ -1685,25 +1473,13 @@ std::unordered_set<size_t> front_expl;
|
|||||||
|
|
||||||
world.recv(mpi::any_source, 5, update_state);
|
world.recv(mpi::any_source, 5, update_state);
|
||||||
world.recv(mpi::any_source, 6, update_fact);
|
world.recv(mpi::any_source, 6, update_fact);
|
||||||
|
|
||||||
//Update
|
//Update
|
||||||
instance.facts.hash_table[update_state.compound_assign(update_fact)]=instance.facts.size();
|
instance.facts.hash_table[update_state.compound_assign(update_fact)]=instance.facts.size();
|
||||||
instance.facts.length++;
|
instance.facts.length++;
|
||||||
instance.facts.str_vector.push_back(update_state.compound_assign(update_fact));
|
instance.facts.str_vector.push_back(update_state.compound_assign(update_fact));
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
//Rather than just busy-wait for the remainder of the time, remove duplicates from localFrontier
|
|
||||||
for(auto itr = localFrontier.begin(); itr != localFrontier.end();){
|
|
||||||
auto ret = localFrontier_seen.insert(*itr);
|
|
||||||
if(!ret.second){
|
|
||||||
itr = localFrontier.erase(itr);
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
itr++;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
std::cout << "Root received all signals from nodes" << std::endl;
|
|
||||||
|
|
||||||
//Check for Hash Table updates
|
//Check for Hash Table updates
|
||||||
while(true){
|
while(true){
|
||||||
@ -1721,7 +1497,6 @@ std::unordered_set<size_t> front_expl;
|
|||||||
instance.facts.str_vector.push_back(update_state.compound_assign(update_fact));
|
instance.facts.str_vector.push_back(update_state.compound_assign(update_fact));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << "Root has received all hash update messages. " << std::endl;
|
|
||||||
//Check for factbases or nodes, and add them to our network
|
//Check for factbases or nodes, and add them to our network
|
||||||
while(true){
|
while(true){
|
||||||
if(!world.iprobe(mpi::any_source, 10) && !world.iprobe(mpi::any_source, 11)){
|
if(!world.iprobe(mpi::any_source, 10) && !world.iprobe(mpi::any_source, 11)){
|
||||||
@ -1734,50 +1509,42 @@ std::unordered_set<size_t> front_expl;
|
|||||||
world.recv(mpi::any_source, 11, node_edges);
|
world.recv(mpi::any_source, 11, node_edges);
|
||||||
}
|
}
|
||||||
if(!node_factbases.empty() || !node_edges.empty()){
|
if(!node_factbases.empty() || !node_edges.empty()){
|
||||||
std::cout << "Merging states. Starting with: " << instance.factbases.size() << " states." << std::endl;
|
|
||||||
state_merge(node_factbases, node_edges, hash_map, instance, mem_threshold, world, last_known_id);
|
state_merge(node_factbases, node_edges, hash_map, instance, mem_threshold, world, last_known_id);
|
||||||
last_known_id = instance.factbases.size()-1;
|
last_known_id = instance.factbases.size()-1;
|
||||||
std::cout << "Finished merging. Now have: " << instance.factbases.size() << " states." << std::endl;
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::cout << "Root has collected all merging messages." << std::endl;
|
|
||||||
|
|
||||||
//Receive node frontiers and merge them into root frontier
|
//Receive node frontiers and merge them into root frontier
|
||||||
for(int w = 2; w < world.size(); w++){
|
for(int w = 0; w < world.size(); w++){
|
||||||
|
//If we have a big enough world, dedicate a node soley for db ops and a root
|
||||||
|
if(world.size() >= 3){
|
||||||
|
if(w == 0 || w == 1){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
//if(world.iprobe(w, 3)){
|
//if(world.iprobe(w, 3)){
|
||||||
if(world.iprobe(w, 3)){
|
if(world.iprobe(w, 3)){
|
||||||
std::deque<NetworkState> nodeFrontier;
|
std::deque<NetworkState> nodeFrontier;
|
||||||
std::cout << "Root attempting to receive the new Node Frontier from Node " << w << std::endl;
|
|
||||||
//std::vector<NetworkState> nodeFrontier;
|
|
||||||
world.recv(w, 3, nodeFrontier);
|
world.recv(w, 3, nodeFrontier);
|
||||||
//std::set_difference(nodeFrontier.begin(), nodeFrontier.end(), node_factbases.begin(), node_factbases.end(),
|
|
||||||
// std::inserter(front_expl, front_expl.begin()),[&](NetworkState &ns) -> size_t {return ns.get_hash(instance.facts);});
|
//Maintain a list of explored states
|
||||||
//std::set_difference(nodeFrontier.begin(), nodeFrontier.end(), node_factbases.begin(), node_factbases.end(), boost::make_function_output_iterator([&front_expl](NetworkState &ns, AGGenInstance &instance) {front_expl.insert(ns.get_hash(instance.facts));}));
|
|
||||||
//for(auto itr = nodeFrontier.begin(); itr != nodeFrontier.end(); itr++){
|
|
||||||
for (NetworkState ns : nodeFrontier){
|
for (NetworkState ns : nodeFrontier){
|
||||||
front_expl.insert(ns.get_hash(instance.facts));
|
front_expl.insert(ns.get_hash(instance.facts));
|
||||||
}
|
}
|
||||||
|
|
||||||
//for(auto itr = node_factbases.begin(), itr != node_factbases.end(); itr++){
|
|
||||||
for (Factbase fb : node_factbases){
|
for (Factbase fb : node_factbases){
|
||||||
if (front_expl.count(fb.hash(instance.facts))){
|
if (front_expl.count(fb.hash(instance.facts))){
|
||||||
front_expl.erase(fb.hash(instance.facts));
|
front_expl.erase(fb.hash(instance.facts));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// std::set_difference(nodeFrontier.begin(), nodeFrontier.end(), node_factbases.begin(), node_factbases.end(), boost::make_function_output_iterator([&front_expl](NetworkState &ns, AGGenInstance &instance) {front_expl.insert(ns.get_hash(instance.facts));}), [](const NetworkState &ns1, const NetworkState &ns2, AGGenInstance &instance) const {return ns1.get_hash(instance.facts) < ns2.get_hash(instance.facts);});
|
|
||||||
|
|
||||||
//std::set_difference(nodeFrontier.begin(), nodeFrontier.end(), node_factbases.begin(), node_factbases.end(), funcs{[](NetworkState &ns1, NetworkState &ns2, AGGenInstance &instance) {return ns1.get_hash(instance.facts) < ns2.get_hash(instance.facts);}, [](NetworkState &ns2, NetworkState &ns1, AGGenInstance &instance) {return ns2.get_hash(instance.facts) < ns1.get_hash(instance.facts);}}boost::make_function_output_iterator([&front_expl](NetworkState &ns, AGGenInstance &instance) {front_expl.insert(ns.get_hash(instance.facts));}) funcs{[](NetworkState &ns1, NetworkState &ns2, AGGenInstance &instance) {return ns1.get_hash(instance.facts) < ns2.get_hash(instance.facts);}, [](NetworkState &ns2, NetworkState &ns1, AGGenInstance &instance) {return ns2.get_hash(instance.facts) < ns1.get_hash(instance.facts);}});
|
|
||||||
//std::set_difference(nodeFrontier.begin(), nodeFrontier.end(), node_factbases.begin(), node_factbases.end(), std::transform(
|
|
||||||
//std::set_difference(nodeFrontier.begin(), nodeFrontier.end(), node_factbases.begin(), node_factbases.end(), std::transform(
|
|
||||||
std::cout << "Root received the frontier. Now attempting to add it to our local Frontier, which is currently of size " << localFrontier.size() << std::endl;
|
|
||||||
localFrontier.insert(std::end(localFrontier), std::begin(nodeFrontier), std::end(nodeFrontier));
|
localFrontier.insert(std::end(localFrontier), std::begin(nodeFrontier), std::end(nodeFrontier));
|
||||||
std::cout << "Local Frontier now has size: " << localFrontier.size() << std::endl;
|
|
||||||
deque_marker[w] = (int)(localFrontier.size()-1);
|
deque_marker[w] = (int)(localFrontier.size()-1);
|
||||||
std::cout << "Deque marker for node " << w << " is " << deque_marker[w] << std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//If a node doesn't have a specific state to pull, randomly assign it one
|
//If a node doesn't have a specific state to pull, randomly assign it one
|
||||||
if (!deque_marker.count(w)){
|
if (!deque_marker.count(w)){
|
||||||
//Randomly assign a state index to pop
|
//Randomly assign a state index to pop
|
||||||
@ -1788,17 +1555,23 @@ std::unordered_set<size_t> front_expl;
|
|||||||
else{
|
else{
|
||||||
deque_marker[w] = 0;
|
deque_marker[w] = 0;
|
||||||
}
|
}
|
||||||
std::cout << "Random deque marker for node " << w << " is " << deque_marker[w] << std::endl;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << "Root added a placemarker for all frontier pulls " << std::endl;
|
|
||||||
|
|
||||||
msg_sends = 0;
|
msg_sends = 0;
|
||||||
//Send new Network State to all worker nodes, if we have enough unex states to do so
|
//Send new Network State to all worker nodes, if we have enough unex states to do so
|
||||||
//2 offset for root node and db node
|
//2 offset for root node and db node
|
||||||
for (int w = 2; w < world.size(); w++){
|
for (int w = 0; w < world.size(); w++){
|
||||||
std::cout << "Attempting to send a new state to node " << w << std::endl;
|
if(world.size() >= 3){
|
||||||
|
if(w == 0 || w == 1){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(world.size() == 2){
|
||||||
|
if(w == 0){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
int proceed = 0;
|
int proceed = 0;
|
||||||
while(proceed == 0 && !localFrontier.empty()){
|
while(proceed == 0 && !localFrontier.empty()){
|
||||||
if(deque_marker[w] >= localFrontier.size()){
|
if(deque_marker[w] >= localFrontier.size()){
|
||||||
@ -1806,67 +1579,51 @@ std::unordered_set<size_t> front_expl;
|
|||||||
deque_marker[w] = 0;
|
deque_marker[w] = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
deque_marker[w] = localFrontier.size()-1;
|
deque_marker[w] = localFrontier.size()-1;
|
||||||
}
|
}
|
||||||
std::cout << "<IF> LF Size: " << localFrontier.size() << std::endl;
|
|
||||||
if(!localFrontier.empty()){
|
if(!localFrontier.empty()){
|
||||||
//while(deque_marker[w] >= localFrontier.size())
|
|
||||||
// deque_marker[w]--;
|
|
||||||
//auto deque_access = localFrontier.begin() + deque_marker[w+2];
|
|
||||||
auto deque_access = deque_marker[w];
|
auto deque_access = deque_marker[w];
|
||||||
|
|
||||||
NetworkState send_state = localFrontier.at(deque_access);
|
NetworkState send_state = localFrontier.at(deque_access);
|
||||||
std::cout << "Got our state from deque" << std::endl;
|
|
||||||
//Don't explore on states we already have explored
|
//Don't explore on states we already have explored
|
||||||
if(front_expl.find(send_state.get_hash(instance.facts)) != front_expl.end()){
|
if(front_expl.find(send_state.get_hash(instance.facts)) != front_expl.end()){
|
||||||
std::cout << "Already explored this state." << std::endl;
|
|
||||||
if(localFrontier.size() == 1){
|
if(localFrontier.size() == 1){
|
||||||
localFrontier.clear();
|
localFrontier.clear();
|
||||||
deque_marker[w] = -1;
|
deque_marker[w] = 0;
|
||||||
std::cout << "Cleared LF, it is now of size: " << localFrontier.size() << std::endl;
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
localFrontier.erase(localFrontier.begin()+deque_access);
|
localFrontier.erase(localFrontier.begin()+deque_access);
|
||||||
deque_marker[w] = deque_marker[w]-1;
|
deque_marker[w] = deque_marker[w]-1;
|
||||||
}
|
}
|
||||||
std::cout << "Post hashing LF size: " << localFrontier.size() << std::endl;
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
std::cout << " We have not seen this state yet." << std::endl;
|
|
||||||
//localFrontier.erase(localFrontier.begin()+deque_access);
|
|
||||||
proceed = 1;
|
proceed = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(proceed == 1){
|
if(proceed == 1){
|
||||||
std::cout << "Preparing the send to World Rank " << w << std::endl;
|
|
||||||
//Rest State back to ID 0
|
//Rest State back to ID 0
|
||||||
send_state.force_set_id(0);
|
send_state.force_set_id(0);
|
||||||
mpi::request state_req = world.isend(w, 1, send_state);
|
mpi::request state_req = world.isend(w, 1, send_state);
|
||||||
state_req.wait();
|
state_req.wait();
|
||||||
|
|
||||||
if(localFrontier.size() == 1){
|
if(localFrontier.size() == 1){
|
||||||
localFrontier.clear();
|
localFrontier.clear();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
localFrontier.erase(localFrontier.begin()+deque_access);
|
localFrontier.erase(localFrontier.begin()+deque_access);
|
||||||
}
|
}
|
||||||
//state_req.wait();
|
|
||||||
msg_sends++;
|
msg_sends++;
|
||||||
std::cout << "Root sent new states to World Rank " << w << " with state ID " << send_state.get_id() << std::endl;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Else localFrontier size = 0
|
//Else localFrontier size = 0
|
||||||
else{
|
else{
|
||||||
std::cout << "Frontier is empty. " << std::endl;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::cout << "Message Sends: " << msg_sends << std::endl;
|
|
||||||
//if LocalFrontier is empty at this point and we did not send any messages, we're done
|
//if LocalFrontier is empty at this point and we did not send any messages, we're done
|
||||||
if(localFrontier.empty() && msg_sends == 0 && !world.iprobe(mpi::any_source, mpi::any_tag)){
|
if(localFrontier.empty() && msg_sends == 0 && !world.iprobe(mpi::any_source, mpi::any_tag)){
|
||||||
std::cout << "Root is sending finalize signal" << std::endl;
|
|
||||||
finished_signal = 1;
|
finished_signal = 1;
|
||||||
}
|
}
|
||||||
} //end world rank 0
|
} //end world rank 0
|
||||||
@ -1876,11 +1633,9 @@ std::unordered_set<size_t> front_expl;
|
|||||||
if(world.rank() == 0){
|
if(world.rank() == 0){
|
||||||
for(int w = 1; w < world.size(); w++){
|
for(int w = 1; w < world.size(); w++){
|
||||||
world.isend(w, 99, 1);
|
world.isend(w, 99, 1);
|
||||||
std::cout << "Finalize message sent to Node " << w << std::endl;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << "Process " << world.rank() << " is finishing" << std::endl;
|
|
||||||
world.barrier();
|
world.barrier();
|
||||||
if(world.rank() == 0){
|
if(world.rank() == 0){
|
||||||
gettimeofday(&t2,NULL);
|
gettimeofday(&t2,NULL);
|
||||||
@ -1891,7 +1646,6 @@ std::unordered_set<size_t> front_expl;
|
|||||||
|
|
||||||
std::chrono::duration<double> elapsed_seconds = end - start;
|
std::chrono::duration<double> elapsed_seconds = end - start;
|
||||||
instance.elapsed_seconds = elapsed_seconds;
|
instance.elapsed_seconds = elapsed_seconds;
|
||||||
std::cout << "TOTAL STATES IN LOOP: " << instance.factbases.size() << std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return instance;
|
return instance;
|
||||||
|
|||||||
@ -91,10 +91,10 @@ class AGGen {
|
|||||||
AGGenInstance &sg_generate(bool batch_process, int batch_num, int numThrd,\
|
AGGenInstance &sg_generate(bool batch_process, int batch_num, int numThrd,\
|
||||||
int initQSize, double mem_threshold, boost::mpi::communicator &world, int state_limit);
|
int initQSize, double mem_threshold, boost::mpi::communicator &world, int state_limit);
|
||||||
|
|
||||||
AGGenInstance &generate(bool batch_process, int batch_num, int numThrd,\
|
AGGenInstance &tasking_generate(bool batch_process, int batch_num, int numThrd,\
|
||||||
int initQSize, double mem_threshold, boost::mpi::communicator &world);
|
int initQSize, double mem_threshold, boost::mpi::communicator &world);
|
||||||
|
|
||||||
AGGenInstance &single_generate(bool batch_process, int batch_num, int numThrd,\
|
AGGenInstance &omp_generate(bool batch_process, int batch_num, int numThrd,\
|
||||||
int initQSize, double mem_threshold, boost::mpi::communicator &world);
|
int initQSize, double mem_threshold, boost::mpi::communicator &world);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
14
src/main.cpp
14
src/main.cpp
@ -527,6 +527,10 @@ int main(int argc, char *argv[]) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mpi_subgraphing && mpi_tasking){
|
||||||
|
std::cout << " You have specified MPI Tasking and MPI Subgraphing. Please choose only 1 option." << std::endl;
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
std::cout << "Arguments parsed." << std::endl;
|
std::cout << "Arguments parsed." << std::endl;
|
||||||
|
|
||||||
mt::level mt_level = mt::multiple;
|
mt::level mt_level = mt::multiple;
|
||||||
@ -690,12 +694,12 @@ int main(int argc, char *argv[]) {
|
|||||||
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
|
||||||
|
|
||||||
if (mpi_subgraphing && world.size() > 3)
|
if (mpi_subgraphing)
|
||||||
postinstance = gen.sg_generate(batch_process, batch_size, thread_count, init_qsize, alpha, world, depth_limit); //The method call to generate the attack graph, defined in ag_gen.cpp.
|
postinstance = gen.sg_generate(batch_process, batch_size, thread_count, init_qsize, alpha, world, depth_limit); //The method call to generate the attack graph, defined in ag_gen.cpp.
|
||||||
else if (mpi_tasking && world.size() > 1)
|
else if (mpi_tasking)
|
||||||
postinstance = gen.generate(batch_process, batch_size, thread_count, init_qsize, alpha, world); //The method call to generate the attack graph, defined in ag_gen.cpp.
|
postinstance = gen.tasking_generate(batch_process, batch_size, thread_count, init_qsize, alpha, world); //The method call to generate the attack graph, defined in ag_gen.cpp.
|
||||||
else
|
else
|
||||||
postinstance = gen.single_generate(batch_process, batch_size, thread_count, init_qsize, alpha, world); //The method call to generate the attack graph, defined in ag_gen.cpp.
|
postinstance = gen.omp_generate(batch_process, batch_size, thread_count, init_qsize, alpha, world); //The method call to generate the attack graph, defined in ag_gen.cpp.
|
||||||
|
|
||||||
//world.barrier();
|
//world.barrier();
|
||||||
//Serialization Unit Testing on Postinstance Data
|
//Serialization Unit Testing on Postinstance Data
|
||||||
@ -710,7 +714,7 @@ int main(int argc, char *argv[]) {
|
|||||||
if(world.rank() == 0){
|
if(world.rank() == 0){
|
||||||
std::cout << "Saving to Database." << std::endl;
|
std::cout << "Saving to Database." << std::endl;
|
||||||
save_ag_to_db(postinstance, true);
|
save_ag_to_db(postinstance, true);
|
||||||
std::cout << "PostInstance states: " << postinstance.factbases.size() << std::endl;
|
//std::cout << "PostInstance states: " << postinstance.factbases.size() << std::endl;
|
||||||
|
|
||||||
std::cout << "Total Edges: " << get_num_edges() << std::endl;
|
std::cout << "Total Edges: " << get_num_edges() << std::endl;
|
||||||
std::cout << "Total Time: " << postinstance.elapsed_seconds.count() << " seconds\n";
|
std::cout << "Total Time: " << postinstance.elapsed_seconds.count() << " seconds\n";
|
||||||
|
|||||||
@ -401,8 +401,16 @@ void task_two(AGGenInstance &instance, int alloc, int two_alloc, boost::mpi::com
|
|||||||
ag_req.wait();
|
ag_req.wait();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
int last_known_id;
|
||||||
|
if(instance.factbases.size() == 0){
|
||||||
|
last_known_id = 0;
|
||||||
|
}
|
||||||
|
else last_known_id = instance.factbases.size()-1;
|
||||||
|
if(get_num_states() > 1)
|
||||||
|
last_known_id += get_num_states()-1;
|
||||||
|
//int last_known_id = instance.factbases.size()-1
|
||||||
task_three(instance, new_state, localFrontier, mem_threshold, world,\
|
task_three(instance, new_state, localFrontier, mem_threshold, world,\
|
||||||
alloc, two_alloc, current_state, exploit, assetGroup, hash_map);
|
alloc, two_alloc, current_state, exploit, assetGroup, hash_map, last_known_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@ -414,14 +422,18 @@ void task_two(AGGenInstance &instance, int alloc, int two_alloc, boost::mpi::com
|
|||||||
|
|
||||||
void task_three(AGGenInstance &instance, NetworkState &new_state, std::deque<NetworkState> &localFrontier,\
|
void task_three(AGGenInstance &instance, NetworkState &new_state, std::deque<NetworkState> &localFrontier,\
|
||||||
double mem_threshold, boost::mpi::communicator &world, int alloc, int two_alloc, NetworkState ¤t_state,\
|
double mem_threshold, boost::mpi::communicator &world, int alloc, int two_alloc, NetworkState ¤t_state,\
|
||||||
Exploit &exploit, AssetGroup &assetGroup, std::unordered_map<size_t, int> &hash_map){
|
Exploit &exploit, AssetGroup &assetGroup, std::unordered_map<size_t, int> &hash_map, int last_known_id){
|
||||||
|
|
||||||
//std::cout << "Started Task 3." << std::endl;
|
//std::cout << "Started Task 3." << std::endl;
|
||||||
auto hash_num = new_state.get_hash(instance.facts);
|
auto hash_num = new_state.get_hash(instance.facts);
|
||||||
|
|
||||||
//although local frontier is updated, the global hash is also updated to avoid testing on explored states.
|
//although local frontier is updated, the global hash is also updated to avoid testing on explored states.
|
||||||
if (hash_map.find(hash_num) == hash_map.end()) {
|
if (hash_map.find(hash_num) == hash_map.end()) {
|
||||||
|
new_state.reset_curr_id(last_known_id+1);
|
||||||
new_state.set_id();
|
new_state.set_id();
|
||||||
|
auto new_id = new_state.get_id();
|
||||||
|
last_known_id = new_id;
|
||||||
|
|
||||||
auto facts_tuple = new_state.get_factbase().get_facts_tuple();
|
auto facts_tuple = new_state.get_factbase().get_facts_tuple();
|
||||||
//FactbaseItems new_items = std::make_tuple(facts_tuple, new_state.get_id());
|
//FactbaseItems new_items = std::make_tuple(facts_tuple, new_state.get_id());
|
||||||
//instance.factbase_items.push_back(new_items);
|
//instance.factbase_items.push_back(new_items);
|
||||||
|
|||||||
@ -17,7 +17,7 @@ void task_two(AGGenInstance &instance, int alloc, int two_alloc, boost::mpi::com
|
|||||||
|
|
||||||
void task_three(AGGenInstance &instance, NetworkState &new_state, std::deque<NetworkState> &localFrontier,\
|
void task_three(AGGenInstance &instance, NetworkState &new_state, std::deque<NetworkState> &localFrontier,\
|
||||||
double mem_threshold, boost::mpi::communicator &world, int alloc, int two_alloc, NetworkState ¤t_state,\
|
double mem_threshold, boost::mpi::communicator &world, int alloc, int two_alloc, NetworkState ¤t_state,\
|
||||||
Exploit &exploit, AssetGroup &assetGroup, std::unordered_map<size_t, int> &hash_map);
|
Exploit &exploit, AssetGroup &assetGroup, std::unordered_map<size_t, int> &hash_map, int last_known_id);
|
||||||
|
|
||||||
void task_four(NetworkState &new_state);
|
void task_four(NetworkState &new_state);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user