Commit 43a2233e authored by Philip Carns's avatar Philip Carns

clean up dxt print routines

- resolve warnings
- make format more consistent
parent b5a2087b
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment