Commit 0729c224 authored by Misbah Mubarak's avatar Misbah Mubarak

Adding sampling for dragonfly routers (in progress), updating binary read file...

Adding sampling for dragonfly routers (in progress), updating binary read file utility to read router samples
parents 4edd57c3 8034222d
......@@ -57,6 +57,7 @@ typedef struct mn_stats mn_stats;
X(SIMPLEP2P, "modelnet_simplep2p", "simplep2p", &simplep2p_method)\
X(TORUS, "modelnet_torus", "torus", &torus_method)\
X(DRAGONFLY, "modelnet_dragonfly", "dragonfly", &dragonfly_method)\
X(DRAGONFLY_ROUTER, "modelnet_dragonfly_router", "dragonfly_router", &dragonfly_router_method)\
X(LOGGP, "modelnet_loggp", "loggp", &loggp_method)\
X(MAX_NETS, NULL, NULL, NULL)
......
......@@ -5,13 +5,13 @@ LPGROUPS
repetitions="36";
nw-lp="2";
modelnet_dragonfly="2";
dragonfly_router="1";
modelnet_dragonfly_router="1";
}
}
PARAMS
{
packet_size="512";
modelnet_order=( "dragonfly" );
modelnet_order=( "dragonfly", "dragonfly_router");
# scheduler options
modelnet_scheduler="fcfs";
chunk_size="256";
......
......@@ -10,7 +10,7 @@ LPGROUPS
PARAMS
{
packet_size="512";
message_size="552";
message_size="560";
modelnet_order=( "torus" );
# scheduler options
modelnet_scheduler="fcfs";
......
......@@ -713,8 +713,8 @@ static void codes_exec_mpi_send(nw_state* s,
if(net_id == DRAGONFLY) /* special handling for the dragonfly case */
{
int num_routers, lps_per_rep, factor;
num_routers = codes_mapping_get_lp_count("MODELNET_GRP", 1,
"dragonfly_router", NULL, 1);
num_routers = codes_mapping_get_lp_count(lp_group_name, 1,
"modelnet_dragonfly_router", NULL, 1);
lps_per_rep = (2 * num_nw_lps) + num_routers;
factor = mpi_op->u.send.dest_rank / num_nw_lps;
dest_rank = (lps_per_rep * factor) + (mpi_op->u.send.dest_rank % num_nw_lps);
......@@ -939,7 +939,7 @@ void nw_test_init(nw_state* s, tw_lp* lp)
/* initialize the LP's and load the data */
char * params = NULL;
dumpi_trace_params params_d;
memset(s, 0, sizeof(*s));
s->nw_id = codes_mapping_get_lp_relative_id(lp->gid, 0, 0);
......@@ -1310,11 +1310,11 @@ int main( int argc, char** argv )
model_net_register();
net_ids = model_net_configure(&num_nets);
assert(num_nets == 1);
// assert(num_nets == 1);
net_id = *net_ids;
free(net_ids);
//model_net_enable_sampling(5000000, g_tw_ts_end);
model_net_enable_sampling(5000000, 8000000);
codes_mapping_setup();
......
......@@ -361,7 +361,7 @@ int main(
codes_mapping_setup();
net_ids = model_net_configure(&num_nets);
assert(num_nets==1);
//assert(num_nets==1);
net_id = *net_ids;
free(net_ids);
......
This diff is collapsed.
......@@ -254,6 +254,9 @@ void model_net_base_configure(){
offsetof(model_net_wrap_msg, msg.m_torus);
msg_offsets[DRAGONFLY] =
offsetof(model_net_wrap_msg, msg.m_dfly);
// note: dragonfly router uses the same event struct
msg_offsets[DRAGONFLY_ROUTER] =
offsetof(model_net_wrap_msg, msg.m_dfly);
msg_offsets[LOGGP] =
offsetof(model_net_wrap_msg, msg.m_loggp);
......
......@@ -21,6 +21,7 @@ extern struct model_net_method simplenet_method;
extern struct model_net_method simplep2p_method;
extern struct model_net_method torus_method;
extern struct model_net_method dragonfly_method;
extern struct model_net_method dragonfly_router_method;
extern struct model_net_method loggp_method;
#define X(a,b,c,d) b,
......@@ -83,7 +84,10 @@ int* model_net_configure(int *id_count){
*id_count = 0;
for (int i = 0; i < MAX_NETS; i++) {
if (do_config_nets[i]){
method_array[i]->mn_configure();
// some don't need configuration (dragonfly router is covered by
// dragonfly)
if (method_array[i]->mn_configure != NULL)
method_array[i]->mn_configure();
(*id_count)++;
}
}
......
......@@ -5,13 +5,13 @@ LPGROUPS
repetitions="36";
server="2";
modelnet_dragonfly="2";
dragonfly_router="1";
modelnet_dragonfly_router="1";
}
}
PARAMS
{
packet_size="512";
modelnet_order=( "dragonfly" );
modelnet_order=( "dragonfly","dragonfly_router" );
# scheduler options
modelnet_scheduler="fcfs";
chunk_size="32";
......
......@@ -20,5 +20,5 @@ PARAMS
link_bandwidth="2.0";
buffer_size="4096";
num_vc="1";
chunk_size="512";
chunk_size="256";
}
......@@ -168,7 +168,7 @@ int main(
codes_mapping_setup();
net_ids = model_net_configure(&num_nets);
assert(num_nets==1);
assert(num_nets>=1);
net_id = *net_ids;
free(net_ids);
......@@ -177,7 +177,7 @@ int main(
if(net_id == DRAGONFLY)
{
num_routers = codes_mapping_get_lp_count("MODELNET_GRP", 0,
"dragonfly_router", NULL, 1);
"modelnet_dragonfly_router", NULL, 1);
offset = 1;
}
......@@ -335,7 +335,7 @@ static void handle_kickoff_event(
num_servers_per_rep = codes_mapping_get_lp_count("MODELNET_GRP", 1,
"server", NULL, 1);
num_routers_per_rep = codes_mapping_get_lp_count("MODELNET_GRP", 1,
"dragonfly_router", NULL, 1);
"modelnet_dragonfly_router", NULL, 1);
lps_per_rep = num_servers_per_rep * 2 + num_routers_per_rep;
......
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