Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
darshan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
61
Issues
61
List
Boards
Labels
Milestones
Merge Requests
6
Merge Requests
6
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
darshan
darshan
Commits
e5df8a50
Commit
e5df8a50
authored
Oct 13, 2016
by
Cong Xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address stripe_size=0 and stripe_count=0 bugs
Signed-off-by:
Cong Xu
<
cong.xu@intel.com
>
parent
ed28a4b2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
37 deletions
+46
-37
darshan-core.c
darshan-runtime/lib/darshan-core.c
+2
-1
darshan-dxlt.c
darshan-runtime/lib/darshan-dxlt.c
+17
-15
darshan-lustre.c
darshan-runtime/lib/darshan-lustre.c
+3
-1
darshan-dxlt-logutils.c
darshan-util/darshan-dxlt-logutils.c
+24
-20
No files found.
darshan-runtime/lib/darshan-core.c
View file @
e5df8a50
...
...
@@ -1445,7 +1445,8 @@ static int darshan_log_open_all(char *logfile_name, MPI_File *log_fh)
hints
=
__DARSHAN_LOG_HINTS
;
}
if
(
hints
&&
strlen
(
hints
)
>
0
)
/* DXLT */
if
(
hints
&&
strlen
(
hints
)
>
0
&&
!
getenv
(
"ENABLE_DXLT_IO_TRACE"
))
{
tok_str
=
strdup
(
hints
);
if
(
tok_str
)
...
...
darshan-runtime/lib/darshan-dxlt.c
View file @
e5df8a50
...
...
@@ -676,19 +676,20 @@ static void dxlt_posix_shutdown(
stripe_count = file_rec->stripe_count;
ost_ids = file_rec->ost_ids;
cur_offset = offset;
ost_idx = (offset / stripe_size) % stripe_count;
while (cur_offset < offset + length) {
printf(" [OST: %d]", file_rec->ost_ids[ost_idx]);
cur_offset = (cur_offset / stripe_size + 1) * stripe_size;
ost_idx = (ost_idx == stripe_count - 1) ? 0 : ost_idx + 1;
if (stripe_size != 0 && stripe_count != 0) {
cur_offset = offset;
ost_idx = (offset / stripe_size) % stripe_count;
while (cur_offset < offset + length) {
printf(" [OST: %d]", file_rec->ost_ids[ost_idx]);
cur_offset = (cur_offset / stripe_size + 1) * stripe_size;
ost_idx = (ost_idx == stripe_count - 1) ? 0 : ost_idx + 1;
}
}
printf("\n");
}
DARSHAN_MPI_CALL(PMPI_Barrier)(MPI_COMM_WORLD);
for (i = 0; i < file_rec->read_count; i++) {
rank = file_rec->base_rec.rank;
offset = file_rec->read_traces[i].offset;
...
...
@@ -702,13 +703,15 @@ static void dxlt_posix_shutdown(
stripe_count = file_rec->stripe_count;
ost_ids = file_rec->ost_ids;
cur_offset = offset;
ost_idx = (offset / stripe_size) % stripe_count;
if (stripe_size != 0 && stripe_count != 0) {
cur_offset = offset;
ost_idx = (offset / stripe_size) % stripe_count;
while (cur_offset < offset + length) {
printf(" [OST: %d]", file_rec->ost_ids[ost_idx]);
cur_offset = (cur_offset / stripe_size + 1) * stripe_size;
ost_idx = (ost_idx == stripe_count - 1) ? 0 : ost_idx + 1;
while (cur_offset < offset + length) {
printf(" [OST: %d]", file_rec->ost_ids[ost_idx]);
cur_offset = (cur_offset / stripe_size + 1) * stripe_size;
ost_idx = (ost_idx == stripe_count - 1) ? 0 : ost_idx + 1;
}
}
printf("\n");
...
...
@@ -831,7 +834,6 @@ static void dxlt_mpiio_shutdown(
printf("DXLT, rank %d writes segment %lld [offset: %lld length: %lld start_time: %fs end_time: %fs]\n", rank, i, offset, length, start_time, end_time);
}
DARSHAN_MPI_CALL(PMPI_Barrier)(MPI_COMM_WORLD);
for (i = 0; i < file_rec->read_count; i++) {
rank = file_rec->base_rec.rank;
offset = file_rec->read_traces[i].offset;
...
...
darshan-runtime/lib/darshan-lustre.c
View file @
e5df8a50
...
...
@@ -187,7 +187,9 @@ void dxlt_get_lustre_stripe_info(
rec_ref
=
darshan_lookup_record_ref
(
lustre_runtime
->
record_id_hash
,
&
rec_id
,
sizeof
(
darshan_record_id
));
assert
(
rec_ref
);
if
(
!
rec_ref
)
{
return
;
}
file_rec
->
stripe_count
=
rec_ref
->
record
->
counters
[
LUSTRE_STRIPE_WIDTH
];
file_rec
->
stripe_size
=
rec_ref
->
record
->
counters
[
LUSTRE_STRIPE_SIZE
];
...
...
darshan-util/darshan-dxlt-logutils.c
View file @
e5df8a50
...
...
@@ -248,19 +248,21 @@ static void dxlt_log_print_posix_file(void *posix_file_rec, char *file_name,
printf
(
"%8s%8d%7s%9lld%16lld%13lld%12.4f%12.4f"
,
"POSIX"
,
rank
,
"write"
,
i
,
offset
,
length
,
start_time
,
end_time
);
cur_offset
=
offset
;
ost_idx
=
(
offset
/
stripe_size
)
%
stripe_count
;
if
(
stripe_count
!=
0
&&
stripe_size
!=
0
)
{
cur_offset
=
offset
;
ost_idx
=
(
offset
/
stripe_size
)
%
stripe_count
;
print_count
=
0
;
while
(
cur_offset
<
offset
+
length
)
{
printf
(
" [%3d]"
,
ost_ids
[
ost_idx
]);
print_count
=
0
;
while
(
cur_offset
<
offset
+
length
)
{
printf
(
" [%3d]"
,
ost_ids
[
ost_idx
]);
cur_offset
=
(
cur_offset
/
stripe_size
+
1
)
*
stripe_size
;
ost_idx
=
(
ost_idx
==
stripe_count
-
1
)
?
0
:
ost_idx
+
1
;
cur_offset
=
(
cur_offset
/
stripe_size
+
1
)
*
stripe_size
;
ost_idx
=
(
ost_idx
==
stripe_count
-
1
)
?
0
:
ost_idx
+
1
;
print_count
++
;
if
(
print_count
>=
stripe_count
)
break
;
print_count
++
;
if
(
print_count
>=
stripe_count
)
break
;
}
}
printf
(
"
\n
"
);
...
...
@@ -274,19 +276,21 @@ static void dxlt_log_print_posix_file(void *posix_file_rec, char *file_name,
printf
(
"%8s%8d%7s%9lld%16lld%13lld%12.4f%12.4f"
,
"POSIX"
,
rank
,
"read"
,
i
-
write_count
,
offset
,
length
,
start_time
,
end_time
);
cur_offset
=
offset
;
ost_idx
=
(
offset
/
stripe_size
)
%
stripe_count
;
if
(
stripe_count
!=
0
&&
stripe_size
!=
0
)
{
cur_offset
=
offset
;
ost_idx
=
(
offset
/
stripe_size
)
%
stripe_count
;
print_count
=
0
;
while
(
cur_offset
<
offset
+
length
)
{
printf
(
" [%3d]"
,
ost_ids
[
ost_idx
]);
print_count
=
0
;
while
(
cur_offset
<
offset
+
length
)
{
printf
(
" [%3d]"
,
ost_ids
[
ost_idx
]);
cur_offset
=
(
cur_offset
/
stripe_size
+
1
)
*
stripe_size
;
ost_idx
=
(
ost_idx
==
stripe_count
-
1
)
?
0
:
ost_idx
+
1
;
cur_offset
=
(
cur_offset
/
stripe_size
+
1
)
*
stripe_size
;
ost_idx
=
(
ost_idx
==
stripe_count
-
1
)
?
0
:
ost_idx
+
1
;
print_count
++
;
if
(
print_count
>=
stripe_count
)
break
;
print_count
++
;
if
(
print_count
>=
stripe_count
)
break
;
}
}
printf
(
"
\n
"
);
...
...
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