Commit 66290294 authored by Neil McGlohon's avatar Neil McGlohon
Browse files

Merge branch 'wip-merge-from-upstream' into 'master'

merge from upstream

See merge request neil/codes!25
parents 3f15525f d1a09047
...@@ -49,7 +49,7 @@ endif ...@@ -49,7 +49,7 @@ endif
if USE_DARSHAN if USE_DARSHAN
AM_CPPFLAGS += ${DARSHAN_CFLAGS} -DUSE_DARSHAN=1 AM_CPPFLAGS += ${DARSHAN_CFLAGS} -DUSE_DARSHAN=1
src_libcodes_la_SOURCES += src/workload/methods/codes-darshan-io-wrkld.c src_libcodes_la_SOURCES += src/workload/methods/codes-darshan3-io-wrkld.c
LDADD += ${DARSHAN_LIBS} LDADD += ${DARSHAN_LIBS}
TESTS += tests/workload/darshan-dump.sh TESTS += tests/workload/darshan-dump.sh
endif endif
......
## README for using ROSS instrumentation with CODES ## README for using ROSS instrumentation with CODES
For details about the ROSS instrumentation, see the [ROSS Instrumentation blog post](http://carothersc.github.io/ROSS/feature/instrumentation.html) For details about the ROSS instrumentation, see the [ROSS Instrumentation blog post](http://carothersc.github.io/ROSS/instrumentation/instrumentation.html)
on the ROSS webpage. on the ROSS webpage.
There are currently 3 types of instrumentation: GVT-based, real time, and event tracing. See the ROSS documentation for more info on There are currently 4 types of instrumentation: GVT-based, real time sampling, virtual time sampling, and event tracing.
the specific options or use `--help` with your model. To collect data about the simulation engine, no changes are needed to model code See the ROSS documentation for more info on the specific options or use `--help` with your model.
for any of the instrumentation modes. Some additions to the model code is needed in order to turn on any model-level data collection. To collect data about the simulation engine, no changes are needed to model code for any of the instrumentation modes.
See the "Model-level data sampling" section on [ROSS Instrumentation blog post](http://carothersc.github.io/ROSS/feature/instrumentation.html). Some additions to the model code is needed in order to turn on any model-level data collection.
See the "Model-level data sampling" section on [ROSS Instrumentation blog post](http://carothersc.github.io/ROSS/instrumentation/instrumentation.html).
Here we describe CODES specific details. Here we describe CODES specific details.
### Register Instrumentation Callback Functions ### Register Instrumentation Callback Functions
...@@ -17,15 +18,11 @@ The examples here are based on the dragonfly router and terminal LPs (`src/netwo ...@@ -17,15 +18,11 @@ The examples here are based on the dragonfly router and terminal LPs (`src/netwo
As described in the ROSS Vis documentation, we need to create a `st_model_types` struct with the pointer and size information. As described in the ROSS Vis documentation, we need to create a `st_model_types` struct with the pointer and size information.
```C ```C
st_model_types dragonfly_model_types[] = { st_model_types dragonfly_model_types[] = {
{(rbev_trace_f) dragonfly_event_collect, {(ev_trace_f) dragonfly_event_collect,
sizeof(int),
(ev_trace_f) dragonfly_event_collect,
sizeof(int), sizeof(int),
(model_stat_f) dragonfly_model_stat_collect, (model_stat_f) dragonfly_model_stat_collect,
sizeof(tw_lpid) + sizeof(long) * 2 + sizeof(double) + sizeof(tw_stime) * 2}, sizeof(tw_lpid) + sizeof(long) * 2 + sizeof(double) + sizeof(tw_stime) * 2},
{(rbev_trace_f) dragonfly_event_collect, {(ev_trace_f) dragonfly_event_collect,
sizeof(int),
(ev_trace_f) dragonfly_event_collect,
sizeof(int), sizeof(int),
(model_stat_f) dfly_router_model_stat_collect, (model_stat_f) dfly_router_model_stat_collect,
0}, // updated in router_setup() 0}, // updated in router_setup()
...@@ -33,20 +30,17 @@ st_model_types dragonfly_model_types[] = { ...@@ -33,20 +30,17 @@ st_model_types dragonfly_model_types[] = {
} }
``` ```
`dragonfly_model_types[0]` is the function pointers for the terminal LP and `dragonfly_model_types[1]` is for the router LP. `dragonfly_model_types[0]` is the function pointers for the terminal LP and `dragonfly_model_types[1]` is for the router LP.
For the first two function pointers for each LP, we use the same `dragonfly_event_collec()` because right now we just collect the event type, so For the first function pointer for each LP type, we use the same `dragonfly_event_collect()` because right now we just collect the event type, so it's the same for both of these LP types.
it's the same for both of these LPs. You can change these if you want to use different functions for different LP types or if you want a different You can change these if you want to use different functions for different LP types.
function for the full event tracing than that used for the rollback event trace (`rbev_trace_f` is for the event tracing of rollback triggering events only, The number following that function pointer is the size of the data that will be saved when the function is called.
while `ev_trace_f` is for the full event tracing). The second pointer is for the data to be sampled at the GVT or real time sampling points.
The number following each function pointer is the size of the data that will be saved when the function is called.
The third pointer is for the data to be sampled at the GVT or real time sampling points.
In this case the LPs have different function pointers since we want to collect different types of data for the two LP types. In this case the LPs have different function pointers since we want to collect different types of data for the two LP types.
For the terminal, I set the appropriate size of the data to be collected, but for the router, the size of the data is dependent on the radix for the For the terminal, I set the appropriate size of the data to be collected, but for the router, the size of the data is dependent on the radix for the dragonfly configuration being used, which isn't known until runtime.
dragonfly configuration being used, which isn't known until runtime.
*Note*: You can only reuse the function for event tracing for LPs that use the same type of message struct. *Note*: You can only reuse the function for event tracing for LPs that use the same type of message struct.
For example, the dragonfly terminal and router LPs both use the `terminal_message` struct, so they can For example, the dragonfly terminal and router LPs both use the `terminal_message` struct, so they can
use the same functions for event tracing. However the model net base LP uses the `model_net_wrap_msg` struct, so it gets its own event collection function and use the same functions for event tracing.
`st_trace_type` struct, in order to read the event type correctly from the model. However the model net base LP uses the `model_net_wrap_msg` struct, so it gets its own event collection function and `st_trace_type` struct, in order to read the event type correctly from the model.
In the ROSS instrumentation documentation, there are two methods provided for letting ROSS know about these `st_model_types` structs. In the ROSS instrumentation documentation, there are two methods provided for letting ROSS know about these `st_model_types` structs.
In CODES, this step is a little different, as `codes_mapping_setup()` calls `tw_lp_settype()`. In CODES, this step is a little different, as `codes_mapping_setup()` calls `tw_lp_settype()`.
...@@ -106,9 +100,7 @@ Using the synthetic workload LP for dragonfly as an example (`src/network-worklo ...@@ -106,9 +100,7 @@ Using the synthetic workload LP for dragonfly as an example (`src/network-worklo
In the main function, you call the register function *before* calling `codes_mapping_setup()`. In the main function, you call the register function *before* calling `codes_mapping_setup()`.
```C ```C
st_model_types svr_model_types[] = { st_model_types svr_model_types[] = {
{(rbev_trace_f) svr_event_collect, {(ev_trace_f) svr_event_collect,
sizeof(int),
(ev_trace_f) svr_event_collect,
sizeof(int), sizeof(int),
(model_stat_f) svr_model_stat_collect, (model_stat_f) svr_model_stat_collect,
0}, // at the moment, we're not actually collecting any data about this LP 0}, // at the moment, we're not actually collecting any data about this LP
...@@ -143,10 +135,13 @@ modes are collecting model-level data as well. ...@@ -143,10 +135,13 @@ modes are collecting model-level data as well.
### CODES LPs that currently have event type collection implemented: ### CODES LPs that currently have event type collection implemented:
If you're using any of the following CODES models, you don't have to add anything, unless you want to change the data that's being collected. If you're using any of the following CODES models, you don't have to add anything, unless you want to change the data that's being collected.
- nw-lp (model-net-mpi-replay.c) - nw-lp (model-net-mpi-replay.c)
- original dragonfly router and terminal LPs (dragonfly.c)
- dfly server LP (model-net-synthetic.c) - dfly server LP (model-net-synthetic.c)
- model-net-base-lp (model-net-lp.c) - custom dfly server LP (model-net-synthetic-custom-dfly.c)
- fat tree server LP (model-net-synthetic-fattree.c) - fat tree server LP (model-net-synthetic-fattree.c)
- slimfly server LP (model-net-synthetic-slimfly.c)
- original dragonfly router and terminal LPs (dragonfly.c)
- dragonfly custom router and terminal LPs (dragonfly-custom.C)
- slimfly router and terminal LPs (slimfly.c)
- fat tree switch and terminal LPs (fat-tree.c)
- model-net-base-lp (model-net-lp.c)
The fat-tree terminal and switch LPs (fattree.c) are only partially implemented at the moment. It needs two `model_net_method` structs to fully implement,
but currently both terminal and switch LPs use the same `fattree_method` struct.
...@@ -61,7 +61,7 @@ struct iolang_params ...@@ -61,7 +61,7 @@ struct iolang_params
struct darshan_params struct darshan_params
{ {
char log_file_path[MAX_NAME_LENGTH_WKLD]; char log_file_path[MAX_NAME_LENGTH_WKLD];
int64_t aggregator_cnt; int app_cnt;
}; };
struct recorder_params struct recorder_params
...@@ -155,7 +155,24 @@ enum codes_workload_op_type ...@@ -155,7 +155,24 @@ enum codes_workload_op_type
/* for workloads that have events not yet handled /* for workloads that have events not yet handled
* (eg the workload language) */ * (eg the workload language) */
CODES_WK_IGNORE CODES_WK_IGNORE,
/* extended IO workload operations: MPI */
/* open */
CODES_WK_MPI_OPEN,
/* close */
CODES_WK_MPI_CLOSE,
/* write */
CODES_WK_MPI_WRITE,
/* read */
CODES_WK_MPI_READ,
/* collective open */
CODES_WK_MPI_COLL_OPEN,
/* collective_write */
CODES_WK_MPI_COLL_WRITE,
/* collective_read */
CODES_WK_MPI_COLL_READ,
}; };
/* I/O operation paramaters */ /* I/O operation paramaters */
...@@ -166,7 +183,7 @@ struct codes_workload_op ...@@ -166,7 +183,7 @@ struct codes_workload_op
*/ */
/* what type of operation this is */ /* what type of operation this is */
int op_type; enum codes_workload_op_type op_type;
/* currently only used by network workloads */ /* currently only used by network workloads */
double start_time; double start_time;
double end_time; double end_time;
...@@ -329,6 +346,11 @@ void codes_workload_print_op( ...@@ -329,6 +346,11 @@ void codes_workload_print_op(
int app_id, int app_id,
int rank); int rank);
int codes_workload_get_time(const char *type,
const char * params,
int app_id,
int rank, double *read_time, double *write_time, int64_t *read_bytes, int64_t *written_bytes);
/* implementation structure */ /* implementation structure */
struct codes_workload_method struct codes_workload_method
{ {
...@@ -341,6 +363,8 @@ struct codes_workload_method ...@@ -341,6 +363,8 @@ struct codes_workload_method
void (*codes_workload_get_next_rc2)(int app_id, int rank); void (*codes_workload_get_next_rc2)(int app_id, int rank);
int (*codes_workload_get_rank_cnt)(const char* params, int app_id); int (*codes_workload_get_rank_cnt)(const char* params, int app_id);
int (*codes_workload_finalize)(const char* params, int app_id, int rank); int (*codes_workload_finalize)(const char* params, int app_id, int rank);
/* added for get all read or write time */
int (*codes_workload_get_time)(const char * params, int app_id, int rank, double *read_time, double *write_time, int64_t *read_bytes, int64_t *written_bytes);
}; };
......
...@@ -85,6 +85,8 @@ struct terminal_custom_message ...@@ -85,6 +85,8 @@ struct terminal_custom_message
tw_stime saved_total_time; tw_stime saved_total_time;
tw_stime saved_sample_time; tw_stime saved_sample_time;
tw_stime msg_start_time; tw_stime msg_start_time;
tw_stime saved_busy_time_ross;
tw_stime saved_fin_chunks_ross;
}; };
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -2653,8 +2653,6 @@ static void nw_add_lp_type() ...@@ -2653,8 +2653,6 @@ static void nw_add_lp_type()
} }
/* setup for the ROSS event tracing /* setup for the ROSS event tracing
* can have a different function for rbev_trace_f and ev_trace_f
* but right now it is set to the same function for both
*/ */
void nw_lp_event_collect(nw_message *m, tw_lp *lp, char *buffer, int *collect_flag) void nw_lp_event_collect(nw_message *m, tw_lp *lp, char *buffer, int *collect_flag)
{ {
...@@ -2679,13 +2677,14 @@ void nw_lp_model_stat_collect(nw_state *s, tw_lp *lp, char *buffer) ...@@ -2679,13 +2677,14 @@ void nw_lp_model_stat_collect(nw_state *s, tw_lp *lp, char *buffer)
} }
st_model_types nw_lp_model_types[] = { st_model_types nw_lp_model_types[] = {
{(rbev_trace_f) nw_lp_event_collect, {(ev_trace_f) nw_lp_event_collect,
sizeof(int),
(ev_trace_f) nw_lp_event_collect,
sizeof(int), sizeof(int),
(model_stat_f) nw_lp_model_stat_collect, (model_stat_f) nw_lp_model_stat_collect,
0,
NULL,
NULL,
0}, 0},
{NULL, 0, NULL, 0, NULL, 0} {NULL, 0, NULL, 0, NULL, NULL, 0}
}; };
static const st_model_types *nw_lp_get_model_stat_types(void) static const st_model_types *nw_lp_get_model_stat_types(void)
...@@ -2811,7 +2810,7 @@ int modelnet_mpi_replay(MPI_Comm comm, int* argc, char*** argv ) ...@@ -2811,7 +2810,7 @@ int modelnet_mpi_replay(MPI_Comm comm, int* argc, char*** argv )
nw_add_lp_type(); nw_add_lp_type();
model_net_register(); model_net_register();
if (g_st_ev_trace || g_st_model_stats) if (g_st_ev_trace || g_st_model_stats || g_st_use_analysis_lps)
nw_lp_register_model(); nw_lp_register_model();
net_ids = model_net_configure(&num_nets); net_ids = model_net_configure(&num_nets);
......
...@@ -111,6 +111,49 @@ tw_lptype svr_lp = { ...@@ -111,6 +111,49 @@ tw_lptype svr_lp = {
sizeof(svr_state), sizeof(svr_state),
}; };
/* setup for the ROSS event tracing
*/
void custom_svr_event_collect(svr_msg *m, tw_lp *lp, char *buffer, int *collect_flag)
{
(void)lp;
(void)collect_flag;
int type = (int) m->svr_event_type;
memcpy(buffer, &type, sizeof(type));
}
/* can add in any model level data to be collected along with simulation engine data
* in the ROSS instrumentation. Will need to update the last field in
* svr_model_types[0] for the size of the data to save in each function call
*/
void custom_svr_model_stat_collect(svr_state *s, tw_lp *lp, char *buffer)
{
(void)s;
(void)lp;
(void)buffer;
return;
}
st_model_types custom_svr_model_types[] = {
{(ev_trace_f) custom_svr_event_collect,
sizeof(int),
(model_stat_f) custom_svr_model_stat_collect,
0,
NULL,
NULL,
0},
{NULL, 0, NULL, 0, NULL, NULL, 0}
};
static const st_model_types *custom_svr_get_model_stat_types(void)
{
return(&custom_svr_model_types[0]);
}
void custom_svr_register_model_types()
{
st_model_type_register("nw-lp", custom_svr_get_model_stat_types());
}
const tw_optdef app_opt [] = const tw_optdef app_opt [] =
{ {
TWOPT_GROUP("Model net synthetic traffic " ), TWOPT_GROUP("Model net synthetic traffic " ),
...@@ -275,7 +318,7 @@ static void handle_kickoff_event( ...@@ -275,7 +318,7 @@ static void handle_kickoff_event(
// 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); // 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);
global_dest = codes_mapping_get_lpid_from_relative(local_dest, group_name, lp_type_name, NULL, 0); global_dest = codes_mapping_get_lpid_from_relative(local_dest, group_name, lp_type_name, NULL, 0);
ns->msg_sent_count++; ns->msg_sent_count++;
model_net_event(net_id, "test", global_dest, PAYLOAD_SZ, 0.0, sizeof(svr_msg), (const void*)m_remote, sizeof(svr_msg), (const void*)m_local, lp); m->event_rc = model_net_event(net_id, "test", global_dest, PAYLOAD_SZ, 0.0, sizeof(svr_msg), (const void*)m_remote, sizeof(svr_msg), (const void*)m_local, lp);
issue_event(ns, lp); issue_event(ns, lp);
return; return;
...@@ -426,6 +469,9 @@ int main( ...@@ -426,6 +469,9 @@ int main(
model_net_register(); model_net_register();
svr_add_lp_type(); svr_add_lp_type();
if (g_st_ev_trace || g_st_model_stats || g_st_use_analysis_lps)
custom_svr_register_model_types();
codes_mapping_setup(); codes_mapping_setup();
net_ids = model_net_configure(&num_nets); net_ids = model_net_configure(&num_nets);
......
...@@ -123,8 +123,6 @@ tw_lptype svr_lp = { ...@@ -123,8 +123,6 @@ tw_lptype svr_lp = {
}; };
/* setup for the ROSS event tracing /* setup for the ROSS event tracing
* can have a different function for rbev_trace_f and ev_trace_f
* but right now it is set to the same function for both
*/ */
void ft_svr_event_collect(svr_msg *m, tw_lp *lp, char *buffer, int *collect_flag) void ft_svr_event_collect(svr_msg *m, tw_lp *lp, char *buffer, int *collect_flag)
{ {
...@@ -150,13 +148,14 @@ void ft_svr_model_stat_collect(svr_state *s, tw_lp *lp, char *buffer) ...@@ -150,13 +148,14 @@ void ft_svr_model_stat_collect(svr_state *s, tw_lp *lp, char *buffer)
} }
st_model_types ft_svr_model_types[] = { st_model_types ft_svr_model_types[] = {
{(rbev_trace_f) ft_svr_event_collect, {(ev_trace_f) ft_svr_event_collect,
sizeof(int),
(ev_trace_f) ft_svr_event_collect,
sizeof(int), sizeof(int),
(model_stat_f) ft_svr_model_stat_collect, (model_stat_f) ft_svr_model_stat_collect,
0,
NULL,
NULL,
0}, 0},
{NULL, 0, NULL, 0, NULL, 0} {NULL, 0, NULL, 0, NULL, NULL, 0}
}; };
static const st_model_types *ft_svr_get_model_stat_types(void) static const st_model_types *ft_svr_get_model_stat_types(void)
...@@ -308,7 +307,7 @@ static void handle_kickoff_event( ...@@ -308,7 +307,7 @@ static void handle_kickoff_event(
ns->msg_sent_count++; ns->msg_sent_count++;
model_net_event(net_id, "test", global_dest, PAYLOAD_SZ, 0.0, sizeof(svr_msg), (const void*)m_remote, sizeof(svr_msg), (const void*)m_local, lp); m->event_rc = model_net_event(net_id, "test", global_dest, PAYLOAD_SZ, 0.0, sizeof(svr_msg), (const void*)m_remote, sizeof(svr_msg), (const void*)m_local, lp);
//printf("LP:%d localID:%d Here\n",(int)lp->gid, (int)local_dest); //printf("LP:%d localID:%d Here\n",(int)lp->gid, (int)local_dest);
issue_event(ns, lp); issue_event(ns, lp);
...@@ -456,7 +455,7 @@ int main( ...@@ -456,7 +455,7 @@ int main(
svr_add_lp_type(); svr_add_lp_type();
if (g_st_ev_trace) if (g_st_ev_trace || g_st_model_stats || g_st_use_analysis_lps)
ft_svr_register_model_stats(); ft_svr_register_model_stats();
codes_mapping_setup(); codes_mapping_setup();
......
...@@ -120,6 +120,49 @@ tw_lptype svr_lp = { ...@@ -120,6 +120,49 @@ tw_lptype svr_lp = {
sizeof(svr_state), sizeof(svr_state),
}; };
/* setup for the ROSS event tracing
*/
void svr_event_collect(svr_msg *m, tw_lp *lp, char *buffer, int *collect_flag)
{
(void)lp;
(void)collect_flag;
int type = (int) m->svr_event_type;
memcpy(buffer, &type, sizeof(type));
}
/* can add in any model level data to be collected along with simulation engine data
* in the ROSS instrumentation. Will need to update the last field in
* svr_model_types[0] for the size of the data to save in each function call
*/
void svr_model_stat_collect(svr_state *s, tw_lp *lp, char *buffer)
{
(void)s;
(void)lp;
(void)buffer;
return;
}
st_model_types svr_model_types[] = {
{(ev_trace_f) svr_event_collect,
sizeof(int),
(model_stat_f) svr_model_stat_collect,
0,
NULL,
NULL,
0},
{NULL, 0, NULL, 0, NULL, NULL, 0}
};
static const st_model_types *svr_get_model_stat_types(void)
{
return(&svr_model_types[0]);
}
void svr_register_model_types()
{
st_model_type_register("server", svr_get_model_stat_types());
}
const tw_optdef app_opt [] = const tw_optdef app_opt [] =
{ {
TWOPT_GROUP("Model net synthetic traffic " ), TWOPT_GROUP("Model net synthetic traffic " ),
...@@ -327,7 +370,7 @@ static void handle_kickoff_event( ...@@ -327,7 +370,7 @@ static void handle_kickoff_event(
//printf("2local_dest:%d global_dest:%d num_nodes:%d\n", local_dest, global_dest, num_nodes); //printf("2local_dest:%d global_dest:%d num_nodes:%d\n", local_dest, global_dest, num_nodes);
ns->msg_sent_count++; ns->msg_sent_count++;
model_net_event(net_id, "test", global_dest, PAYLOAD_SZ, 0.0, sizeof(svr_msg), (const void*)m_remote, sizeof(svr_msg), (const void*)m_local, lp); m->event_rc = model_net_event(net_id, "test", global_dest, PAYLOAD_SZ, 0.0, sizeof(svr_msg), (const void*)m_remote, sizeof(svr_msg), (const void*)m_local, lp);
issue_event(ns, lp); issue_event(ns, lp);
return; return;
} }
...@@ -465,6 +508,10 @@ int main( ...@@ -465,6 +508,10 @@ int main(
configuration_load(argv[2], MPI_COMM_WORLD, &config); configuration_load(argv[2], MPI_COMM_WORLD, &config);
model_net_register(); model_net_register();
svr_add_lp_type(); svr_add_lp_type();
if (g_st_ev_trace || g_st_model_stats || g_st_use_analysis_lps)
svr_register_model_types();
codes_mapping_setup(); codes_mapping_setup();
net_ids = model_net_configure(&num_nets); net_ids = model_net_configure(&num_nets);
// assert(num_nets==1); // assert(num_nets==1);
......
...@@ -108,8 +108,6 @@ tw_lptype svr_lp = { ...@@ -108,8 +108,6 @@ tw_lptype svr_lp = {
}; };
/* setup for the ROSS event tracing /* setup for the ROSS event tracing
* can have a different function for rbev_trace_f and ev_trace_f
* but right now it is set to the same function for both
*/ */
void svr_event_collect(svr_msg *m, tw_lp *lp, char *buffer, int *collect_flag) void svr_event_collect(svr_msg *m, tw_lp *lp, char *buffer, int *collect_flag)
{ {
...@@ -132,13 +130,14 @@ void svr_model_stat_collect(svr_state *s, tw_lp *lp, char *buffer) ...@@ -132,13 +130,14 @@ void svr_model_stat_collect(svr_state *s, tw_lp *lp, char *buffer)
} }
st_model_types svr_model_types[] = { st_model_types svr_model_types[] = {
{(rbev_trace_f) svr_event_collect, {(ev_trace_f) svr_event_collect,
sizeof(int),
(ev_trace_f) svr_event_collect,
sizeof(int), sizeof(int),
(model_stat_f) svr_model_stat_collect, (model_stat_f) svr_model_stat_collect,
0,
NULL,
NULL,
0}, 0},
{NULL, 0, NULL, 0, NULL, 0} {NULL, 0, NULL, 0, NULL, NULL, 0}
}; };
static const st_model_types *svr_get_model_stat_types(void) static const st_model_types *svr_get_model_stat_types(void)
...@@ -274,7 +273,7 @@ static void handle_kickoff_event( ...@@ -274,7 +273,7 @@ static void handle_kickoff_event(
// 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); // 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);
global_dest = codes_mapping_get_lpid_from_relative(local_dest, group_name, lp_type_name, NULL, 0); global_dest = codes_mapping_get_lpid_from_relative(local_dest, group_name, lp_type_name, NULL, 0);
ns->msg_sent_count++; ns->msg_sent_count++;
model_net_event(net_id, "test", global_dest, PAYLOAD_SZ, 0.0, sizeof(svr_msg), (const void*)m_remote, sizeof(svr_msg), (const void*)m_local, lp); m->event_rc = model_net_event(net_id, "test", global_dest, PAYLOAD_SZ, 0.0, sizeof(svr_msg), (const void*)m_remote, sizeof(svr_msg), (const void*)m_local, lp);
issue_event(ns, lp); issue_event(ns, lp);
return; return;
...@@ -424,7 +423,7 @@ int main( ...@@ -424,7 +423,7 @@ int main(
model_net_register(); model_net_register();
svr_add_lp_type(); svr_add_lp_type();
if (g_st_ev_trace || g_st_model_stats) if (g_st_ev_trace || g_st_model_stats || g_st_use_analysis_lps)
svr_register_model_types(); svr_register_model_types();
codes_mapping_setup(); codes_mapping_setup();
......
...@@ -296,6 +296,14 @@ struct terminal_state ...@@ -296,6 +296,14 @@ struct terminal_state
/* for logging forward and reverse events */ /* for logging forward and reverse events */
long fwd_events; long fwd_events;
long rev_events; long rev_events;
/* following used for ROSS model-level stats collection */
long fin_chunks_ross_sample;
long data_size_ross_sample;
long fin_hops_ross_sample;
tw_stime fin_chunks_time_ross_sample;
tw_stime busy_time_ross_sample;
struct dfly_cn_sample ross_sample;
}; };
/* terminal event type (1-4) */