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
b2c58067
Commit
b2c58067
authored
Apr 18, 2014
by
Shane Snyder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add bglockless opt to mpi replay tool
parent
04e554e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
tests/workload/codes-workload-mpi-replay.c
tests/workload/codes-workload-mpi-replay.c
+12
-2
No files found.
tests/workload/codes-workload-mpi-replay.c
View file @
b2c58067
...
...
@@ -40,6 +40,7 @@ int hash_file_compare(void *key, struct qlist_head *link);
/* command line options */
static
int
opt_verbose
=
0
;
static
int
opt_noop
=
0
;
static
int
opt_lockless
=
0
;
/* hash table for storing file descriptors of opened files */
static
struct
qhash_table
*
fd_table
=
NULL
;
...
...
@@ -55,6 +56,7 @@ void usage(char *exename)
fprintf
(
stderr
,
"
\t
<workload_test_dir> : the directory to replay the workload I/O in
\n
"
);
fprintf
(
stderr
,
"
\n\t
[OPTIONS] includes:
\n
"
);
fprintf
(
stderr
,
"
\t\t
--noop : do not perform i/o
\n
"
);
fprintf
(
stderr
,
"
\t\t
--lockless : use bgq lockless file i/o optimization
\n
"
);
fprintf
(
stderr
,
"
\t\t
-v : verbose (output i/o details)
\n
"
);
exit
(
1
);
...
...
@@ -68,6 +70,7 @@ void parse_args(int argc, char **argv, char **conf_path, char **test_dir)
{
"conf"
,
1
,
NULL
,
'c'
},
{
"test-dir"
,
1
,
NULL
,
'd'
},
{
"noop"
,
0
,
NULL
,
'n'
},
{
"lockless"
,
0
,
NULL
,
'l'
},
{
"help"
,
0
,
NULL
,
0
},
{
0
,
0
,
0
,
0
}
};
...
...
@@ -89,6 +92,9 @@ void parse_args(int argc, char **argv, char **conf_path, char **test_dir)
case
'n'
:
opt_noop
=
1
;
break
;
case
'l'
:
opt_lockless
=
1
;
break
;
case
'c'
:
*
conf_path
=
optarg
;
break
;
...
...
@@ -293,7 +299,7 @@ int replay_workload_op(struct codes_workload_op replay_op, int rank, long long i
unsigned
int
secs
;
unsigned
int
usecs
;
int
open_flags
=
O_RDWR
;
char
file_name
[
50
];
char
file_name
[
2
50
];
int
fildes
;
struct
file_info
*
tmp_list
=
NULL
;
struct
qlist_head
*
hash_link
=
NULL
;
...
...
@@ -360,7 +366,11 @@ int replay_workload_op(struct codes_workload_op replay_op, int rank, long long i
open_flags
|=
O_CREAT
;
/* write the file hash to string to be used as the actual file name */
snprintf
(
file_name
,
sizeof
(
file_name
),
"%"
PRIu64
,
replay_op
.
u
.
open
.
file_id
);
if
(
!
opt_lockless
)
snprintf
(
file_name
,
sizeof
(
file_name
),
"%"
PRIu64
,
replay_op
.
u
.
open
.
file_id
);
else
snprintf
(
file_name
,
sizeof
(
file_name
),
"bglockless:%"
PRIu64
,
replay_op
.
u
.
open
.
file_id
);
/* perform the open operation */
fildes
=
open
(
file_name
,
open_flags
,
0666
);
...
...
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