BCL Hash size argument
This commit is contained in:
parent
75048ca849
commit
c98fca5012
BIN
build/ag_gen
BIN
build/ag_gen
Binary file not shown.
13
build/run.sh
13
build/run.sh
@ -51,12 +51,21 @@ else
|
|||||||
ITFC="wlp2s0"
|
ITFC="wlp2s0"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$NUM_SERV" -eq 1 ]]; then
|
||||||
|
BCLHASH=450
|
||||||
|
elif [[ "$NUM_SERV" -eq 2 ]]; then
|
||||||
|
BCLHASH=800
|
||||||
|
elif [[ "$NUM_SERV" -eq 3 ]]; then
|
||||||
|
BCLHASH=1700
|
||||||
|
else
|
||||||
|
BCLHASH=2300
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$TYPE" == "$strval1" ]; then
|
if [ "$TYPE" == "$strval1" ]; then
|
||||||
if [ "$(dnsdomainname)" = "hammer.esg.utulsa.edu" ]; then
|
if [ "$(dnsdomainname)" = "hammer.esg.utulsa.edu" ]; then
|
||||||
if [ "$MPI_TYPE" == subgraphing ]; then
|
if [ "$MPI_TYPE" == subgraphing ]; then
|
||||||
#4 Exploit Option
|
#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 -s
|
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 -s -f "$BCLHASH"
|
||||||
elif [ "$MPI_TYPE" == tasking ]; then
|
elif [ "$MPI_TYPE" == tasking ]; then
|
||||||
#4 Exploit Option
|
#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
|
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
|
||||||
@ -72,7 +81,7 @@ if [ "$TYPE" == "$strval1" ]; then
|
|||||||
else
|
else
|
||||||
if [ "$MPI_TYPE" == subgraphing ]; then
|
if [ "$MPI_TYPE" == subgraphing ]; then
|
||||||
#4 Exploit Option
|
#4 Exploit Option
|
||||||
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 -z "$DBNAME" -l 80 -s
|
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 -z "$DBNAME" -l 80 -s -f "$BCLHASH"
|
||||||
elif [ "$MPI_TYPE" == tasking ]; then
|
elif [ "$MPI_TYPE" == tasking ]; then
|
||||||
#4 Exploit Option
|
#4 Exploit Option
|
||||||
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 -z "$DBNAME" -l 200 -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 -z "$DBNAME" -l 200 -e
|
||||||
|
|||||||
10928
build/states.txt
10928
build/states.txt
File diff suppressed because it is too large
Load Diff
@ -1038,13 +1038,12 @@ int initQSize, double mem_threshold, mpi::communicator &world)
|
|||||||
}
|
}
|
||||||
|
|
||||||
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, int bclhash_size)
|
||||||
{
|
{
|
||||||
//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;
|
||||||
//Distributed Hash maps for factbase hashes and explored hashes
|
//Distributed Hash maps for factbase hashes and explored hashes
|
||||||
//NOTE: At this time, BCL does not support realloc or resizing its containers. This should ideally be changed once support is added.
|
//NOTE: At this time, BCL does not support realloc or resizing its containers. This should ideally be changed once support is added.
|
||||||
int bclhash_size = 450;
|
|
||||||
BCL::HashMap<size_t, int> BCLmap(bclhash_size);
|
BCL::HashMap<size_t, int> BCLmap(bclhash_size);
|
||||||
BCL::HashMap<size_t, int> BCLexpl(bclhash_size);
|
BCL::HashMap<size_t, int> BCLexpl(bclhash_size);
|
||||||
|
|
||||||
|
|||||||
@ -96,7 +96,7 @@ class AGGen {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
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, int bclhash_size);
|
||||||
|
|
||||||
AGGenInstance &tasking_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);
|
||||||
|
|||||||
@ -414,6 +414,7 @@ void print_usage() {
|
|||||||
std::cout << "\t-a\tDecimal value for specifiying maximum amount of system memory to use" << std::endl;
|
std::cout << "\t-a\tDecimal value for specifiying maximum amount of system memory to use" << std::endl;
|
||||||
std::cout << "\t-m\tNumber of MPI Nodes to use" << std::endl;
|
std::cout << "\t-m\tNumber of MPI Nodes to use" << std::endl;
|
||||||
std::cout << "\t-z\tDatabase name for overriding config.ini file" << std::endl;
|
std::cout << "\t-z\tDatabase name for overriding config.ini file" << std::endl;
|
||||||
|
std::cout << "\t-f\tBCL Hash Size" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool file_exists(const std::string &name) {
|
inline bool file_exists(const std::string &name) {
|
||||||
@ -458,6 +459,7 @@ int main(int argc, char *argv[]) {
|
|||||||
int init_qsize;
|
int init_qsize;
|
||||||
int mpi_nodes;
|
int mpi_nodes;
|
||||||
int depth_limit;
|
int depth_limit;
|
||||||
|
int bclhash_size;
|
||||||
|
|
||||||
bool should_graph = false;
|
bool should_graph = false;
|
||||||
bool no_cycles = false;
|
bool no_cycles = false;
|
||||||
@ -470,7 +472,7 @@ int main(int argc, char *argv[]) {
|
|||||||
double alpha = 0.5;
|
double alpha = 0.5;
|
||||||
|
|
||||||
int opt;
|
int opt;
|
||||||
while ((opt = getopt(argc, argv, "rb:g:dhc:l:n:x:t:q:pa:sem:z:")) != -1) {
|
while ((opt = getopt(argc, argv, "rb:g:dhc:l:n:x:t:q:pa:f:sem:z:")) != -1) {
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
case 'g':
|
case 'g':
|
||||||
should_graph = true;
|
should_graph = true;
|
||||||
@ -514,6 +516,9 @@ int main(int argc, char *argv[]) {
|
|||||||
//Save a 10% buffer for PSQL ops
|
//Save a 10% buffer for PSQL ops
|
||||||
alpha = atof(optarg) - 0.1;
|
alpha = atof(optarg) - 0.1;
|
||||||
break;
|
break;
|
||||||
|
case 'f':
|
||||||
|
bclhash_size = atoi(optarg);
|
||||||
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
mpi_subgraphing = true;
|
mpi_subgraphing = true;
|
||||||
break;
|
break;
|
||||||
@ -709,7 +714,7 @@ int main(int argc, char *argv[]) {
|
|||||||
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)
|
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, bclhash_size); //The method call to generate the attack graph, defined in ag_gen.cpp.
|
||||||
else if (mpi_tasking)
|
else if (mpi_tasking)
|
||||||
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.
|
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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user