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
b734e145
Commit
b734e145
authored
Oct 02, 2018
by
Misbah Mubarak
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'codes-ml-master' into 'master'
Dragonfly Plus: Bugfix and safety check See merge request
!61
parents
c2ba8ef7
55a9cbf2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
23 deletions
+33
-23
codes/connection-manager.h
codes/connection-manager.h
+30
-17
src/networks/model-net/dragonfly-plus.C
src/networks/model-net/dragonfly-plus.C
+3
-6
No files found.
codes/connection-manager.h
View file @
b734e145
...
...
@@ -255,22 +255,34 @@ void ConnectionManager::add_connection(int dest_gid, ConnectionType type)
switch
(
type
)
{
case
CONN_LOCAL
:
if
(
intraGroupConnections
.
size
()
<
_max_intra_ports
)
{
conn
.
port
=
this
->
get_used_ports_for
(
CONN_LOCAL
);
intraGroupConnections
[
conn
.
dest_lid
].
push_back
(
conn
);
_used_intra_ports
++
;
}
else
tw_error
(
TW_LOC
,
"Attempting to add too many local connections per router - exceeding configuration value: %d"
,
_max_intra_ports
);
break
;
case
CONN_GLOBAL
:
if
(
globalConnections
.
size
()
<
_max_inter_ports
)
{
conn
.
port
=
_max_intra_ports
+
this
->
get_used_ports_for
(
CONN_GLOBAL
);
globalConnections
[
conn
.
dest_gid
].
push_back
(
conn
);
_used_inter_ports
++
;
}
else
tw_error
(
TW_LOC
,
"Attempting to add too many global connections per router - exceeding configuration value: %d"
,
_max_inter_ports
);
break
;
case
CONN_TERMINAL
:
if
(
terminalConnections
.
size
()
<
_max_terminal_ports
){
conn
.
port
=
_max_intra_ports
+
_max_inter_ports
+
this
->
get_used_ports_for
(
CONN_TERMINAL
);
conn
.
dest_group_id
=
_source_group
;
terminalConnections
[
conn
.
dest_gid
].
push_back
(
conn
);
_used_terminal_ports
++
;
}
else
tw_error
(
TW_LOC
,
"Attempting to add too many terminal connections per router - exceeding configuration value: %d"
,
_max_terminal_ports
);
break
;
default:
...
...
@@ -534,18 +546,19 @@ void ConnectionManager::print_connections()
int
group_id
=
it
->
second
.
dest_group_id
;
int
id
,
gid
;
if
(
get_port_type
(
port_num
)
==
CONN_LOCAL
)
{
if
(
get_port_type
(
port_num
)
==
CONN_LOCAL
)
{
id
=
it
->
second
.
dest_lid
;
gid
=
it
->
second
.
dest_gid
;
printf
(
" %d -> (%d,%d) : %d
\n
"
,
port_num
,
id
,
gid
,
group_id
);
printf
(
" %d -> (%d,%d) : %d
- LOCAL
\n
"
,
port_num
,
id
,
gid
,
group_id
);
}
else
{
else
if
(
get_port_type
(
port_num
)
==
CONN_GLOBAL
)
{
id
=
it
->
second
.
dest_gid
;
printf
(
" %d -> %d : %d
\n
"
,
port_num
,
id
,
group_id
);
printf
(
" %d -> %d : %d - GLOBAL
\n
"
,
port_num
,
id
,
group_id
);
}
else
if
(
get_port_type
(
port_num
)
==
CONN_TERMINAL
)
{
id
=
it
->
second
.
dest_gid
;
printf
(
" %d -> %d : %d - TERMINAL
\n
"
,
port_num
,
id
,
group_id
);
}
ports_printed
++
;
...
...
src/networks/model-net/dragonfly-plus.C
View file @
b734e145
...
...
@@ -1134,18 +1134,15 @@ int dragonfly_plus_get_assigned_router_id(int terminal_id, const dragonfly_plus_
// currently supports symmetrical bipartite spine/leaf router configurations
// first half of routers in a given group are leafs which have terminals
// second half of routers in a given group are spines which have no terminals
int
num_groups
=
p
->
num_groups
;
// number of groups of routers in the network
int
num_routers
=
p
->
num_routers
;
// num routers per group
int
num_router_leaf
=
p
->
num_router_leaf
;
// num leaf routers per group
int
num_cn
=
p
->
num_cn
;
// num compute nodes per leaf router
int
num_cn_per_group
=
(
num_router_leaf
*
num_cn
);
int
group_id
=
terminal_id
/
(
num_router_leaf
*
num_cn
);
int
local_router_id
=
terminal_id
%
(
num_router_leaf
*
num_cn
)
/
num_router_leaf
;
int
group_id
=
terminal_id
/
num_cn_per_group
;
int
local_router_id
=
(
terminal_id
/
num_cn
)
%
num_router_leaf
;
int
router_id
=
(
group_id
*
num_routers
)
+
local_router_id
;
// printf("Terminal %d: assigned to group %d, local router id %d, global router id %d\n",terminal_id,
// group_id, local_router_id, router_id);
return
router_id
;
}
...
...
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