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
334b14ae
Commit
334b14ae
authored
Jun 18, 2018
by
Misbah Mubarak
Browse files
changes to VC assignment and statistics recording
parent
80f4b79d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/networks/model-net/dragonfly-custom.C
View file @
334b14ae
...
...
@@ -366,7 +366,6 @@ struct router_state
int
*
cur_hist_num
;
char
output_buf
[
4096
];
char
output_buf2
[
4096
];
struct
dfly_router_sample
*
rsamples
;
...
...
@@ -2294,24 +2293,25 @@ void dragonfly_custom_router_final(router_state * s,
s
->
busy_time
[
d
]);
}
}
map
<
int
,
vector
<
bLink
>
>
&
curMap
=
interGroupLinks
[
s
->
router_id
];
map
<
int
,
vector
<
bLink
>
>::
iterator
it
=
curMap
.
begin
();
for
(;
it
!=
curMap
.
end
();
it
++
)
{
int
grp_id
=
it
->
first
;
int
dest_rtr_id
=
interGroupLinks
[
s
->
router_id
][
grp_id
][
0
].
dest
;
/* TODO: Works only for 1-D dragonfly right now. Make it functional
/* TODO: Works only for single global connections right now. Make it functional
* for a 2-D dragonfly. */
int
offset
=
interGroupLinks
[
s
->
router_id
][
grp_id
][
0
].
offset
;
written
+=
sprintf
(
s
->
output_buf
+
written
,
"
\n
%d %s %d %s %s %llu %lf"
,
s
->
router_id
,
"R"
,
dest_rtr_id
,
"R"
,
"G"
,
s
->
link_traffic
[
offset
],
s
->
busy_time
[
offset
]);
for
(
int
l
=
0
;
l
<
it
->
second
.
size
();
l
++
)
{
int
dest_rtr_id
=
it
->
second
[
l
].
dest
;
int
offset
=
it
->
second
[
l
].
offset
;
assert
(
offset
>=
0
&&
offset
<
p
->
num_global_channels
);
written
+=
sprintf
(
s
->
output_buf
+
written
,
"
\n
%d %s %d %s %s %llu %lf"
,
s
->
router_id
,
"R"
,
dest_rtr_id
,
"R"
,
"G"
,
s
->
link_traffic
[
offset
],
s
->
busy_time
[
offset
]);
}
}
sprintf
(
s
->
output_buf
+
written
,
"
\n
"
);
lp_io_write
(
lp
->
gid
,
(
char
*
)
"dragonfly-link-stats"
,
written
,
s
->
output_buf
);
...
...
@@ -3277,30 +3277,23 @@ router_packet_receive( router_state * s,
output_chan
=
0
;
if
(
output_port
<
s
->
params
->
intra_grp_radix
)
{
if
(
DF_DALLY
==
0
)
if
(
DF_DALLY
==
1
)
{
if
(
cur_chunk
->
msg
.
my_g_hop
==
1
)
{
if
(
cur_chunk
->
msg
.
my_l_hop
<
1
)
{
cur_chunk
->
msg
.
my_l_hop
=
1
;
}
output_chan
=
1
;
}
else
if
(
cur_chunk
->
msg
.
my_g_hop
==
2
)
{
if
(
cur_chunk
->
msg
.
my_l_hop
<
4
)
{
cur_chunk
->
msg
.
my_l_hop
=
4
;
}
output_chan
=
3
;
}
}
else
{
/*if(cur_chunk->msg.my_g_hop == 1) {
if(cur_chunk->msg.my_l_hop < 1){
cur_chunk->msg.my_l_hop = 1;
}
/* TODO: Recheck VC count after things are in order for a 2-D dragonfly. */
if
(
cur_chunk
->
msg
.
my_g_hop
==
1
)
{
output_chan
=
2
;
}
else*/
if
(
cur_chunk
->
msg
.
my_g_hop
==
2
)
{
if
(
cur_chunk
->
msg
.
my_l_hop
<
2
)
cur_chunk
->
msg
.
my_l_hop
=
2
;
else
if
(
cur_chunk
->
msg
.
my_g_hop
==
2
)
{
output_chan
=
6
;
}
}
output_chan
=
cur_chunk
->
msg
.
my_l_hop
;
max_vc_size
=
s
->
params
->
local_vc_size
;
cur_chunk
->
msg
.
my_l_hop
++
;
}
else
if
(
output_port
<
(
s
->
params
->
intra_grp_radix
+
...
...
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