Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Thomas Lavocat
yggdrasil
Commits
0885ddae
Commit
0885ddae
authored
Dec 08, 2017
by
Thomas Lavocat
Browse files
Log to understand bug on multiple forwarding
parent
21ff939c
Changes
1
Hide whitespace changes
Inline
Side-by-side
yggdrasil/erebor/ereborc.py
View file @
0885ddae
...
...
@@ -640,41 +640,6 @@ class Erebor:
self
.
propagate_dead_nodes
(
snode
,
snetid
,
error_nodes
)
# Is called when a trans network message arrive here
# Need to chose if the message has to be treated here or forwarded
def
trans_network_callback
(
self
,
message
,
rank_from
)
:
source
=
message
[
consts
.
FROM
]
destination
=
message
[
consts
.
DEST
]
logger
.
info
(
"a trans network message arrived "
+
source
+
" -> "
+
destination
)
package
=
message
[
consts
.
DATA
]
# source and destination are on the form number@networkId
snode
=
source
.
split
(
"@"
)[
0
]
snetwork
=
source
.
split
(
"@"
)[
1
]
dnode
=
destination
.
split
(
"@"
)[
0
]
dnetwork
=
destination
.
split
(
"@"
)[
1
]
# look if I am the right destination Erebor.
# -> destination need to match on of my network identifier
network
=
self
.
networks
.
get
(
dnetwork
)
# If I have a match, it means the package belong to one of my networks
if
network
!=
None
:
logger
.
debug
(
"local network routing {}"
.
format
(
dnode
))
# check my rank to see is i'm equivalent to dnode
if
network
.
state
==
consts
.
RUNING
:
dnode_list
=
self
.
helper
.
build_list
(
"["
+
dnode
.
replace
(
"/"
,
","
)
+
"]"
)
logger
.
debug
(
" node list {}"
.
format
(
dnode_list
))
# If I am the destination
if
network
.
rank
in
dnode_list
:
self
.
interpret_trans_network
(
package
,
network
,
rank_from
,
snode
,
snetwork
,
dnode
,
dnetwork
)
else
:
logger
.
debug
(
"not destination, forwarding"
)
self
.
send_trans_network_message_to
(
dnode
,
dnetwork
,
snode
,
snetwork
,
package
)
# Is called when a trans network message arrive here
# Need to chose if the message has to be treated here or forwarded
def
mpi_trans_network_callback
(
self
,
message
,
rank_from
)
:
...
...
@@ -732,18 +697,19 @@ class Erebor:
logger
.
info
(
"a trans network message arrived "
+
source
+
" -> "
+
destination
)
package
=
message
[
consts
.
DATA
]
#
source and destination are on the form number@networkId
logger
.
debug
(
"
source and destination are on the form number@networkId
"
)
snode
=
source
.
split
(
"@"
)[
0
]
snetwork
=
source
.
split
(
"@"
)[
1
]
dnode
=
destination
.
split
(
"@"
)[
0
]
dnetwork
=
destination
.
split
(
"@"
)[
1
]
#
look if I am the right destination Erebor.
#
-> destination need to match on of my network identifier
logger
.
debug
(
"
look if I am the right destination Erebor.
"
)
logger
.
debug
(
"
-> destination need to match on of my network identifier
"
)
network
=
self
.
networks
.
get
(
dnetwork
)
# If I have a match, it means the package belong to one of my networks
logger
.
debug
(
"dnetwork {}"
.
format
(
dnetwork
))
logger
.
debug
(
"If I have a match, it means the package belong to one of my networks"
)
if
network
!=
None
:
logger
.
debug
(
"local network routing {}"
.
format
(
dnode
))
#
check my rank to see is i'm equivalent to dnode
logger
.
debug
(
"local network routing
{}
{}"
.
format
(
dnode
,
network
.
ID
))
logger
.
debug
(
"
check my rank to see is i'm equivalent to dnode
"
)
if
network
.
state
==
consts
.
RUNING
:
dnode_list
=
self
.
helper
.
build_list
(
"["
+
dnode
.
replace
(
"/"
,
","
)
+
"]"
)
logger
.
debug
(
" node list {}"
.
format
(
dnode_list
))
...
...
Write
Preview
Supports
Markdown
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