Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
codes
codes
Commits
9950b0f8
Commit
9950b0f8
authored
Feb 09, 2018
by
Caitlin Ross
Browse files
updating ROSS inst support for fattree
parent
796e8dfa
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/networks/model-net/fattree.c
View file @
9950b0f8
...
@@ -296,6 +296,42 @@ struct switch_state
...
@@ -296,6 +296,42 @@ struct switch_state
int
*
lft
;
int
*
lft
;
};
};
/* ROSS Instrumentation Support */
struct
fattree_sample
{
tw_lpid
lpid
;
};
void
fattree_event_collect
(
fattree_message
*
m
,
tw_lp
*
lp
,
char
*
buffer
,
int
*
collect_flag
);
void
fattree_model_stat_collect
(
ft_terminal_state
*
s
,
tw_lp
*
lp
,
char
*
buffer
);
static
void
ross_fattree_sample_fn
(
ft_terminal_state
*
s
,
tw_bf
*
bf
,
tw_lp
*
lp
,
struct
fattree_sample
*
sample
);
static
void
ross_fattree_sample_rc_fn
(
ft_terminal_state
*
s
,
tw_bf
*
bf
,
tw_lp
*
lp
,
struct
fattree_sample
*
sample
);
static
void
ross_fattree_ssample_fn
(
switch_state
*
s
,
tw_bf
*
bf
,
tw_lp
*
lp
,
struct
fattree_sample
*
sample
);
static
void
ross_fattree_ssample_rc_fn
(
switch_state
*
s
,
tw_bf
*
bf
,
tw_lp
*
lp
,
struct
fattree_sample
*
sample
);
st_model_types
fattree_model_types
[]
=
{
{(
rbev_trace_f
)
fattree_event_collect
,
sizeof
(
int
),
(
ev_trace_f
)
fattree_event_collect
,
sizeof
(
int
),
(
model_stat_f
)
fattree_model_stat_collect
,
0
,
// update when changing fattree_model_stat_collect
(
sample_event_f
)
ross_fattree_sample_fn
,
(
sample_revent_f
)
ross_fattree_sample_rc_fn
,
sizeof
(
struct
fattree_sample
)
}
,
{(
rbev_trace_f
)
fattree_event_collect
,
sizeof
(
int
),
(
ev_trace_f
)
fattree_event_collect
,
sizeof
(
int
),
(
model_stat_f
)
fattree_model_stat_collect
,
0
,
// update when changing fattree_model_stat_collect
(
sample_event_f
)
ross_fattree_ssample_fn
,
(
sample_revent_f
)
ross_fattree_ssample_rc_fn
,
sizeof
(
struct
fattree_sample
)
}
,
{
NULL
,
0
,
NULL
,
0
,
NULL
,
0
,
NULL
,
NULL
,
0
}
};
/* End of ROSS model stats collection */
static
tw_stime
fattree_total_time
=
0
;
static
tw_stime
fattree_total_time
=
0
;
static
tw_stime
fattree_max_latency
=
0
;
static
tw_stime
fattree_max_latency
=
0
;
//static tw_stime max_collective = 0;
//static tw_stime max_collective = 0;
...
@@ -2967,7 +3003,23 @@ tw_lptype fattree_lps[] =
...
@@ -2967,7 +3003,23 @@ tw_lptype fattree_lps[] =
{
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
0
},
{
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
0
},
};
};
/* For ROSS event tracing */
/* returns the fattree lp type for lp registration */
static
const
tw_lptype
*
fattree_get_cn_lp_type
(
void
)
{
return
(
&
fattree_lps
[
0
]);
}
/*static const tw_lptype* fattree_get_switch_lp_type(void)
{
return(&fattree_lps[1]);
} */
static
void
fattree_register
(
tw_lptype
*
base_type
)
{
lp_type_register
(
LP_CONFIG_NM
,
base_type
);
lp_type_register
(
"fattree_switch"
,
&
fattree_lps
[
1
]);
}
/* For ROSS Instrumentation */
void
fattree_event_collect
(
fattree_message
*
m
,
tw_lp
*
lp
,
char
*
buffer
,
int
*
collect_flag
)
void
fattree_event_collect
(
fattree_message
*
m
,
tw_lp
*
lp
,
char
*
buffer
,
int
*
collect_flag
)
{
{
(
void
)
lp
;
(
void
)
lp
;
...
@@ -2977,46 +3029,67 @@ void fattree_event_collect(fattree_message *m, tw_lp *lp, char *buffer, int *col
...
@@ -2977,46 +3029,67 @@ void fattree_event_collect(fattree_message *m, tw_lp *lp, char *buffer, int *col
memcpy
(
buffer
,
&
type
,
sizeof
(
type
));
memcpy
(
buffer
,
&
type
,
sizeof
(
type
));
}
}
// TODO will need to separate fattree_method into one for terminal and one for switch
void
fattree_model_stat_collect
(
ft_terminal_state
*
s
,
tw_lp
*
lp
,
char
*
buffer
)
// in order to use the ROSS model stats collection
{
st_model_types
fattree_model_types
[]
=
{
(
void
)
lp
;
{(
rbev_trace_f
)
fattree_event_collect
,
(
void
)
s
;
sizeof
(
int
),
(
void
)
buffer
;
(
ev_trace_f
)
fattree_event_collect
,
sizeof
(
int
),
NULL
,
0
},
{
NULL
,
0
,
NULL
,
0
,
NULL
,
0
}
};
static
const
st_model_types
*
fattree_get_model_stat_types
(
void
)
return
;
}
static
void
ross_fattree_sample_fn
(
ft_terminal_state
*
s
,
tw_bf
*
bf
,
tw_lp
*
lp
,
struct
fattree_sample
*
sample
)
{
{
return
(
&
fattree_model_types
[
0
]);
(
void
)
lp
;
(
void
)
bf
;
(
void
)
s
;
(
void
)
sample
;
return
;
}
}
static
void
fattree_
register_model_stats
(
st_model_types
*
base_typ
e
)
static
void
ross_
fattree_
sample_rc_fn
(
ft_terminal_state
*
s
,
tw_bf
*
bf
,
tw_lp
*
lp
,
struct
fattree_sample
*
sampl
e
)
{
{
st_model_type_register
(
LP_CONFIG_NM
,
base_type
);
(
void
)
lp
;
st_model_type_register
(
"fattree_switch"
,
&
fattree_model_types
[
0
]);
(
void
)
bf
;
//trace_type_register("fattree_switch", base_type);
(
void
)
s
;
(
void
)
sample
;
return
;
}
}
/*** END of ROSS event tracing additions */
/* returns the fattree lp type for lp registration */
static
void
ross_fattree_ssample_fn
(
switch_state
*
s
,
tw_bf
*
bf
,
tw_lp
*
lp
,
struct
fattree_sample
*
sample
)
static
const
tw_lptype
*
fattree_get_cn_lp_type
(
void
)
{
{
return
(
&
fattree_lps
[
0
]);
(
void
)
lp
;
(
void
)
bf
;
(
void
)
s
;
(
void
)
sample
;
return
;
}
}
/*static const tw_lptype* fattree_get_switch_lp_type(void)
static
void
ross_fattree_ssample_rc_fn
(
switch_state
*
s
,
tw_bf
*
bf
,
tw_lp
*
lp
,
struct
fattree_sample
*
sample
)
{
{
return(&fattree_lps[1]);
(
void
)
lp
;
} */
(
void
)
bf
;
(
void
)
s
;
(
void
)
sample
;
return
;
}
static
void
fattree_register
(
tw_lptype
*
base_type
)
{
static
const
st_model_types
*
fattree_get_model_stat_types
(
void
)
lp_type_register
(
LP_CONFIG_NM
,
base_type
);
{
lp_type_register
(
"fattree_switch"
,
&
fattree_lp
s
[
1
]);
return
(
&
fattree_model_type
s
[
0
]);
}
}
static
void
fattree_register_model_stats
(
st_model_types
*
base_type
)
{
st_model_type_register
(
LP_CONFIG_NM
,
base_type
);
st_model_type_register
(
"fattree_switch"
,
&
fattree_model_types
[
1
]);
}
/*** END of ROSS event tracing additions */
struct
model_net_method
fattree_method
=
struct
model_net_method
fattree_method
=
{
{
.
mn_configure
=
fattree_configure
,
.
mn_configure
=
fattree_configure
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment