Correcting Frontier Merging for Subgraphing

This commit is contained in:
Noah L. Schrick 2022-02-16 00:03:51 -06:00
parent cd32a4543a
commit 163c00d071
5 changed files with 14509 additions and 14502 deletions

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -58,20 +58,14 @@ if [ "$TYPE" == "$strval1" ]; then
if [ "$(dnsdomainname)" = "hammer.esg.utulsa.edu" ]; then
#4 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/4_Exploits/"$NUM_SERV"_Serv/sync_timeline_maintenance.xp -t "$NUM_THREADS" -q 1 -p -a 0.6 -z "$DBNAME" -l 200 -e -g DOTFILE.dot
#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/4_Exploits/"$NUM_SERV"_Serv/sync_timeline_maintenance.xp -t "$NUM_THREADS" -q 1 -p -a 0.6 -z "$DBNAME" -l 200 -e
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 -a 0.6 -g DOTFILE.dot -z "$DBNAME" -l 20 -e
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 200 -s
fi
# 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"
elif [ "$TYPE" == "$strval2" ]; then
#./ag_gen -n ../Feb_2021/generic_timeline_maintenance.nm -x ../Feb_2021/Non_Sync/"$NUM_SERV"_Serv/generic_timeline_maintenance.xp -g DOTFILE.dot -t 1 -q 1 -p -a 0.9
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/Non_Sync/6_Exploits/"$NUM_SERV"_Serv/generic_timeline_maintenance.xp -t "$NUM_THREADS" -q 1 -p -a 0.6 -z "$DBNAME"
#4 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/Non_Sync/4_Exploits/"$NUM_SERV"_Serv/generic_timeline_maintenance.xp -t "$NUM_THREADS" -q 1 -p -a 0.6 -z "$DBNAME"
else
echo "Running default."
@ -81,8 +75,8 @@ fi
#Graphviz Strict graphing to avoid duplicate nodes and edges
echo -n 'strict ' | cat - DOTFILE.dot > temp && mv temp DOTFILE.dot
#echo -n 'strict ' | cat - DOTFILE.dot > temp && mv temp DOTFILE.dot
#dot -Tsvg new.dot > ag.svg
dot -Tsvg DOTFILE.dot > ag.svg
#dot -Tsvg DOTFILE.dot > ag.svg

File diff suppressed because it is too large Load Diff

View File

@ -1087,11 +1087,11 @@ int initQSize, double mem_threshold, mpi::communicator &world, int state_limit)
}
int frt_size=frontier.size();
if (world.rank() ==0) {
if (world.rank() == 0) {
printf("The actual QSize to start using multiple threads is %d\n",frt_size);
}
double total_t=0.0;
double total_t = 0.0;
//unit:ms
double total_task0, total_task1, total_task2, total_task3, total_task4 = 0.0;
@ -1125,23 +1125,24 @@ int initQSize, double mem_threshold, mpi::communicator &world, int state_limit)
//Send new Network State to all worker nodes, if we have enough unex states to do so
if(world.rank() == 0){
//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(), (int)localFrontier.size()); w++){
//last_known_id = localFrontier.front().get_id();
if(world.size() >= 3){
mpi::request state_req = world.isend(w+2, 1, localFrontier.front());
state_req.wait();
if(world.size() > 1 && w == 0){
continue;
}
else{
mpi::request state_req = world.isend(w, 1, localFrontier.front());
state_req.wait();
if(world.size() >= 3 && w == 1){
continue;
}
mpi::request state_req = world.isend(w, 1, localFrontier.front());
state_req.wait();
localFrontier.pop_front();
msg_sends++;
}
}
//Array of MPI Status requests that we'll use for waiting on non-blocking sends.
mpi::request requests[20];
//Main Work Loop - Just make this a do while instead of first_loop
@ -1395,7 +1396,7 @@ int initQSize, double mem_threshold, mpi::communicator &world, int state_limit)
} //end worker nodes
//Database Node
if (world.rank() == 1 || world.size() == 1 || (world.size() == 2 && world.rank() == 0)){
if (world.rank() == 1 || world.size() == 1){
//Check for finished signal, assuming we have no more storage requests
if(world.iprobe(0, 99) && !world.iprobe(0,7) && !world.iprobe(0,8)){
break;
@ -1508,19 +1509,31 @@ int initQSize, double mem_threshold, mpi::communicator &world, int state_limit)
if(world.iprobe(w, 3)){
std::deque<NetworkState> nodeFrontier;
world.recv(w, 3, nodeFrontier);
std::unordered_set<size_t> tmp_expl;
std::vector<std::tuple<NetworkState, size_t>> insertFrontier;
//Maintain a list of explored states
for (NetworkState ns : nodeFrontier){
front_expl.insert(ns.get_hash(instance.facts));
}
for (Factbase fb : node_factbases){
auto fb_hash = fb.hash(instance.facts);
//Incorrectly declare that we've explored all states in our factbase vector
tmp_expl.insert(fb_hash);
}
for (Factbase fb : node_factbases){
if (front_expl.count(fb.hash(instance.facts))){
front_expl.erase(fb.hash(instance.facts));
}
}
for (NetworkState ns : nodeFrontier){
auto ns_hash = ns.get_hash(instance.facts);
//If we have a state on our local frontier that's in our local explored, we know we haven't actually explored it
if(tmp_expl.count(ns_hash) || front_expl.count(ns_hash)){
localFrontier.emplace_back(ns);
tmp_expl.erase(ns_hash);
}
}
//Add our tmp_expl to our front_expl
for (auto tmp_hash : tmp_expl){
front_expl.insert(tmp_hash);
}
localFrontier.insert(std::end(localFrontier), std::begin(nodeFrontier), std::end(nodeFrontier));
deque_marker[w] = (int)(localFrontier.size()-1);
}