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
e4a1ce46
Commit
e4a1ce46
authored
Mar 05, 2018
by
Neil McGlohon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dragonfly Plus Workload: Add new Traffic Pattern
parent
33e9acd8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
18 deletions
+43
-18
src/network-workloads/model-net-synthetic-dfly-plus.c
src/network-workloads/model-net-synthetic-dfly-plus.c
+43
-18
No files found.
src/network-workloads/model-net-synthetic-dfly-plus.c
View file @
e4a1ce46
...
...
@@ -59,7 +59,8 @@ enum TRAFFIC
{
UNIFORM
=
1
,
/* sends message to a randomly selected node */
NEAREST_GROUP
=
2
,
/* sends message to the node connected to the neighboring router */
NEAREST_NEIGHBOR
=
3
/* sends message to the next node (potentially connected to the same router) */
NEAREST_NEIGHBOR
=
3
,
/* sends message to the next node (potentially connected to the same router) */
RANDOM_OTHER_GROUP
=
4
};
struct
svr_state
...
...
@@ -174,6 +175,11 @@ static void handle_kickoff_rev_event(
if
(
b
->
c1
)
tw_rand_reverse_unif
(
lp
->
rng
);
if
(
traffic
==
RANDOM_OTHER_GROUP
)
{
tw_rand_reverse_unif
(
lp
->
rng
);
tw_rand_reverse_unif
(
lp
->
rng
);
}
model_net_event_rc2
(
lp
,
&
m
->
event_rc
);
ns
->
msg_sent_count
--
;
tw_rand_reverse_unif
(
lp
->
rng
);
...
...
@@ -209,23 +215,42 @@ static void handle_kickoff_event(
codes_mapping_get_lp_info
(
lp
->
gid
,
group_name
,
&
group_index
,
lp_type_name
,
&
lp_type_index
,
anno
,
&
rep_id
,
&
offset
);
int
local_id
=
codes_mapping_get_lp_relative_id
(
lp
->
gid
,
0
,
0
);
/* in case of uniform random traffic, send to a random destination. */
if
(
traffic
==
UNIFORM
)
{
b
->
c1
=
1
;
local_dest
=
tw_rand_integer
(
lp
->
rng
,
0
,
num_nodes
-
1
);
}
else
if
(
traffic
==
NEAREST_GROUP
)
{
local_dest
=
(
local_id
+
num_nodes_per_grp
)
%
num_nodes
;
//printf("\n LP %ld sending to %ld num nodes %d ", local_id, local_dest, num_nodes);
}
else
if
(
traffic
==
NEAREST_NEIGHBOR
)
{
local_dest
=
(
local_id
+
1
)
%
num_nodes
;
// printf("\n LP %ld sending to %ld num nodes %d ", rep_id * 2 + offset, local_dest, num_nodes);
}
assert
(
local_dest
<
num_nodes
);
/* in case of uniform random traffic, send to a random destination. */
if
(
traffic
==
UNIFORM
)
{
b
->
c1
=
1
;
local_dest
=
tw_rand_integer
(
lp
->
rng
,
0
,
num_nodes
-
1
);
}
else
if
(
traffic
==
NEAREST_GROUP
)
{
local_dest
=
(
local_id
+
num_nodes_per_grp
)
%
num_nodes
;
//printf("\n LP %ld sending to %ld num nodes %d ", local_id, local_dest, num_nodes);
}
else
if
(
traffic
==
NEAREST_NEIGHBOR
)
{
local_dest
=
(
local_id
+
1
)
%
num_nodes
;
// printf("\n LP %ld sending to %ld num nodes %d ", rep_id * 2 + offset, local_dest, num_nodes);
}
else
if
(
traffic
==
RANDOM_OTHER_GROUP
)
{
int
my_group_id
=
local_id
/
num_nodes_per_grp
;
int
other_groups
[
num_groups
-
1
];
int
added
=
0
;
for
(
int
i
=
0
;
i
<
num_groups
;
i
++
)
{
if
(
i
!=
my_group_id
){
other_groups
[
added
]
=
i
;
added
++
;
}
}
int
rand_group
=
other_groups
[
tw_rand_integer
(
lp
->
rng
,
0
,
added
-
1
)];
int
rand_node_intra_id
=
tw_rand_integer
(
lp
->
rng
,
0
,
num_nodes_per_grp
-
1
);
local_dest
=
(
rand_group
*
num_nodes_per_grp
)
+
rand_node_intra_id
;
// printf("\n LP %ld sending to %ld num nodes %d ", local_id, local_dest, num_nodes);
}
assert
(
local_dest
<
num_nodes
);
// codes_mapping_get_lp_id(group_name, lp_type_name, anno, 1, local_dest / num_servers_per_rep, local_dest % num_servers_per_rep, &global_dest);
global_dest
=
codes_mapping_get_lpid_from_relative
(
local_dest
,
group_name
,
lp_type_name
,
NULL
,
0
);
ns
->
msg_sent_count
++
;
...
...
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