Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
codes
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
38
Issues
38
List
Boards
Labels
Milestones
Merge Requests
8
Merge Requests
8
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
codes
codes
Commits
9760caef
Commit
9760caef
authored
May 09, 2018
by
Misbah Mubarak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding local and remote packet statistics
parent
12903157
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
43 deletions
+52
-43
dragonfly-custom.C
src/networks/model-net/dragonfly-custom.C
+36
-42
dragonfly-plus.C
src/networks/model-net/dragonfly-plus.C
+16
-1
No files found.
src/networks/model-net/dragonfly-custom.C
View file @
9760caef
This diff is collapsed.
Click to expand it.
src/networks/model-net/dragonfly-plus.C
View file @
9760caef
...
...
@@ -109,6 +109,9 @@ static int router_magic_num = 0;
/* terminal magic number */
static
int
terminal_magic_num
=
0
;
static
long
num_local_packets
=
0
;
static
long
num_remote_packets
=
0
;
/* Hops within a group */
static
int
num_intra_nonmin_hops
=
4
;
static
int
num_intra_min_hops
=
2
;
...
...
@@ -849,6 +852,7 @@ void dragonfly_plus_report_stats()
tw_stime
avg_time
,
max_time
;
int
total_minimal_packets
,
total_nonmin_packets
;
long
total_gen
,
total_fin
;
long
total_local_packets
,
total_remote_packets
;
MPI_Reduce
(
&
total_hops
,
&
avg_hops
,
1
,
MPI_LONG_LONG
,
MPI_SUM
,
0
,
MPI_COMM_CODES
);
MPI_Reduce
(
&
N_finished_packets
,
&
total_finished_packets
,
1
,
MPI_LONG_LONG
,
MPI_SUM
,
0
,
MPI_COMM_CODES
);
...
...
@@ -860,6 +864,8 @@ void dragonfly_plus_report_stats()
MPI_Reduce
(
&
packet_gen
,
&
total_gen
,
1
,
MPI_LONG
,
MPI_SUM
,
0
,
MPI_COMM_CODES
);
MPI_Reduce
(
&
packet_fin
,
&
total_fin
,
1
,
MPI_LONG
,
MPI_SUM
,
0
,
MPI_COMM_CODES
);
MPI_Reduce
(
&
num_local_packets
,
&
total_local_packets
,
1
,
MPI_LONG
,
MPI_SUM
,
0
,
MPI_COMM_CODES
);
MPI_Reduce
(
&
num_remote_packets
,
&
total_remote_packets
,
1
,
MPI_LONG
,
MPI_SUM
,
0
,
MPI_COMM_CODES
);
if
(
isRoutingAdaptive
(
routing
))
{
MPI_Reduce
(
&
minimal_count
,
&
total_minimal_packets
,
1
,
MPI_INT
,
MPI_SUM
,
0
,
MPI_COMM_CODES
);
MPI_Reduce
(
&
nonmin_count
,
&
total_nonmin_packets
,
1
,
MPI_INT
,
MPI_SUM
,
0
,
MPI_COMM_CODES
);
...
...
@@ -877,7 +883,7 @@ void dragonfly_plus_report_stats()
printf
(
"
\n
ADAPTIVE ROUTING STATS: %d chunks routed minimally %d chunks routed non-minimally completed packets %lld
\n
"
,
total_minimal_packets
,
total_nonmin_packets
,
total_finished_chunks
);
}
printf
(
"
\n
Total packets generated: %ld; finished: %ld
\n
"
,
total_gen
,
total_fin
);
printf
(
"
\n
Total packets generated %ld finished %ld Locally routed %ld Remote (inter-group) %ld
\n
"
,
total_gen
,
total_fin
,
total_local_packets
,
total_remote_packets
);
}
return
;
}
...
...
@@ -1269,6 +1275,15 @@ static void packet_generate(terminal_state *s, tw_bf *bf, terminal_plus_message
uint64_t
num_chunks
=
msg
->
packet_size
/
p
->
chunk_size
;
double
cn_delay
=
s
->
params
->
cn_delay
;
int
dest_router_id
=
dragonfly_plus_get_assigned_router_id
(
msg
->
dfp_dest_terminal_id
,
s
->
params
);
int
dest_grp_id
=
dest_router_id
/
s
->
params
->
num_routers
;
int
src_grp_id
=
s
->
router_id
/
s
->
params
->
num_routers
;
if
(
src_grp_id
==
dest_grp_id
)
num_local_packets
++
;
else
num_remote_packets
++
;
if
(
msg
->
packet_size
<
s
->
params
->
chunk_size
)
num_chunks
++
;
...
...
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