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
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Elsa Gonsiorowski
codes
Commits
36f05e5c
Commit
36f05e5c
authored
Mar 03, 2016
by
Misbah Mubarak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding back router count safety checks for dragonfly, they got lost during recent changes
parent
9aab39f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
src/networks/model-net/dragonfly.c
src/networks/model-net/dragonfly.c
+9
-0
No files found.
src/networks/model-net/dragonfly.c
View file @
36f05e5c
...
@@ -57,6 +57,7 @@ static double maxd(double a, double b) { return a < b ? b : a; }
...
@@ -57,6 +57,7 @@ static double maxd(double a, double b) { return a < b ? b : a; }
/* minimal and non-minimal packet counts for adaptive routing*/
/* minimal and non-minimal packet counts for adaptive routing*/
static
int
minimal_count
=
0
,
nonmin_count
=
0
;
static
int
minimal_count
=
0
,
nonmin_count
=
0
;
static
int
num_routers_per_mgrp
=
0
;
typedef
struct
dragonfly_param
dragonfly_param
;
typedef
struct
dragonfly_param
dragonfly_param
;
/* annotation-specific parameters (unannotated entry occurs at the
/* annotation-specific parameters (unannotated entry occurs at the
...
@@ -796,6 +797,14 @@ void router_setup(router_state * r, tw_lp * lp)
...
@@ -796,6 +797,14 @@ void router_setup(router_state * r, tw_lp * lp)
// shorthand
// shorthand
const
dragonfly_param
*
p
=
r
->
params
;
const
dragonfly_param
*
p
=
r
->
params
;
num_routers_per_mgrp
=
codes_mapping_get_lp_count
(
lp_group_name
,
1
,
"modelnet_dragonfly_router"
,
NULL
,
0
);
int
num_grp_reps
=
codes_mapping_get_group_reps
(
lp_group_name
);
if
(
p
->
total_routers
!=
num_grp_reps
*
num_routers_per_mgrp
)
tw_error
(
TW_LOC
,
"
\n
Config error: num_routers specified %d total routers computed in the network %d "
"does not match with repetitions * dragonfly_router %d "
,
p
->
num_routers
,
p
->
total_routers
,
num_grp_reps
*
num_routers_per_mgrp
);
r
->
router_id
=
mapping_rep_id
+
mapping_offset
;
r
->
router_id
=
mapping_rep_id
+
mapping_offset
;
r
->
group_id
=
r
->
router_id
/
p
->
num_routers
;
r
->
group_id
=
r
->
router_id
/
p
->
num_routers
;
...
...
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