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
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Elsa Gonsiorowski
codes
Commits
b5249590
Commit
b5249590
authored
May 13, 2016
by
Misbah Mubarak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolving some slimfly warnings
parent
642d84d5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
14 deletions
+13
-14
src/network-workloads/model-net-synthetic-slimfly.c
src/network-workloads/model-net-synthetic-slimfly.c
+6
-7
src/networks/model-net/slimfly.c
src/networks/model-net/slimfly.c
+7
-7
No files found.
src/network-workloads/model-net-synthetic-slimfly.c
View file @
b5249590
...
...
@@ -122,10 +122,10 @@ tw_lptype svr_lp = {
const
tw_optdef
app_opt
[]
=
{
TWOPT_GROUP
(
"Model net synthetic traffic "
),
TWOPT_UINT
(
"traffic"
,
traffic
,
"UNIFORM RANDOM=1, NEAREST NEIGHBOR=2 "
),
TWOPT_STIME
(
"arrival_time"
,
arrival_time
,
"INTER-ARRIVAL TIME"
),
TWOPT_UINT
(
"traffic"
,
traffic
,
"UNIFORM RANDOM=1, NEAREST NEIGHBOR=2 "
),
TWOPT_STIME
(
"arrival_time"
,
arrival_time
,
"INTER-ARRIVAL TIME"
),
TWOPT_STIME
(
"load"
,
load
,
"percentage of packet inter-arrival rate to simulate"
),
TWOPT_END
()
TWOPT_END
()
,
};
const
tw_lptype
*
svr_get_lp_type
()
...
...
@@ -156,7 +156,7 @@ static tw_stime bytes_to_ns(uint64_t bytes, double GB_p_s)
/** Latest implementation of function to return an array mapping each router with it's corresponding worst-case router pair
* @param[in/out] *worst_dest Router ID to send all messages to
*/
void
init_worst_case_mapping
(
int
*
worst_dest
)
void
init_worst_case_mapping
()
{
int
i
,
j
,
k
;
int
r1
,
r2
;
//Routers to be paired
...
...
@@ -197,7 +197,6 @@ static void issue_event(
* simulation
*/
const
char
*
anno
;
configuration_get_value_int
(
&
config
,
"PARAMS"
,
"packet_size"
,
NULL
,
&
this_packet_size
);
if
(
!
this_packet_size
)
{
this_packet_size
=
0
;
...
...
@@ -306,7 +305,7 @@ static void handle_kickoff_event(
// printf("\n LP %ld sending to %ld num nodes %d ", rep_id * 2 + offset, local_dest, num_nodes);
}
//printf("1local_dest:%d global_dest:%d num_nodes:%d\n", local_dest, global_dest, num_nodes);
assert
(
local_dest
<
num_nodes
);
assert
(
local_dest
<
(
tw_lpid
)
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
);
//printf("2local_dest:%d global_dest:%d num_nodes:%d\n", local_dest, global_dest, num_nodes);
...
...
@@ -485,7 +484,7 @@ int main(
if
(
traffic
==
WORST_CASE
)
{
worst_dest
=
(
int
*
)
calloc
(
total_routers
,
sizeof
(
int
));
init_worst_case_mapping
(
worst_dest
);
init_worst_case_mapping
();
#if PRINT_WORST_CASE_MATCH
int
l
;
for
(
l
=
0
;
l
<
total_routers
;
l
++
)
...
...
src/networks/model-net/slimfly.c
View file @
b5249590
...
...
@@ -621,7 +621,7 @@ static void slimfly_configure(){
num_params
=
anno_map
->
num_annos
+
(
anno_map
->
has_unanno_lp
>
0
);
all_params
=
malloc
(
num_params
*
sizeof
(
*
all_params
));
for
(
uint64_t
i
=
0
;
i
<
anno_map
->
num_annos
;
i
++
){
for
(
uint64_t
i
=
0
;
i
<
(
uint64_t
)
anno_map
->
num_annos
;
i
++
){
const
char
*
anno
=
anno_map
->
annotations
[
i
].
ptr
;
slimfly_read_config
(
anno
,
&
all_params
[
i
]);
}
...
...
@@ -671,7 +671,7 @@ static void slimfly_report_stats()
if
(
slimfly_results_log
==
NULL
)
tw_error
(
TW_LOC
,
"
\n
Failed to open slimfly results log file
\n
"
);
printf
(
"Printing Simulation Parameters/Results Log File
\n
"
);
fprintf
(
slimfly_results_log
,
"%10.3lf, %15.3lf, %11.3lf, %13.3d, %16.3d, %16.3d, %25.5f, %14.5f, "
,
(
float
)
avg_hops
/
total_finished_packets
,
avg_time
/
(
total_finished_packets
),
max_time
,
total_minimal_packets
,
total_nonmin_packets
,
total_finished_chunks
,
throughput_avg
*
100
,
throughput_avg2
);
fprintf
(
slimfly_results_log
,
"%10.3lf, %15.3lf, %11.3lf, %13.3d, %16.3d, %16.3
ll
d, %25.5f, %14.5f, "
,
(
float
)
avg_hops
/
total_finished_packets
,
avg_time
/
(
total_finished_packets
),
max_time
,
total_minimal_packets
,
total_nonmin_packets
,
total_finished_chunks
,
throughput_avg
*
100
,
throughput_avg2
);
fclose
(
slimfly_results_log
);
#endif
}
...
...
@@ -1037,7 +1037,7 @@ void slim_router_setup(router_state * r, tw_lp * lp)
}
// Loop over second subgraph source routers
for
(
rid_d
=
=
r
->
params
->
slim_total_routers
-
1
;
rid_d
>=
0
;
rid_d
--
)
for
(
rid_d
=
r
->
params
->
slim_total_routers
-
1
;
rid_d
>=
0
;
rid_d
--
)
{
// Decompose source and destination Router IDs into 3D subgraph coordinates (subgraph,i,j)
if
(
rid_d
>=
r
->
params
->
slim_total_routers
/
2
)
...
...
@@ -1513,12 +1513,12 @@ void slim_packet_send(terminal_state * s, tw_bf * bf, slim_terminal_message * ms
if
(
cur_entry
!=
NULL
&&
s
->
vc_occupancy
[
0
]
+
s
->
params
->
chunk_size
<=
s
->
params
->
cn_vc_size
)
{
bf
->
c3
=
1
;
slim_terminal_message
*
m
;
slim_terminal_message
*
m
_new
;
ts
=
g_tw_lookahead
+
s
->
params
->
cn_delay
+
tw_rand_unif
(
lp
->
rng
);
tw_event
*
e
=
model_net_method_event_new
(
lp
->
gid
,
ts
,
lp
,
SLIMFLY
,
(
void
**
)
&
m
,
NULL
);
m
->
type
=
T_SEND
;
m
->
magic
=
slim_terminal_magic_num
;
(
void
**
)
&
m
_new
,
NULL
);
m
_new
->
type
=
T_SEND
;
m
_new
->
magic
=
slim_terminal_magic_num
;
tw_event_send
(
e
);
}
else
...
...
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