Commit 9e066d7b authored by Misbah Mubarak's avatar Misbah Mubarak
Browse files

adding support for nearest neighbor comm.

parent 499c0080
...@@ -13,7 +13,8 @@ std::string GetFirstMatch(std::string lookup_name) ...@@ -13,7 +13,8 @@ std::string GetFirstMatch(std::string lookup_name)
return msg_traffic_def_vector[s]->name; return msg_traffic_def_vector[s]->name;
} }
} }
assert(0); return "";
//assert(0);
} }
NearestNeighborSWMUserCode::NearestNeighborSWMUserCode( NearestNeighborSWMUserCode::NearestNeighborSWMUserCode(
...@@ -40,7 +41,7 @@ NearestNeighborSWMUserCode::NearestNeighborSWMUserCode( ...@@ -40,7 +41,7 @@ NearestNeighborSWMUserCode::NearestNeighborSWMUserCode(
{ {
dim_product *= dimension_sizes[dim_i]; dim_product *= dimension_sizes[dim_i];
} }
std::cout << "dim_product is " << dim_product << " and process_cnt is " << process_cnt << std::endl; //std::cout << "dim_product is " << dim_product << " and process_cnt is " << process_cnt << std::endl;
assert(dim_product == process_cnt); assert(dim_product == process_cnt);
req_rt = AUTOMATIC; req_rt = AUTOMATIC;
...@@ -76,12 +77,12 @@ NearestNeighborSWMUserCode::xlat_coords_to_pid( ...@@ -76,12 +77,12 @@ NearestNeighborSWMUserCode::xlat_coords_to_pid(
pid=0; pid=0;
std::cout << "xlat_coords_to_pid on coords "; /*std::cout << "xlat_coords_to_pid on coords ";
for(size_t coords_idx=0; coords_idx<coords.size(); coords_idx++) { for(size_t coords_idx=0; coords_idx<coords.size(); coords_idx++) {
std::cout << " " << coords[coords_idx]; std::cout << " " << coords[coords_idx];
} }
std::cout << endl; std::cout << endl;
*/
uint32_t dim_mult = 1; uint32_t dim_mult = 1;
for(uint32_t dim_idx=0; dim_idx<dimension_cnt; dim_idx++) for(uint32_t dim_idx=0; dim_idx<dimension_cnt; dim_idx++)
...@@ -167,7 +168,7 @@ NearestNeighborSWMUserCode::derive_neighbors_recurse( ...@@ -167,7 +168,7 @@ NearestNeighborSWMUserCode::derive_neighbors_recurse(
std::string neighbor_string = get_neighbor_string(process_id, neighbor_pid); std::string neighbor_string = get_neighbor_string(process_id, neighbor_pid);
std::string regexed_string = GetFirstMatch(neighbor_string); std::string regexed_string = GetFirstMatch(neighbor_string);
std::cout << "neighbor_string is " << neighbor_string << ", regexd_string is " << regexed_string << std::endl; //std::cout << "neighbor_string is " << neighbor_string << ", regexd_string is " << regexed_string << std::endl;
neighbors.push_back( std::make_tuple(neighbor_pid,regexed_string) ); neighbors.push_back( std::make_tuple(neighbor_pid,regexed_string) );
...@@ -182,7 +183,7 @@ NearestNeighborSWMUserCode::derive_neighbors_recurse( ...@@ -182,7 +183,7 @@ NearestNeighborSWMUserCode::derive_neighbors_recurse(
std::string neighbor_string = get_neighbor_string(process_id, neighbor_pid); std::string neighbor_string = get_neighbor_string(process_id, neighbor_pid);
std::string regexed_string = GetFirstMatch(neighbor_string); std::string regexed_string = GetFirstMatch(neighbor_string);
std::cout << "neighbor_string is " << neighbor_string << ", regexd_string is " << regexed_string << std::endl; //std::cout << "neighbor_string is " << neighbor_string << ", regexd_string is " << regexed_string << std::endl;
neighbors.push_back( std::make_tuple(neighbor_pid,regexed_string) ); neighbors.push_back( std::make_tuple(neighbor_pid,regexed_string) );
} }
...@@ -414,7 +415,5 @@ NearestNeighborSWMUserCode::call() ...@@ -414,7 +415,5 @@ NearestNeighborSWMUserCode::call()
} }
SWM_Finalize(); SWM_Finalize();
assert(0);
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment