Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Elsa Gonsiorowski
codes
Commits
0d4cd618
Commit
0d4cd618
authored
Aug 21, 2014
by
Shane Snyder
Browse files
Updated recorder to parse more barrier info
parent
2c2cf3d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/workload/codes-recorder-io-wrkld.c
View file @
0d4cd618
...
...
@@ -117,12 +117,21 @@ static int recorder_io_workload_load(const char *params, int rank)
size_t
len
;
ssize_t
ret_value
;
char
function_name
[
128
]
=
{
'\0'
};
double
last_end
=
0
.
0
;
while
((
ret_value
=
getline
(
&
line
,
&
len
,
trace_file
))
!=
-
1
)
{
struct
recorder_io_op
r_op
;
char
*
token
=
strtok
(
line
,
", "
);
char
*
token
=
strtok
(
line
,
",
\n
"
);
int
fd
;
r_op
.
start_time
=
atof
(
token
);
token
=
strtok
(
NULL
,
", "
);
if
(
!
strcmp
(
token
,
"BARRIER"
))
{
r_op
.
start_time
=
last_end
;
}
else
{
r_op
.
start_time
=
atof
(
token
);
token
=
strtok
(
NULL
,
", "
);
}
strcpy
(
function_name
,
token
);
if
(
!
strcmp
(
function_name
,
"open"
)
||
!
strcmp
(
function_name
,
"open64"
))
{
...
...
@@ -248,8 +257,7 @@ static int recorder_io_workload_load(const char *params, int rank)
r_op
.
codes_op
.
u
.
write
.
file_id
=
file
->
file_id
;
}
else
if
(
!
strcmp
(
function_name
,
"MPI_Barrier"
)
||
!
strcmp
(
function_name
,
"MPI_File_read_at_all"
)
||
!
strcmp
(
function_name
,
"MPI_File_write_at_all"
))
{
!
strcmp
(
function_name
,
"BARRIER"
))
{
r_op
.
codes_op
.
op_type
=
CODES_WK_BARRIER
;
r_op
.
codes_op
.
u
.
barrier
.
count
=
nprocs
;
...
...
@@ -262,6 +270,7 @@ static int recorder_io_workload_load(const char *params, int rank)
new
->
trace_ops
[
new
->
trace_list_ndx
++
]
=
r_op
;
if
(
new
->
trace_list_ndx
==
2048
)
break
;
last_end
=
r_op
.
end_time
;
}
fclose
(
trace_file
);
...
...
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