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
66da80cc
Commit
66da80cc
authored
Mar 20, 2014
by
Shane Snyder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replay tool/darshan timing optimizations
parent
ec4c6370
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
32 deletions
+75
-32
src/workload/codes-darshan-io-wrkld.c
src/workload/codes-darshan-io-wrkld.c
+40
-32
tests/workload/codes-workload-mpi-replay.c
tests/workload/codes-workload-mpi-replay.c
+35
-0
No files found.
src/workload/codes-darshan-io-wrkld.c
View file @
66da80cc
This diff is collapsed.
Click to expand it.
tests/workload/codes-workload-mpi-replay.c
View file @
66da80cc
...
...
@@ -26,6 +26,8 @@
#define WORKLOAD_PRINT 1
#define WORKLOAD_DELAY_PCT 0.95
/* hash table entry for looking up file descriptor of a workload file id */
struct
file_info
{
...
...
@@ -193,6 +195,8 @@ int main(int argc, char *argv[])
int
workload_id
;
struct
codes_workload_op
next_op
;
long
long
int
replay_op_number
=
1
;
double
load_start
,
load_end
;
int
first_op
=
1
;
int
ret
=
0
;
/* parse command line args */
...
...
@@ -203,6 +207,9 @@ int main(int argc, char *argv[])
MPI_Comm_size
(
MPI_COMM_WORLD
,
&
nprocs
);
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
myrank
);
/* start workload load timer */
load_start
=
MPI_Wtime
();
/* change the working directory to be the test directory */
ret
=
chdir
(
replay_test_path
);
if
(
ret
<
0
)
...
...
@@ -239,14 +246,32 @@ int main(int argc, char *argv[])
goto
error_exit
;
}
/* loading is finished */
load_end
=
MPI_Wtime
();
/* replay loop */
while
(
1
)
{
/* get the next replay operation from the workload generator */
codes_workload_get_next
(
workload_id
,
myrank
,
&
next_op
);
/* subtract the load time from any initial delay to be fair */
if
(
first_op
&&
(
next_op
.
op_type
==
CODES_WK_DELAY
))
{
if
(
next_op
.
u
.
delay
.
seconds
>
(
load_end
-
load_start
))
next_op
.
u
.
delay
.
seconds
-=
(
load_end
-
load_start
);
else
continue
;
first_op
=
0
;
}
if
(
next_op
.
op_type
!=
CODES_WK_END
)
{
if
(
next_op
.
op_type
==
CODES_WK_DELAY
)
next_op
.
u
.
delay
.
seconds
*=
WORKLOAD_DELAY_PCT
;
/* replay the next workload operation */
ret
=
replay_workload_op
(
next_op
,
myrank
,
replay_op_number
++
);
if
(
ret
<
0
)
...
...
@@ -486,3 +511,13 @@ int hash_file_compare(void *key, struct qlist_head *link)
return
0
;
}
/*
* Local variables:
* c-indent-level: 4
* c-basic-offset: 4
* End:
*
* vim: ft=c ts=8 sts=4 sw=4 expandtab
*/
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