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
4f50e629
Commit
4f50e629
authored
Aug 22, 2016
by
Nikhil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fix: use the correct time stamps
Change-Id: I4aa8fb074b9142a0bc2a2311c158a356f12f79cb
parent
19782842
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
12 deletions
+23
-12
src/networks/model-net/fattree.c
src/networks/model-net/fattree.c
+23
-12
No files found.
src/networks/model-net/fattree.c
View file @
4f50e629
...
...
@@ -26,7 +26,7 @@
#define DEBUG_RC 0
//Data Collection Output Files
#define PARAMS_LOG
1
#define PARAMS_LOG
0
#define LP_CONFIG_NM (model_net_lp_config_names[FATTREE])
#define LP_METHOD_NM (model_net_method_names[FATTREE])
...
...
@@ -1238,10 +1238,22 @@ void ft_packet_send(ft_terminal_state * s, tw_bf * bf, fattree_message * msg,
return
;
}
// Each packet is broken into chunks and then sent over the channel
uint64_t
num_chunks
=
cur_entry
->
msg
.
packet_size
/
s
->
params
->
chunk_size
;
if
(
cur_entry
->
msg
.
packet_size
%
s
->
params
->
chunk_size
)
num_chunks
++
;
if
(
!
num_chunks
)
num_chunks
=
1
;
ts
=
g_tw_lookahead
+
+
g_tw_lookahead
*
tw_rand_unif
(
lp
->
rng
);
if
((
cur_entry
->
msg
.
packet_size
%
s
->
params
->
chunk_size
)
&&
(
cur_entry
->
msg
.
chunk_id
==
num_chunks
-
1
))
{
ts
+=
s
->
params
->
cn_delay
*
(
cur_entry
->
msg
.
packet_size
%
s
->
params
->
chunk_size
);
}
else
{
bf
->
c12
=
1
;
ts
+=
s
->
params
->
cn_delay
*
s
->
params
->
chunk_size
;
}
msg
->
saved_available_time
=
s
->
terminal_available_time
;
ts
=
g_tw_lookahead
+
s
->
params
->
cn_delay
*
cur_entry
->
msg
.
packet_size
+
g_tw_lookahead
*
tw_rand_unif
(
lp
->
rng
);
s
->
terminal_available_time
=
maxd
(
s
->
terminal_available_time
,
tw_now
(
lp
));
s
->
terminal_available_time
+=
ts
;
...
...
@@ -1267,13 +1279,6 @@ void ft_packet_send(ft_terminal_state * s, tw_bf * bf, fattree_message * msg,
//printf("[%d] pack send Send to %d\n", lp->gid, s->switch_lp);
tw_event_send
(
e
);
uint64_t
num_chunks
=
cur_entry
->
msg
.
packet_size
/
s
->
params
->
chunk_size
;
if
(
cur_entry
->
msg
.
packet_size
%
s
->
params
->
chunk_size
)
num_chunks
++
;
if
(
!
num_chunks
)
num_chunks
=
1
;
/* local completion message */
if
(
cur_entry
->
msg
.
chunk_id
==
num_chunks
-
1
&&
(
cur_entry
->
msg
.
local_event_size_bytes
>
0
))
{
...
...
@@ -1513,7 +1518,13 @@ void switch_packet_send( switch_state * s, tw_bf * bf, fattree_message * msg,
if
(
!
num_chunks
)
num_chunks
=
1
;
double
bytetime
=
delay
;
double
bytetime
;
if
((
cur_entry
->
msg
.
packet_size
%
s
->
params
->
chunk_size
)
&&
(
cur_entry
->
msg
.
chunk_id
==
num_chunks
-
1
))
{
bytetime
=
delay
*
(
cur_entry
->
msg
.
packet_size
%
s
->
params
->
chunk_size
);
}
else
{
bf
->
c12
=
1
;
bytetime
=
delay
*
s
->
params
->
chunk_size
;
}
ts
=
g_tw_lookahead
+
g_tw_lookahead
*
tw_rand_unif
(
lp
->
rng
)
+
bytetime
+
s
->
params
->
router_delay
;
msg
->
saved_available_time
=
s
->
next_output_available_time
[
output_port
];
...
...
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