Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
codes-dev
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xin Wang
codes-dev
Commits
0d807b5f
Commit
0d807b5f
authored
Jul 31, 2015
by
Jonathan Jenkins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify elapsed time to end upon CODES_WK_END
parent
281e4a95
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
src/models/network-workloads/model-net-mpi-wrklds.c
src/models/network-workloads/model-net-mpi-wrklds.c
+10
-11
No files found.
src/models/network-workloads/model-net-mpi-wrklds.c
View file @
0d807b5f
...
...
@@ -93,6 +93,7 @@ struct nw_state
unsigned
long
num_waitsome
;
/* time spent by the LP in executing the app trace*/
double
start_time
;
double
elapsed_time
;
/* time spent in compute operations */
...
...
@@ -1084,8 +1085,8 @@ void nw_test_init(nw_state* s, tw_lp* lp)
s
->
arrival_queue
=
queue_init
();
s
->
pending_recvs_queue
=
queue_init
();
/* clock starts
ticking
*/
s
->
elapsed
_time
=
tw_now
(
lp
);
/* clock starts
when the first event is processed
*/
s
->
start
_time
=
tw_now
(
lp
);
codes_issue_next_event
(
lp
);
return
;
...
...
@@ -1192,6 +1193,7 @@ static void get_next_mpi_operation(nw_state* s, tw_bf * bf, nw_message * m, tw_l
if
(
mpi_op
.
op_type
==
CODES_WK_END
)
{
s
->
elapsed_time
=
tw_now
(
lp
)
-
s
->
start_time
;
return
;
}
switch
(
mpi_op
.
op_type
)
...
...
@@ -1265,14 +1267,11 @@ void nw_test_finalize(nw_state* s, tw_lp* lp)
printQueue
(
lp
->
gid
,
s
->
arrival_queue
,
"isend"
);
}
double
total_time
=
tw_now
(
lp
)
-
s
->
elapsed_time
;
//assert(total_time >= s->compute_time);
if
(
total_time
-
s
->
compute_time
>
max_comm_time
)
max_comm_time
=
total_time
-
s
->
compute_time
;
if
(
s
->
elapsed_time
-
s
->
compute_time
>
max_comm_time
)
max_comm_time
=
s
->
elapsed_time
-
s
->
compute_time
;
if
(
total
_time
>
max_time
)
max_time
=
total
_time
;
if
(
s
->
elapsed
_time
>
max_time
)
max_time
=
s
->
elapsed
_time
;
if
(
s
->
wait_time
>
max_wait_time
)
max_wait_time
=
s
->
wait_time
;
...
...
@@ -1283,8 +1282,8 @@ void nw_test_finalize(nw_state* s, tw_lp* lp)
if
(
s
->
recv_time
>
max_recv_time
)
max_recv_time
=
s
->
recv_time
;
avg_time
+=
total
_time
;
avg_comm_time
+=
(
total_time
-
s
->
compute_time
);
avg_time
+=
s
->
elapsed
_time
;
avg_comm_time
+=
(
s
->
elapsed_time
-
s
->
compute_time
);
avg_wait_time
+=
s
->
wait_time
;
avg_send_time
+=
s
->
send_time
;
avg_recv_time
+=
s
->
recv_time
;
...
...
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