Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
darshan
darshan
Commits
ed103a2a
Commit
ed103a2a
authored
Dec 08, 2015
by
Shane Snyder
Browse files
add base record concept to utilities
parent
05acb6d4
Changes
3
Hide whitespace changes
Inline
Side-by-side
darshan-util/darshan-analyzer.c
View file @
ed103a2a
...
...
@@ -68,7 +68,7 @@ int process_log(const char *fname, double *io_ratio, int *used_mpio, int *used_p
{
f_count
+=
1
;
if
(
psx_rec
.
rank
==
-
1
)
if
(
psx_rec
.
base_rec
.
rank
==
-
1
)
*
used_shared
=
1
;
else
*
used_fpp
=
1
;
...
...
darshan-util/darshan-parser.c
View file @
ed103a2a
...
...
@@ -654,7 +654,7 @@ void posix_accum_file(struct darshan_posix_file *pfile,
hfile
->
procs
+=
1
;
if
(
pfile
->
rank
==
-
1
)
if
(
pfile
->
base_rec
.
rank
==
-
1
)
{
hfile
->
slowest_time
=
pfile
->
fcounters
[
POSIX_F_SLOWEST_RANK_TIME
];
}
...
...
@@ -666,7 +666,7 @@ void posix_accum_file(struct darshan_posix_file *pfile,
pfile
->
fcounters
[
POSIX_F_WRITE_TIME
]));
}
if
(
pfile
->
rank
==
-
1
)
if
(
pfile
->
base_rec
.
rank
==
-
1
)
{
hfile
->
procs
=
nprocs
;
hfile
->
type
|=
FILETYPE_SHARED
;
...
...
@@ -1029,7 +1029,7 @@ void posix_accum_perf(struct darshan_posix_file *pfile,
* by_slowest: use slowest rank time from log data
* (most accurate but requires newer log version)
*/
if
(
pfile
->
rank
==
-
1
)
if
(
pfile
->
base_rec
.
rank
==
-
1
)
{
/* by_open */
if
(
pfile
->
fcounters
[
POSIX_F_CLOSE_TIMESTAMP
]
>
...
...
@@ -1080,11 +1080,12 @@ void posix_accum_perf(struct darshan_posix_file *pfile,
*/
else
{
pdata
->
rank_cumul_io_time
[
pfile
->
rank
]
+=
pdata
->
rank_cumul_io_time
[
pfile
->
base_rec
.
rank
]
+=
(
pfile
->
fcounters
[
POSIX_F_META_TIME
]
+
pfile
->
fcounters
[
POSIX_F_READ_TIME
]
+
pfile
->
fcounters
[
POSIX_F_WRITE_TIME
]);
pdata
->
rank_cumul_md_time
[
pfile
->
rank
]
+=
pfile
->
fcounters
[
POSIX_F_META_TIME
];
pdata
->
rank_cumul_md_time
[
pfile
->
base_rec
.
rank
]
+=
pfile
->
fcounters
[
POSIX_F_META_TIME
];
}
return
;
...
...
darshan-util/darshan-posix-logutils.c
View file @
ed103a2a
...
...
@@ -62,15 +62,15 @@ static int darshan_log_get_posix_file(darshan_fd fd, void* posix_buf,
if
(
fd
->
swap_flag
)
{
/* swap bytes if necessary */
DARSHAN_BSWAP64
(
&
file
->
f_
id
);
DARSHAN_BSWAP64
(
&
file
->
rank
);
DARSHAN_BSWAP64
(
&
file
->
base_rec
.
id
);
DARSHAN_BSWAP64
(
&
file
->
base_rec
.
rank
);
for
(
i
=
0
;
i
<
POSIX_NUM_INDICES
;
i
++
)
DARSHAN_BSWAP64
(
&
file
->
counters
[
i
]);
for
(
i
=
0
;
i
<
POSIX_F_NUM_INDICES
;
i
++
)
DARSHAN_BSWAP64
(
&
file
->
fcounters
[
i
]);
}
*
rec_id
=
file
->
f_
id
;
*
rec_id
=
file
->
base_rec
.
id
;
return
(
1
);
}
}
...
...
@@ -98,15 +98,17 @@ static void darshan_log_print_posix_file(void *file_rec, char *file_name,
for
(
i
=
0
;
i
<
POSIX_NUM_INDICES
;
i
++
)
{
DARSHAN_COUNTER_PRINT
(
darshan_module_names
[
DARSHAN_POSIX_MOD
],
posix_file_rec
->
rank
,
posix_file_rec
->
f_id
,
posix_counter_names
[
i
],
posix_file_rec
->
counters
[
i
],
file_name
,
mnt_pt
,
fs_type
);
posix_file_rec
->
base_rec
.
rank
,
posix_file_rec
->
base_rec
.
id
,
posix_counter_names
[
i
],
posix_file_rec
->
counters
[
i
],
file_name
,
mnt_pt
,
fs_type
);
}
for
(
i
=
0
;
i
<
POSIX_F_NUM_INDICES
;
i
++
)
{
DARSHAN_F_COUNTER_PRINT
(
darshan_module_names
[
DARSHAN_POSIX_MOD
],
posix_file_rec
->
rank
,
posix_file_rec
->
f_id
,
posix_f_counter_names
[
i
],
posix_file_rec
->
fcounters
[
i
],
file_name
,
mnt_pt
,
fs_type
);
posix_file_rec
->
base_rec
.
rank
,
posix_file_rec
->
base_rec
.
id
,
posix_f_counter_names
[
i
],
posix_file_rec
->
fcounters
[
i
],
file_name
,
mnt_pt
,
fs_type
);
}
return
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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