Commit dd8f83bc authored by Misbah Mubarak's avatar Misbah Mubarak

Merge branch 'core-updates' into 'master'

Core CODES Updates

See merge request !85
parents 253552cc f075794c
......@@ -109,7 +109,7 @@ st_model_types svr_model_types[] = {
static void svr_register_model_types()
{
st_model_type_register("server", &svr_model_types[0]);
st_model_type_register("ns-lp", &svr_model_types[0]);
}
int main(int argc, char **argv)
......
......@@ -246,7 +246,7 @@ int main(
/* calculate the number of servers in this simulation,
* ignoring annotations */
num_servers = codes_mapping_get_lp_count(group_name, 0, "server", NULL, 1);
num_servers = codes_mapping_get_lp_count(group_name, 0, "nw-lp", NULL, 1);
/* for this example, we read from a separate configuration group for
* server message parameters. Since they are constant for all LPs,
......@@ -273,7 +273,7 @@ static void svr_add_lp_type()
{
/* lp_type_register should be called exactly once per process per
* LP type */
lp_type_register("server", svr_get_lp_type());
lp_type_register("nw-lp", svr_get_lp_type());
}
static void svr_init(
......
......@@ -3,14 +3,14 @@
# of application- and codes-specific key-value pairs.
LPGROUPS
{
# in our simulation, we simply have a set of servers, each with
# in our simulation, we simply have a set of servers (nw-lp), each with
# point-to-point access to each other
SERVERS
{
# required: number of times to repeat the following key-value pairs
repetitions="16";
# application-specific: parsed in main
server="1";
nw-lp="1";
# model-net-specific field defining the network backend. In this example,
# each server has one NIC, and each server are point-to-point connected
modelnet_simplenet="1";
......
......@@ -3,14 +3,14 @@
# of application- and codes-specific key-value pairs.
LPGROUPS
{
# in our simulation, we simply have a set of servers, each with
# in our simulation, we simply have a set of servers (nw-lp), each with
# point-to-point access to each other
SERVERS
{
# required: number of times to repeat the following key-value pairs
repetitions="C_NUM_SERVERS";
# application-specific: parsed in main
server="1";
nw-lp="1";
# model-net-specific field defining the network backend. In this example,
# each server has one NIC, and each server are point-to-point connected
modelnet_simplenet="1";
......
......@@ -3,7 +3,7 @@ LPGROUPS
MODELNET_GRP
{
repetitions="198";
server="384";
nw-lp="384";
modelnet_fattree="24";
fattree_switch="6";
}
......
......@@ -3,7 +3,7 @@ LPGROUPS
MODELNET_GRP
{
repetitions="252";
server="288";
nw-lp="288";
modelnet_fattree="18";
fattree_switch="6";
}
......
......@@ -3,7 +3,7 @@ LPGROUPS
MODELNET_GRP
{
repetitions="264";
server="4";
nw-lp="4";
modelnet_dragonfly="4";
modelnet_dragonfly_router="1";
}
......
......@@ -3,7 +3,7 @@ LPGROUPS
MODELNET_GRP
{
repetitions="198"; # repetitions = Ne = total # of edge switches. For type0 Ne = Np*Ns = ceil(N/Ns*(k/2))*(k/2) = ceil(N/(k/2)^2)*(k/2)
server="18";
nw-lp="18";
modelnet_fattree="18";
fattree_switch="3";
}
......
......@@ -3,7 +3,7 @@ LPGROUPS
MODELNET_GRP
{
repetitions="32"; # repetitions = Ne = total # of edge switches. For type0 Ne = Np*Ns = ceil(N/Ns*(k/2))*(k/2) = ceil(N/(k/2)^2)*(k/2)
server="4";
nw-lp="4";
modelnet_fattree="4";
fattree_switch="3";
}
......
......@@ -3,7 +3,7 @@ LPGROUPS
MODELNET_GRP
{
repetitions="50";
server="3";
nw-lp="3";
modelnet_slimfly="3";
slimfly_router="1";
}
......
......@@ -46,6 +46,7 @@ static int enable_msg_tracking = 0;
static int is_synthetic = 0;
static unsigned long long max_gen_data = 1310720;
static int num_qos_levels;
static double compute_time_speedup;
tw_lpid TRACK_LP = -1;
int nprocs = 0;
static double total_syn_data = 0;
......@@ -1444,8 +1445,8 @@ static void codes_exec_comp_delay(
m->rc.saved_delay = s->compute_time;
m->rc.saved_delay_sample = s->ross_sample.compute_time;
s->compute_time += mpi_op->u.delay.nsecs;
s->ross_sample.compute_time += mpi_op->u.delay.nsecs;
s->compute_time += (mpi_op->u.delay.nsecs/compute_time_speedup);
s->ross_sample.compute_time += (mpi_op->u.delay.nsecs/compute_time_speedup);
ts = mpi_op->u.delay.nsecs;
if(ts <= g_tw_lookahead)
{
......@@ -2921,6 +2922,19 @@ static int msg_size_hash_compare(
return 0;
}
/* Method to organize all mpi_replay specific configuration parameters
to be specified in the loaded .conf file*/
void modelnet_mpi_replay_read_config()
{
// Load the factor by which the compute time is sped up by. e.g. If compute_time_speedup = 2, all compute time delay is halved.
int rc = configuration_get_value_double(&config, "PARAMS", "compute_time_speedup", NULL, &compute_time_speedup);
if (rc) {
compute_time_speedup = 1;
}
}
int modelnet_mpi_replay(MPI_Comm comm, int* argc, char*** argv )
{
int rank;
......@@ -3034,6 +3048,8 @@ int modelnet_mpi_replay(MPI_Comm comm, int* argc, char*** argv )
net_id = *net_ids;
free(net_ids);
modelnet_mpi_replay_read_config();
if(enable_debug)
{
workload_log = fopen("mpi-op-logs", "w+");
......
......@@ -165,7 +165,7 @@ static const st_model_types *ft_svr_get_model_stat_types(void)
void ft_svr_register_model_stats()
{
st_model_type_register("server", ft_svr_get_model_stat_types());
st_model_type_register("nw-lp", ft_svr_get_model_stat_types());
}
const tw_optdef app_opt [] =
......@@ -184,7 +184,7 @@ const tw_lptype* svr_get_lp_type()
static void svr_add_lp_type()
{
lp_type_register("server", svr_get_lp_type());
lp_type_register("nw-lp", svr_get_lp_type());
}
static void issue_event(
......@@ -477,7 +477,7 @@ int main(
MPI_Finalize();
return 0;
}
num_servers_per_rep = codes_mapping_get_lp_count("MODELNET_GRP", 1, "server",
num_servers_per_rep = codes_mapping_get_lp_count("MODELNET_GRP", 1, "nw-lp",
NULL, 1);
configuration_get_value_int(&config, "PARAMS", "num_routers", NULL, &num_routers_per_grp);
......@@ -485,7 +485,7 @@ int main(
num_nodes = num_groups * num_routers_per_grp * (num_routers_per_grp / 2);
num_nodes_per_grp = num_routers_per_grp * (num_routers_per_grp / 2);
num_nodes = codes_mapping_get_lp_count("MODELNET_GRP", 0, "server", NULL, 1);
num_nodes = codes_mapping_get_lp_count("MODELNET_GRP", 0, "nw-lp", NULL, 1);
printf("num_nodes:%d \n",num_nodes);
......
......@@ -160,7 +160,7 @@ static const st_model_types *svr_get_model_stat_types(void)
void svr_register_model_types()
{
st_model_type_register("server", svr_get_model_stat_types());
st_model_type_register("nw-lp", svr_get_model_stat_types());
}
const tw_optdef app_opt [] =
......@@ -181,7 +181,7 @@ const tw_lptype* svr_get_lp_type()
static void svr_add_lp_type()
{
lp_type_register("server", svr_get_lp_type());
lp_type_register("nw-lp", svr_get_lp_type());
}
/* convert GiB/s and bytes to ns */
......@@ -523,7 +523,7 @@ int main(
net_id = *net_ids;
free(net_ids);
num_servers_per_rep = codes_mapping_get_lp_count("MODELNET_GRP", 1, "server", NULL, 1);
num_servers_per_rep = codes_mapping_get_lp_count("MODELNET_GRP", 1, "nw-lp", NULL, 1);
configuration_get_value_int(&config, "PARAMS", "num_terminals", NULL, &num_terminals);
configuration_get_value_int(&config, "PARAMS", "num_routers", NULL, &num_routers_per_grp);
num_groups = (num_routers_per_grp * 2);
......
......@@ -147,7 +147,7 @@ static const st_model_types *svr_get_model_stat_types(void)
void svr_register_model_types()
{
st_model_type_register("server", svr_get_model_stat_types());
st_model_type_register("nw-lp", svr_get_model_stat_types());
}
const tw_optdef app_opt [] =
......@@ -170,7 +170,7 @@ const tw_lptype* svr_get_lp_type()
static void svr_add_lp_type()
{
lp_type_register("server", svr_get_lp_type());
lp_type_register("nw-lp", svr_get_lp_type());
}
static void issue_event(
......@@ -448,7 +448,7 @@ int main(
MPI_Finalize();
return 0;
}
num_servers_per_rep = codes_mapping_get_lp_count("MODELNET_GRP", 1, "server",
num_servers_per_rep = codes_mapping_get_lp_count("MODELNET_GRP", 1, "nw-lp",
NULL, 1);
configuration_get_value_int(&config, "PARAMS", "num_routers", NULL, &num_routers_per_grp);
......
......@@ -58,7 +58,7 @@ p*a*g=8*4*33). This configuration can be specified in the config file in the fol
MODELNET_GRP
{
repetitions="264";
server="4";
nw-lp="4";
modelnet_dragonfly="4";
dragonfly_router="1";
}
......@@ -70,7 +70,7 @@ PARAMS
}
The first section, MODELNET_GRP specified the number of LPs and the layout of
LPs. In the above case, there are 264 repetitions of 4 server LPs, 4 dragonfly
LPs. In the above case, there are 264 repetitions of 4 server LPs (nw-lp), 4 dragonfly
network node LPs and 1 dragonfly router LP, which makes a total of 264 routers,
1056 network nodes and 1056 servers in the network. The second section, PARAMS
uses 'num_routers' for the dragonfly topology lay out and setsup the
......
......@@ -8,7 +8,7 @@ bare-minimum example config file:
MODELNET_GRP
{
repetitions="12";
server="4";
nw-lp="4";
modelnet_fattree="4";
fattree_switch="3";
}
......@@ -24,7 +24,7 @@ PARAMS
The first section, MODELNET_GRP specifies the LP types, number of LPs per type
and their configuration. In the above case, there are 12 repetitions each with 4
server LPs, 4 fat tree network node/terminal LPs and 3 fat tree switch LPs. Each
server LPs (nw-lp), 4 fat tree network node/terminal LPs and 3 fat tree switch LPs. Each
repetition represents a leaf level switch, nodes connected to it, and higher
level switches that may be needed to construct the fat-tree. The
'fattree_switch' parameter indicates there are 3 levels to this fat tree and
......
......@@ -73,7 +73,7 @@ generator sets. This configuration can be specified in the config file in the fo
MODELNET_GRP
{
repetitions="50";
server="3";
nw-lp="3";
modelnet_slimfly="3";
slimfly_router="1";
}
......@@ -88,7 +88,7 @@ PARAMS
}
The first section, MODELNET_GRP specified the number of LPs and the layout of
LPs. In the above case, there are 50 repetitions of 3 server LPs, 3 slim fly
LPs. In the above case, there are 50 repetitions of 3 server LPs (nw-lp), 3 slim fly
network node LPs and 1 slim fly router LP, which makes a total of 50 routers,
150 network nodes and 150 servers in the network. The second section, PARAMS
uses 'num_routers' for the slim fly topology lay out and sets up the
......
......@@ -12,13 +12,13 @@ LPGROUPS
MODELNET_GRP
{
repetitions="16";
server="1";
nw-lp="1";
example_net="1";
}
}
------------------------------------------------------------------------------
In this config file, there are multiple LP types defined in a single LP group (As we will see in a later
example, there can be multiple LP groups in a config file too). There is 1 server LP and 1 example_net
example, there can be multiple LP groups in a config file too). There is 1 server LP (nw-lp) and 1 example_net
LP type in a group and this combination is repeated 16 time (repetitions="16"). ROSS will assign the
LPs to the PEs (PEs is an abstraction for MPI rank in ROSS) by placing 1 server LP then 1 example_net
LP a total of 16 times. This configuration is useful if there is some form of communication involved
......@@ -33,7 +33,7 @@ LPGROUPS
MODELNET_GRP
{
repetitions="16";
server="1";
nw-lp="1";
example_net="2";
}
}
......@@ -51,7 +51,7 @@ Following is an example function that registers 'server' lp type.
static void svr_add_lp_type()
{
lp_type_register("server", svr_get_lp_type());
lp_type_register("nw-lp", svr_get_lp_type());
}
Step 4: Call to codes_mapping_setup that sets up the LPs of each registered LP type as specified in the config
......@@ -67,7 +67,7 @@ The second argument indicates whether to include the number of repetitions into
the count or not (the NULL, 0 arguments will be discussed later). For example,
to query the number of server LPs in example-test2.conf file, calling
num_servers = codes_mapping_get_lp_count("MODELNET_GRP", 1, "server", NULL, 0);
num_servers = codes_mapping_get_lp_count("MODELNET_GRP", 1, "nw-lp", NULL, 0);
will return 2.
......
......@@ -3,7 +3,7 @@ LPGROUPS
BUF
{
repetitions="2";
server="2";
nw-lp="2";
resource="1";
}
}
......
......@@ -3,7 +3,7 @@ LPGROUPS
TRITON_GRP
{
repetitions="1";
server="1";
nw-lp="1";
lsm="1";
}
}
......
......@@ -3,7 +3,7 @@ LPGROUPS
MODELNET_GRP
{
repetitions="2";
server="1";
nw-lp="1";
modelnet_loggp="1";
}
}
......
......@@ -3,7 +3,7 @@ LPGROUPS
MODELNET_GRP
{
repetitions="2";
server="1";
nw-lp="1";
modelnet_simplenet="1";
}
}
......
......@@ -3,7 +3,7 @@ LPGROUPS
MODELNET_GRP
{
repetitions="288";
server="4";
nw-lp="4";
modelnet_dragonfly_custom="4";
modelnet_dragonfly_custom_router="1";
}
......
......@@ -3,7 +3,7 @@ LPGROUPS
MODELNET_GRP
{
repetitions="36";
server="2";
nw-lp="2";
modelnet_dragonfly="2";
modelnet_dragonfly_router="1";
}
......
......@@ -3,7 +3,7 @@ LPGROUPS
MODELNET_GRP
{
repetitions="64";
server="3";
nw-lp="3";
modelnet_express_mesh="3";
modelnet_express_mesh_router="1";
}
......
......@@ -3,7 +3,7 @@ LPGROUPS
MODELNET_GRP
{
repetitions="16";
server="1";
nw-lp="1";
modelnet_loggp="1";
}
}
......
......@@ -3,7 +3,7 @@ LPGROUPS
MODELNET_GRP
{
repetitions="3";
server="1";
nw-lp="1";
modelnet_simplep2p="1";
}
}
......
......@@ -3,7 +3,7 @@ LPGROUPS
MODELNET_GRP
{
repetitions="50";
server="3";
nw-lp="3";
modelnet_slimfly="3";
slimfly_router="1";
}
......
......@@ -3,7 +3,7 @@ LPGROUPS
MODELNET_GRP
{
repetitions="16";
server="1";
nw-lp="1";
modelnet_torus="1";
}
}
......
......@@ -3,7 +3,7 @@ LPGROUPS
MODELNET_GRP
{
repetitions="16";
server="1";
nw-lp="1";
modelnet_simplenet="1";
}
}
......
......@@ -143,7 +143,7 @@ int main(
return(-1);
}
lp_type_register("server", &svr_lp);
lp_type_register("nw-lp", &svr_lp);
lsm_register();
codes_mapping_setup();
......
......@@ -105,7 +105,7 @@ int main(
if((NUM_SERVERS) % nprocs)
{
fprintf(stderr, "Error: number of server LPs (%d total) is not evenly divisible by the number of MPI processes (%d)\n", NUM_SERVERS, nprocs);
fprintf(stderr, "Error: number of server (or nw-lp) LPs (%d total) is not evenly divisible by the number of MPI processes (%d)\n", NUM_SERVERS, nprocs);
exit(-1);
}
......
......@@ -155,7 +155,7 @@ int main(
assert(num_nets==1);
net_id = *net_ids;
free(net_ids);
num_servers = codes_mapping_get_lp_count("MODELNET_GRP", 0, "server",
num_servers = codes_mapping_get_lp_count("MODELNET_GRP", 0, "nw-lp",
NULL, 1);
assert(num_servers == 2);
if(net_id == DRAGONFLY)
......@@ -189,7 +189,7 @@ const tw_lptype* svr_get_lp_type()
static void svr_add_lp_type()
{
lp_type_register("server", svr_get_lp_type());
lp_type_register("nw-lp", svr_get_lp_type());
}
static void svr_init(
......@@ -382,7 +382,7 @@ static void handle_pong_event(
return;
}
codes_mapping_get_lp_id("MODELNET_GRP", "server", NULL, 1, 1,
codes_mapping_get_lp_id("MODELNET_GRP", "nw-lp", NULL, 1, 1,
0, &peer_gid);
m_remote.svr_event_type = PING;
......
......@@ -137,7 +137,7 @@ int main(
assert(net_id == SIMPLENET);
assert(NUM_SERVERS == codes_mapping_get_lp_count("MODELNET_GRP", 0,
"server", NULL, 1));
"nw-lp", NULL, 1));
tw_run();
......@@ -147,7 +147,7 @@ int main(
static void svr_add_lp_type()
{
lp_type_register("server", &svr_lp);
lp_type_register("nw-lp", &svr_lp);
}
static void svr_init(
......
......@@ -160,7 +160,7 @@ int main(
net_id = *net_ids;
free(net_ids);
num_servers = codes_mapping_get_lp_count("MODELNET_GRP", 0, "server",
num_servers = codes_mapping_get_lp_count("MODELNET_GRP", 0, "nw-lp",
NULL, 1);
assert(num_servers == 3);
......@@ -188,7 +188,7 @@ const tw_lptype* svr_get_lp_type()
static void svr_add_lp_type()
{
lp_type_register("server", svr_get_lp_type());
lp_type_register("nw-lp", svr_get_lp_type());
}
static void svr_init(
......
......@@ -161,7 +161,7 @@ int main(
net_id = *net_ids;
free(net_ids);
num_servers = codes_mapping_get_lp_count("MODELNET_GRP", 0, "server",
num_servers = codes_mapping_get_lp_count("MODELNET_GRP", 0, "nw-lp",
NULL, 1);
if(net_id == DRAGONFLY)
{
......@@ -194,7 +194,7 @@ const tw_lptype* svr_get_lp_type()
static void svr_add_lp_type()
{
lp_type_register("server", svr_get_lp_type());
lp_type_register("nw-lp", svr_get_lp_type());
}
static void svr_init(
......@@ -317,7 +317,7 @@ static void handle_kickoff_event(
ns->start_ts = tw_now(lp);
num_servers_per_rep = codes_mapping_get_lp_count("MODELNET_GRP", 1,
"server", NULL, 1);
"nw-lp", NULL, 1);
num_routers_per_rep = codes_mapping_get_lp_count("MODELNET_GRP", 1,
"dragonfly_router", NULL, 1);
......
......@@ -185,7 +185,7 @@ int main(
free(net_ids);
assert(net_id == DRAGONFLY);
num_servers = codes_mapping_get_lp_count("MODELNET_GRP", 0, "server",
num_servers = codes_mapping_get_lp_count("MODELNET_GRP", 0, "nw-lp",
NULL, 1);
num_routers = codes_mapping_get_lp_count("MODELNET_GRP", 0,
"dragonfly_router", NULL, 1);
......@@ -215,7 +215,7 @@ const tw_lptype* svr_get_lp_type()
static void svr_add_lp_type()
{
lp_type_register("server", svr_get_lp_type());
lp_type_register("nw-lp", svr_get_lp_type());
}
static void svr_init(
......@@ -343,7 +343,7 @@ static void handle_kickoff_event(
ns->start_ts = tw_now(lp);
num_servers_per_rep = codes_mapping_get_lp_count("MODELNET_GRP", 1,
"server", NULL, 1);
"nw-lp", NULL, 1);
num_routers_per_rep = codes_mapping_get_lp_count("MODELNET_GRP", 1,
"dragonfly_router", NULL, 1);
......
......@@ -175,7 +175,7 @@ int main(
net_id = *net_ids;
free(net_ids);
num_servers = codes_mapping_get_lp_count("MODELNET_GRP", 0, "server",
num_servers = codes_mapping_get_lp_count("MODELNET_GRP", 0, "nw-lp",
NULL, 1);
if(net_id == DRAGONFLY)
......@@ -225,7 +225,7 @@ const tw_lptype* svr_get_lp_type()
static void svr_add_lp_type()
{
lp_type_register("server", svr_get_lp_type());
lp_type_register("nw-lp", svr_get_lp_type());
}
static void svr_init(
......@@ -353,7 +353,7 @@ static void handle_kickoff_event(
ns->start_ts = tw_now(lp);
num_servers_per_rep = codes_mapping_get_lp_count("MODELNET_GRP", 1,
"server", NULL, 1);
"nw-lp", NULL, 1);
num_routers_per_rep = codes_mapping_get_lp_count("MODELNET_GRP", 1,
router_name, NULL, 1);
......
......@@ -147,7 +147,7 @@ int main(int argc, char *argv[])
}
resource_lp_init();
lp_type_register("server", &s_lp);
lp_type_register("nw-lp", &s_lp);
codes_mapping_setup();
......
......@@ -69,7 +69,7 @@ int main(
if((NUM_SERVERS + NUM_CLIENTS) % nprocs)
{
fprintf(stderr, "Error: number of server LPs (%d total) is not evenly divisible by the number of MPI processes (%d)\n", NUM_SERVERS+NUM_CLIENTS, nprocs);
fprintf(stderr, "Error: number of server (or nw-lp) LPs (%d total) is not evenly divisible by the number of MPI processes (%d)\n", NUM_SERVERS+NUM_CLIENTS, nprocs);
exit(-1);
}
......
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