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
Caitlin Ross
codes
Commits
a8df7743
Commit
a8df7743
authored
May 26, 2016
by
Misbah Mubarak
Browse files
Modifications to dragonfly, shouldn't be multiplying with chunk_size in a couple of places
parent
45455a04
Changes
1
Show whitespace changes
Inline
Side-by-side
src/networks/model-net/dragonfly.c
View file @
a8df7743
...
...
@@ -394,7 +394,7 @@ static tw_stime bytes_to_ns(uint64_t bytes, double GB_p_s)
/* bytes to GB */
time
=
((
double
)
bytes
)
/
(
1024
.
0
*
1024
.
0
*
1024
.
0
);
/*
M
B to s */
/*
Gi
B to s */
time
=
time
/
GB_p_s
;
/* s to ns */
time
=
time
*
1000
.
0
*
1000
.
0
*
1000
.
0
;
...
...
@@ -1124,7 +1124,7 @@ void packet_generate(terminal_state * s, tw_bf * bf, terminal_message * msg,
if
(
!
num_chunks
)
num_chunks
=
1
;
nic_ts
=
g_tw_lookahead
+
s
->
params
->
cn_delay
*
msg
->
packet_size
+
tw_rand_unif
(
lp
->
rng
);
nic_ts
=
g_tw_lookahead
+
s
->
params
->
cn_delay
+
tw_rand_unif
(
lp
->
rng
);
msg
->
packet_ID
=
lp
->
gid
+
g_tw_nlp
*
s
->
packet_counter
;
msg
->
my_N_hop
=
0
;
...
...
@@ -1465,7 +1465,7 @@ void packet_arrive(terminal_state * s, tw_bf * bf, terminal_message * msg,
if
(
hash_link
)
tmp
=
qhash_entry
(
hash_link
,
struct
dfly_qhash_entry
,
hash_link
);
u
nsigned
in
t
total_chunks
=
msg
->
total_size
/
s
->
params
->
chunk_size
;
u
int64_
t
total_chunks
=
msg
->
total_size
/
s
->
params
->
chunk_size
;
printf
(
"
\n
Msg total size %ld total chunks %lu "
,
msg
->
total_size
,
total_chunks
);
if
(
msg
->
total_size
%
s
->
params
->
chunk_size
)
...
...
@@ -2910,12 +2910,7 @@ router_packet_send( router_state * s,
if
(
!
num_chunks
)
num_chunks
=
1
;
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
{
bytetime
=
delay
*
s
->
params
->
chunk_size
;
}
double
bytetime
=
delay
;
ts
=
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