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
Compare Revisions
master...dfp-output-id-fix
Source
dfp-output-id-fix
Select Git revision
...
Target
master
Select Git revision
Compare
Commits (1)
Fix DFP link stats ID miscalculation
· 73188f26
Neil McGlohon
authored
Feb 04, 2019
73188f26
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
20 deletions
+22
-20
src/networks/model-net/dragonfly-plus.C
src/networks/model-net/dragonfly-plus.C
+22
-20
No files found.
src/networks/model-net/dragonfly-plus.C
View file @
73188f26
...
@@ -2983,13 +2983,13 @@ void dragonfly_plus_terminal_final(terminal_state *s, tw_lp *lp)
...
@@ -2983,13 +2983,13 @@ void dragonfly_plus_terminal_final(terminal_state *s, tw_lp *lp)
lp_io_write
(
lp
->
gid
,
(
char
*
)
"dragonfly-plus-link-stats"
,
written
,
s
->
output_buf
);
lp_io_write
(
lp
->
gid
,
(
char
*
)
"dragonfly-plus-link-stats"
,
written
,
s
->
output_buf
);
if
(
s
->
terminal_id
==
0
)
{
//
if (s->terminal_id == 0) {
char
meta_filename
[
64
];
//
char meta_filename[64];
sprintf
(
meta_filename
,
"dragonfly-plus-cn-stats.meta"
);
//
sprintf(meta_filename, "dragonfly-plus-cn-stats.meta");
FILE
*
fp
=
fopen
(
meta_filename
,
"w+"
);
//
FILE * fp = fopen(meta_filename, "w+");
fprintf
(
fp
,
"# Format <LP id> <Terminal ID> <Total Data Size> <Avg packet latency> <# Flits/Packets finished> <Busy Time> <Max packet Latency> <Min packet Latency >
\n
"
);
//
fprintf(fp, "# Format <LP id> <Terminal ID> <Total Data Size> <Avg packet latency> <# Flits/Packets finished> <Busy Time> <Max packet Latency> <Min packet Latency >\n");
}
//
}
written
=
0
;
written
=
0
;
written
+=
sprintf
(
s
->
output_buf2
+
written
,
"%llu %llu %lf %lf %lf %lf %llu %lf
\n
"
,
written
+=
sprintf
(
s
->
output_buf2
+
written
,
"%llu %llu %lf %lf %lf %lf %llu %lf
\n
"
,
...
@@ -3084,24 +3084,25 @@ void dragonfly_plus_router_final(router_state *s, tw_lp *lp)
...
@@ -3084,24 +3084,25 @@ void dragonfly_plus_router_final(router_state *s, tw_lp *lp)
const
dragonfly_plus_param
*
p
=
s
->
params
;
const
dragonfly_plus_param
*
p
=
s
->
params
;
int
written
=
0
;
int
written
=
0
;
int
src_rel_id
=
s
->
router_id
%
p
->
num_routers
;
int
local_grp_id
=
s
->
router_id
/
p
->
num_routers
;
for
(
int
d
=
0
;
d
<
p
->
intra_grp_radix
;
d
++
)
vector
<
Connection
>
my_local_links
=
s
->
connMan
->
get_connections_by_type
(
CONN_LOCAL
);
for
(
vector
<
Connection
>::
iterator
it
=
my_local_links
.
begin
()
;
it
!=
my_local_links
.
end
();
it
++
)
{
{
if
(
d
!=
src_rel_id
)
{
int
dest_rtr_id
=
it
->
dest_gid
;
int
dest_ab_id
=
local_grp_id
*
p
->
num_routers
+
d
;
int
port_no
=
it
->
port
;
written
+=
sprintf
(
s
->
output_buf
+
written
,
"
\n
%d %s %d %s %s %llu %lf"
,
assert
(
port_no
>=
0
&&
port_no
<
p
->
radix
);
s
->
router_id
,
// Format <source_id> <source_type> <dest_id> < dest_type> <link_type> <link_traffic> <link_saturation>
"R"
,
written
+=
sprintf
(
s
->
output_buf
+
written
,
"
\n
%d %s %d %s %s %llu %lf"
,
dest_ab_id
,
s
->
router_id
,
"R"
,
"R"
,
"L"
,
dest_rtr_id
,
s
->
link_traffic
[
d
],
"R"
,
s
->
busy_time
[
d
]
);
"L"
,
}
s
->
link_traffic
[
port_no
],
s
->
busy_time
[
port_no
]
);
}
}
vector
<
Connection
>
my_global_links
=
s
->
connMan
->
get_connections_by_type
(
CONN_GLOBAL
);
vector
<
Connection
>
my_global_links
=
s
->
connMan
->
get_connections_by_type
(
CONN_GLOBAL
);
vector
<
Connection
>::
iterator
it
=
my_global_links
.
begin
();
vector
<
Connection
>::
iterator
it
=
my_global_links
.
begin
();
...
@@ -3110,6 +3111,7 @@ void dragonfly_plus_router_final(router_state *s, tw_lp *lp)
...
@@ -3110,6 +3111,7 @@ void dragonfly_plus_router_final(router_state *s, tw_lp *lp)
int
dest_rtr_id
=
it
->
dest_gid
;
int
dest_rtr_id
=
it
->
dest_gid
;
int
port_no
=
it
->
port
;
int
port_no
=
it
->
port
;
assert
(
port_no
>=
0
&&
port_no
<
p
->
radix
);
assert
(
port_no
>=
0
&&
port_no
<
p
->
radix
);
// Format <source_id> <source_type> <dest_id> < dest_type> <link_type> <link_traffic> <link_saturation>
written
+=
sprintf
(
s
->
output_buf
+
written
,
"
\n
%d %s %d %s %s %llu %lf"
,
written
+=
sprintf
(
s
->
output_buf
+
written
,
"
\n
%d %s %d %s %s %llu %lf"
,
s
->
router_id
,
s
->
router_id
,
"R"
,
"R"
,
...
...