[Darshan-commits] [Git][darshan/darshan][master] clean up dxt print routines
Philip Carns
xgitlab at cels.anl.gov
Thu Feb 22 14:01:22 CST 2018
Philip Carns pushed to branch master at darshan / darshan
Commits:
43a2233e by Phil Carns at 2018-02-22T15:01:01-05:00
clean up dxt print routines
- resolve warnings
- make format more consistent
- - - - -
1 changed file:
- darshan-util/darshan-dxt-logutils.c
Changes:
=====================================
darshan-util/darshan-dxt-logutils.c
=====================================
--- a/darshan-util/darshan-dxt-logutils.c
+++ b/darshan-util/darshan-dxt-logutils.c
@@ -290,8 +290,8 @@ void dxt_log_print_posix_file(void *posix_file_rec, char *file_name,
}
printf("\n# DXT, file_id: %" PRIu64 ", file_name: %s\n", f_id, file_name);
- printf("# DXT, rank: %d, hostname: %s\n", rank, hostname);
- printf("# DXT, write_count: %d, read_count: %d\n",
+ printf("# DXT, rank: %" PRId64 ", hostname: %s\n", rank, hostname);
+ printf("# DXT, write_count: %" PRId64 ", read_count: %" PRId64 "\n",
write_count, read_count);
printf("# DXT, mnt_pt: %s, fs_type: %s\n", mnt_pt, fs_type);
@@ -304,7 +304,7 @@ void dxt_log_print_posix_file(void *posix_file_rec, char *file_name,
printf("# DXT, Lustre OST obdidx:");
for (i = 0; i < stripe_count; i++) {
- printf(" %d", (rec->ost_ids)[i]);
+ printf(" %" PRId64, (rec->ost_ids)[i]);
}
printf("\n");
}
@@ -324,7 +324,7 @@ void dxt_log_print_posix_file(void *posix_file_rec, char *file_name,
start_time = io_trace[i].start_time;
end_time = io_trace[i].end_time;
- printf("%8s%8d%7s%9lld%16lld%13lld%12.4f%12.4f", "X_POSIX", rank, "write", i, offset, length, start_time, end_time);
+ printf("%8s%8" PRId64 "%7s%9d%16" PRId64 "%16" PRId64 "%12.4f%12.4f", "X_POSIX", rank, "write", i, offset, length, start_time, end_time);
if (lustreFS) {
cur_offset = offset;
@@ -332,7 +332,7 @@ void dxt_log_print_posix_file(void *posix_file_rec, char *file_name,
print_count = 0;
while (cur_offset < offset + length) {
- printf(" [%3d]", (rec->ost_ids)[ost_idx]);
+ printf(" [%3" PRId64 "]", (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;
@@ -352,7 +352,7 @@ void dxt_log_print_posix_file(void *posix_file_rec, char *file_name,
start_time = io_trace[i].start_time;
end_time = io_trace[i].end_time;
- printf("%8s%8d%7s%9lld%16lld%13lld%12.4f%12.4f", "X_POSIX", rank, "read", i - write_count, offset, length, start_time, end_time);
+ printf("%8s%8" PRId64 "%7s%9d%16" PRId64 "%16" PRId64 "%12.4f%12.4f", "X_POSIX", rank, "read", (int)(i - write_count), offset, length, start_time, end_time);
if (lustreFS) {
cur_offset = offset;
@@ -360,7 +360,7 @@ void dxt_log_print_posix_file(void *posix_file_rec, char *file_name,
print_count = 0;
while (cur_offset < offset + length) {
- printf(" [%3d]", (rec->ost_ids)[ost_idx]);
+ printf(" [%3" PRId64 "]", (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;
@@ -382,7 +382,6 @@ void dxt_log_print_mpiio_file(void *mpiio_file_rec, char *file_name,
struct dxt_file_record *file_rec =
(struct dxt_file_record *)mpiio_file_rec;
- int64_t offset;
int64_t length;
double start_time;
double end_time;
@@ -399,8 +398,8 @@ void dxt_log_print_mpiio_file(void *mpiio_file_rec, char *file_name,
((void *)file_rec + sizeof(struct dxt_file_record));
printf("\n# DXT, file_id: %" PRIu64 ", file_name: %s\n", f_id, file_name);
- printf("# DXT, rank: %d, hostname: %s\n", rank, hostname);
- printf("# DXT, write_count: %d, read_count: %d\n",
+ printf("# DXT, rank: %" PRId64 ", hostname: %s\n", rank, hostname);
+ printf("# DXT, write_count: %" PRId64 ", read_count: %" PRId64 "\n",
write_count, read_count);
printf("# DXT, mnt_pt: %s, fs_type: %s\n", mnt_pt, fs_type);
@@ -410,52 +409,24 @@ void dxt_log_print_mpiio_file(void *mpiio_file_rec, char *file_name,
/* Print IO Traces information */
for (i = 0; i < write_count; i++) {
- offset = io_trace[i].offset;
length = io_trace[i].length;
start_time = io_trace[i].start_time;
end_time = io_trace[i].end_time;
- printf("%8s%8d%7s%9lld%13lld%12.4f%12.4f\n", "X_MPIIO", rank, "write", i, length, start_time, end_time);
+ printf("%8s%8" PRId64 "%7s%9d%16" PRId64 "%12.4f%12.4f\n", "X_MPIIO", rank, "write", i, length, start_time, end_time);
}
for (i = write_count; i < write_count + read_count; i++) {
- offset = io_trace[i].offset;
length = io_trace[i].length;
start_time = io_trace[i].start_time;
end_time = io_trace[i].end_time;
- printf("%8s%8d%7s%9lld%13lld%12.4f%12.4f\n", "X_MPIIO", rank, "read", i - write_count, length, start_time, end_time);
+ printf("%8s%8" PRId64 "%7s%9d%16" PRId64 "%12.4f%12.4f\n", "X_MPIIO", rank, "read", (int)(i - write_count), length, start_time, end_time);
}
return;
}
-static void dxt_log_print_posix_description(int ver)
-{
-}
-
-static void dxt_log_print_mpiio_description(int ver)
-{
-}
-
-static void dxt_log_print_posix_file_diff(void *file_rec1, char *file_name1,
- void *file_rec2, char *file_name2)
-{
-}
-
-static void dxt_log_print_mpiio_file_diff(void *file_rec1, char *file_name1,
- void *file_rec2, char *file_name2)
-{
-}
-
-static void dxt_log_agg_posix_files(void *rec, void *agg_rec, int init_flag)
-{
-}
-
-static void dxt_log_agg_mpiio_files(void *rec, void *agg_rec, int init_flag)
-{
-}
-
/*
* Local variables:
* c-indent-level: 4
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/commit/43a2233e688ffeb5d1b89f4748ee049e980626fe
---
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/commit/43a2233e688ffeb5d1b89f4748ee049e980626fe
You're receiving this email because of your account on xgitlab.cels.anl.gov.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20180222/cd45b7fd/attachment-0001.html>
More information about the Darshan-commits
mailing list