Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
codes
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
38
Issues
38
List
Boards
Labels
Milestones
Merge Requests
8
Merge Requests
8
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
codes
codes
Commits
9950b0f8
Commit
9950b0f8
authored
Feb 09, 2018
by
Caitlin Ross
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updating ROSS inst support for fattree
parent
796e8dfa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
101 additions
and
28 deletions
+101
-28
src/networks/model-net/fattree.c
src/networks/model-net/fattree.c
+101
-28
No files found.
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_lps
[
1
]);
return
(
&
fattree_model_types
[
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
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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