Commit bab33d31 authored by Neil McGlohon's avatar Neil McGlohon

Dragonfly Custom Synthetic Workload: Add new traffic pattern

parent 4985656c
......@@ -59,7 +59,9 @@ enum TRAFFIC
{
UNIFORM = 1, /* sends message to a randomly selected node */
NEAREST_GROUP = 2, /* sends message to the node connected to the neighboring router */
NEAREST_NEIGHBOR = 3 /* sends message to the next node (potentially connected to the same router) */
NEAREST_NEIGHBOR = 3, /* sends message to the next node (potentially connected to the same router) */
RANDOM_OTHER_GROUP = 4
};
struct svr_state
......@@ -224,6 +226,26 @@ static void handle_kickoff_event(
{
local_dest = (local_id + 1) % num_nodes;
// printf("\n LP %ld sending to %ld num nodes %d ", rep_id * 2 + offset, local_dest, num_nodes);
}
else if(traffic == RANDOM_OTHER_GROUP)
{
int my_group_id = local_id / num_nodes_per_grp;
int other_groups[num_groups-1];
int added =0;
for(int i = 0; i < num_groups; i++)
{
if(i != my_group_id) {
other_groups[added] = i;
added++;
}
}
int rand_group = other_groups[tw_rand_integer(lp->rng,0,added -1)];
int rand_node_intra_id = tw_rand_integer(lp->rng, 0, num_nodes_per_grp-1);
local_dest = (rand_group * num_nodes_per_grp) + rand_node_intra_id;
printf("\n LP %ld sending to %ld num nodes %d ", local_id, local_dest, num_nodes);
}
assert(local_dest < num_nodes);
// codes_mapping_get_lp_id(group_name, lp_type_name, anno, 1, local_dest / num_servers_per_rep, local_dest % num_servers_per_rep, &global_dest);
......
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