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
e481d3ec
Commit
e481d3ec
authored
Jun 01, 2018
by
Neil McGlohon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of xgitlab.cels.anl.gov:codes/codes
parents
aeb2cd91
296e38d1
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
238 additions
and
124 deletions
+238
-124
src/network-workloads/model-net-mpi-replay.c
src/network-workloads/model-net-mpi-replay.c
+2
-2
src/networks/model-net/dragonfly-custom.C
src/networks/model-net/dragonfly-custom.C
+171
-72
src/networks/model-net/model-net.c
src/networks/model-net/model-net.c
+2
-0
src/networks/model-net/net-template.C
src/networks/model-net/net-template.C
+62
-50
src/workload/methods/codes-dumpi-trace-nw-wrkld.c
src/workload/methods/codes-dumpi-trace-nw-wrkld.c
+1
-0
No files found.
src/network-workloads/model-net-mpi-replay.c
View file @
e481d3ec
...
...
@@ -1279,8 +1279,8 @@ static void codes_exec_comp_delay(
nw_message
*
msg
;
m
->
rc
.
saved_delay
=
s
->
compute_time
;
s
->
compute_time
+=
s_to_ns
(
mpi_op
->
u
.
delay
.
seconds
)
;
ts
=
s_to_ns
(
mpi_op
->
u
.
delay
.
seconds
)
;
s
->
compute_time
+=
mpi_op
->
u
.
delay
.
nsecs
;
ts
=
mpi_op
->
u
.
delay
.
nsecs
;
ts
+=
g_tw_lookahead
+
0
.
1
+
tw_rand_exponential
(
lp
->
rng
,
noise
);
assert
(
ts
>
0
);
...
...
src/networks/model-net/dragonfly-custom.C
View file @
e481d3ec
This diff is collapsed.
Click to expand it.
src/networks/model-net/model-net.c
View file @
e481d3ec
...
...
@@ -631,6 +631,8 @@ const tw_lptype* model_net_get_lp_type(int net_id)
const
st_model_types
*
model_net_get_model_stat_type
(
int
net_id
)
{
if
(
!
method_array
[
net_id
]
->
mn_get_model_stat_types
)
tw_error
(
TW_LOC
,
"mn_get_model_stat_types not defined for network model with net_id: %d
\n
"
,
net_id
);
return
method_array
[
net_id
]
->
mn_get_model_stat_types
();
}
...
...
src/networks/model-net/net-template.C
View file @
e481d3ec
...
...
@@ -726,8 +726,6 @@ static void packet_generate(terminal_state * s, tw_bf * bf, LOCAL_MSG_STRUCT * m
}
else
{
bf
->
c11
=
1
;
s
->
issueIdle
=
1
;
msg
->
saved_busy_time
=
s
->
last_buf_full
;
s
->
last_buf_full
=
tw_now
(
lp
);
}
if
(
s
->
in_send_loop
==
0
)
{
...
...
@@ -777,7 +775,6 @@ static void packet_generate_rc(terminal_state * s, tw_bf * bf, LOCAL_MSG_STRUCT
}
if
(
bf
->
c11
)
{
s
->
issueIdle
=
0
;
s
->
last_buf_full
=
msg
->
saved_busy_time
;
}
if
(
bf
->
c5
)
{
codes_local_latency_reverse
(
lp
);
...
...
@@ -801,24 +798,42 @@ static void packet_send(terminal_state * s, tw_bf * bf, LOCAL_MSG_STRUCT * msg,
tw_lpid
router_id
;
std
::
vector
<
VC_Entry
>
entries
;
bool
noEmptyVC
=
false
;
for
(
int
i
=
0
;
i
<
s
->
params
->
num_vcs
;
i
++
)
{
if
(
s
->
terminal_msgs
[
0
][
i
]
!=
NULL
&&
s
->
vc_occupancy
[
0
][
i
]
+
s
->
params
->
chunk_size
<=
s
->
params
->
cn_vc_size
)
{
VC_Entry
tmp
;
tmp
.
vc
=
i
;
tmp
.
entry
=
s
->
terminal_msgs
[
0
][
i
];
entries
.
push_back
(
tmp
);
if
(
s
->
terminal_msgs
[
0
][
i
]
!=
NULL
)
{
if
(
s
->
vc_occupancy
[
0
][
i
]
+
s
->
params
->
chunk_size
<=
s
->
params
->
cn_vc_size
)
{
VC_Entry
tmp
;
tmp
.
vc
=
i
;
tmp
.
entry
=
s
->
terminal_msgs
[
0
][
i
];
entries
.
push_back
(
tmp
);
}
else
{
noEmptyVC
=
true
;
}
}
}
if
(
entries
.
size
()
==
0
)
{
bf
->
c1
=
1
;
s
->
in_send_loop
=
0
;
msg
->
saved_busy_time
=
s
->
last_buf_full
;
s
->
last_buf_full
=
tw_now
(
lp
);
if
(
noEmptyVC
&&
!
s
->
last_buf_full
)
{
bf
->
c3
=
1
;
msg
->
saved_busy_time
=
s
->
last_buf_full
;
s
->
last_buf_full
=
tw_now
(
lp
);
}
return
;
}
if
(
s
->
last_buf_full
>
0
.
0
)
{
bf
->
c4
=
1
;
msg
->
saved_total_time
=
s
->
busy_time
;
msg
->
saved_busy_time
=
s
->
last_buf_full
;
msg
->
saved_sample_time
=
s
->
busy_time_sample
;
s
->
busy_time
+=
(
tw_now
(
lp
)
-
s
->
last_buf_full
);
s
->
busy_time_sample
+=
(
tw_now
(
lp
)
-
s
->
last_buf_full
);
s
->
last_buf_full
=
0
.
0
;
}
//CHANGE: randomly pick the VC to send on (by default only VC 0 is filed); can be changed.
int
pick
=
tw_rand_integer
(
lp
->
rng
,
0
,
entries
.
size
()
-
1
);
...
...
@@ -894,18 +909,6 @@ static void packet_send(terminal_state * s, tw_bf * bf, LOCAL_MSG_STRUCT * msg,
s
->
issueIdle
=
0
;
ts
+=
tw_rand_unif
(
lp
->
rng
);
model_net_method_idle_event
(
ts
,
0
,
lp
);
if
(
s
->
last_buf_full
>
0
.
0
)
{
bf
->
c6
=
1
;
msg
->
saved_total_time
=
s
->
busy_time
;
msg
->
saved_busy_time
=
s
->
last_buf_full
;
msg
->
saved_sample_time
=
s
->
busy_time_sample
;
s
->
busy_time
+=
(
tw_now
(
lp
)
-
s
->
last_buf_full
);
s
->
busy_time_sample
+=
(
tw_now
(
lp
)
-
s
->
last_buf_full
);
s
->
last_buf_full
=
0
.
0
;
}
}
return
;
}
...
...
@@ -915,9 +918,18 @@ static void packet_send_rc(terminal_state * s, tw_bf * bf, LOCAL_MSG_STRUCT * ms
{
if
(
bf
->
c1
)
{
s
->
in_send_loop
=
1
;
s
->
last_buf_full
=
msg
->
saved_busy_time
;
if
(
bf
->
c3
)
{
s
->
last_buf_full
=
msg
->
saved_busy_time
;
}
return
;
}
if
(
bf
->
c4
)
{
s
->
busy_time
=
msg
->
saved_total_time
;
s
->
last_buf_full
=
msg
->
saved_busy_time
;
s
->
busy_time_sample
=
msg
->
saved_sample_time
;
}
tw_rand_reverse_unif
(
lp
->
rng
);
tw_rand_reverse_unif
(
lp
->
rng
);
...
...
@@ -942,12 +954,6 @@ static void packet_send_rc(terminal_state * s, tw_bf * bf, LOCAL_MSG_STRUCT * ms
{
tw_rand_reverse_unif
(
lp
->
rng
);
s
->
issueIdle
=
1
;
if
(
bf
->
c6
)
{
s
->
busy_time
=
msg
->
saved_total_time
;
s
->
last_buf_full
=
msg
->
saved_busy_time
;
s
->
busy_time_sample
=
msg
->
saved_sample_time
;
}
}
return
;
}
...
...
@@ -1466,8 +1472,6 @@ router_packet_receive( router_state * s,
append_to_message_list
(
s
->
queued_msgs
[
next_port
],
s
->
queued_msgs_tail
[
next_port
],
next_vc
,
cur_chunk
);
s
->
queued_count
[
next_port
]
+=
s
->
params
->
chunk_size
;
msg
->
saved_busy_time
=
s
->
last_buf_full
[
next_port
];
s
->
last_buf_full
[
next_port
]
=
tw_now
(
lp
);
}
msg
->
saved_vc
=
next_port
;
...
...
@@ -1500,7 +1504,6 @@ static void router_packet_receive_rc(router_state * s,
message_list
*
tail
=
return_tail
(
s
->
queued_msgs
[
next_port
],
s
->
queued_msgs_tail
[
next_port
],
next_vc
);
s
->
queued_count
[
next_port
]
-=
s
->
params
->
chunk_size
;
s
->
last_buf_full
[
next_port
]
=
msg
->
saved_busy_time
;
delete_message_list
(
tail
);
}
}
...
...
@@ -1529,8 +1532,24 @@ router_packet_send( router_state * s,
if
(
entries
.
size
()
==
0
)
{
bf
->
c1
=
1
;
s
->
in_send_loop
[
output_port
]
=
0
;
if
(
!
s
->
queued_count
[
output_port
]
&&
!
s
->
last_buf_full
[
output_port
])
{
bf
->
c2
=
1
;
msg
->
saved_busy_time
=
s
->
last_buf_full
[
output_port
];
s
->
last_buf_full
[
output_port
]
=
tw_now
(
lp
);
}
return
;
}
if
(
s
->
last_buf_full
[
output_port
])
{
bf
->
c3
=
1
;
msg
->
saved_rcv_time
=
s
->
busy_time
[
output_port
];
msg
->
saved_busy_time
=
s
->
last_buf_full
[
output_port
];
msg
->
saved_sample_time
=
s
->
busy_time_sample
[
output_port
];
s
->
busy_time
[
output_port
]
+=
(
tw_now
(
lp
)
-
s
->
last_buf_full
[
output_port
]);
s
->
busy_time_sample
[
output_port
]
+=
(
tw_now
(
lp
)
-
s
->
last_buf_full
[
output_port
]);
s
->
last_buf_full
[
output_port
]
=
0
.
0
;
}
//CHANGE: no priorities among VCs; can be changed.
int
pick
=
tw_rand_integer
(
lp
->
rng
,
0
,
entries
.
size
()
-
1
);
...
...
@@ -1642,8 +1661,18 @@ static void router_packet_send_rc(router_state * s,
if
(
bf
->
c1
)
{
s
->
in_send_loop
[
output_port
]
=
1
;
if
(
bf
->
c2
)
{
s
->
last_buf_full
[
output_port
]
=
msg
->
saved_busy_time
;
}
return
;
}
if
(
bf
->
c3
)
{
s
->
busy_time
[
output_port
]
=
msg
->
saved_rcv_time
;
s
->
busy_time_sample
[
output_port
]
=
msg
->
saved_sample_time
;
s
->
last_buf_full
[
output_port
]
=
msg
->
saved_busy_time
;
}
tw_rand_reverse_unif
(
lp
->
rng
);
tw_rand_reverse_unif
(
lp
->
rng
);
...
...
@@ -1677,17 +1706,6 @@ static void router_buf_update(router_state * s, tw_bf * bf, LOCAL_MSG_STRUCT * m
int
output_chan
=
msg
->
output_chan
;
s
->
vc_occupancy
[
indx
][
output_chan
]
-=
s
->
params
->
chunk_size
;
if
(
s
->
last_buf_full
[
indx
])
{
bf
->
c3
=
1
;
msg
->
saved_rcv_time
=
s
->
busy_time
[
indx
];
msg
->
saved_busy_time
=
s
->
last_buf_full
[
indx
];
msg
->
saved_sample_time
=
s
->
busy_time_sample
[
indx
];
s
->
busy_time
[
indx
]
+=
(
tw_now
(
lp
)
-
s
->
last_buf_full
[
indx
]);
s
->
busy_time_sample
[
indx
]
+=
(
tw_now
(
lp
)
-
s
->
last_buf_full
[
indx
]);
s
->
last_buf_full
[
indx
]
=
0
.
0
;
}
int
max_vc_size
=
s
->
params
->
vc_size
;
if
(
indx
<
s
->
params
->
num_cn
)
{
max_vc_size
=
s
->
params
->
cn_vc_size
;
...
...
@@ -1729,12 +1747,6 @@ static void router_buf_update_rc(router_state * s,
int
indx
=
msg
->
vc_index
;
int
output_chan
=
msg
->
output_chan
;
s
->
vc_occupancy
[
indx
][
output_chan
]
+=
s
->
params
->
chunk_size
;
if
(
bf
->
c3
)
{
s
->
busy_time
[
indx
]
=
msg
->
saved_rcv_time
;
s
->
busy_time_sample
[
indx
]
=
msg
->
saved_sample_time
;
s
->
last_buf_full
[
indx
]
=
msg
->
saved_busy_time
;
}
if
(
bf
->
c1
)
{
message_list
*
head
=
return_tail
(
s
->
pending_msgs
[
indx
],
s
->
pending_msgs_tail
[
indx
],
output_chan
);
...
...
src/workload/methods/codes-dumpi-trace-nw-wrkld.c
View file @
e481d3ec
...
...
@@ -249,6 +249,7 @@ void update_compute_time(const dumpi_time* time, rank_mpi_context* my_ctx)
wrkld_per_rank
.
start_time
=
my_ctx
->
last_op_time
;
wrkld_per_rank
.
end_time
=
start
;
wrkld_per_rank
.
u
.
delay
.
seconds
=
(
start
-
my_ctx
->
last_op_time
)
/
1e9
;
wrkld_per_rank
.
u
.
delay
.
nsecs
=
(
start
-
my_ctx
->
last_op_time
);
dumpi_insert_next_op
(
my_ctx
->
dumpi_mpi_array
,
&
wrkld_per_rank
);
}
my_ctx
->
last_op_time
=
stop
;
...
...
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