diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-06-28 15:31:32 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-28 15:31:32 (GMT) |
commit | 187ea8a9ae1405b5b46ca47a32fb1fb9e2686c98 (patch) | |
tree | baffa167d0796786241aef6b0ce76d4adec3b66e /utils/tools | |
parent | 7a44581a84778a1346a2fd5b6cca7d9db905a321 (diff) | |
download | hdf5-187ea8a9ae1405b5b46ca47a32fb1fb9e2686c98.zip hdf5-187ea8a9ae1405b5b46ca47a32fb1fb9e2686c98.tar.gz hdf5-187ea8a9ae1405b5b46ca47a32fb1fb9e2686c98.tar.bz2 |
Rename HD(f)printf() to (f)printf() (#3194)
Diffstat (limited to 'utils/tools')
-rw-r--r-- | utils/tools/h5dwalk/h5dwalk.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/utils/tools/h5dwalk/h5dwalk.c b/utils/tools/h5dwalk/h5dwalk.c index acb1724..ba7374d 100644 --- a/utils/tools/h5dwalk/h5dwalk.c +++ b/utils/tools/h5dwalk/h5dwalk.c @@ -120,7 +120,7 @@ create_default_separators(struct distribute_option *option, mfu_flist *flist, ui double max_size_tmp; const char *max_size_units; mfu_format_bytes(*global_max_file_size, &max_size_tmp, &max_size_units); - HDprintf("Max File Size: %.3lf %s\n", max_size_tmp, max_size_units); + printf("Max File Size: %.3lf %s\n", max_size_tmp, max_size_units); /* round next_pow_2 to next multiple of 10 */ uint64_t max_magnitude_bin = (uint64_t)((ceil(log2((double)(*global_max_file_size)) / 10)) * 10); @@ -213,15 +213,15 @@ print_flist_distribution(int file_histogram, struct distribute_option *option, m uint64_t number; double size_tmp; const char *size_units; - HDprintf("%-27s %s\n", "Range", "Number"); + printf("%-27s %s\n", "Range", "Number"); for (size_t i = 0; i <= separators; i++) { - HDprintf("%s", "[ "); + printf("%s", "[ "); if (i == 0) { - HDprintf("%7.3lf %3s", 0.000, "B"); + printf("%7.3lf %3s", 0.000, "B"); } else { mfu_format_bytes((uint64_t)option->separators[i - 1], &size_tmp, &size_units); - HDprintf("%7.3lf %3s", size_tmp, size_units); + printf("%7.3lf %3s", size_tmp, size_units); } printf("%s", " - "); @@ -230,17 +230,17 @@ print_flist_distribution(int file_histogram, struct distribute_option *option, m mfu_format_bytes((uint64_t)option->separators[i], &size_tmp, &size_units); number = disttotal[i]; mfu_format_bytes((uint64_t)option->separators[i], &size_tmp, &size_units); - HDprintf("%7.3lf %3s ) %" PRIu64 "\n", size_tmp, size_units, number); + printf("%7.3lf %3s ) %" PRIu64 "\n", size_tmp, size_units, number); } else { if (i == separators) { number = disttotal[i]; - HDprintf("%10s ) %" PRIu64 "\n", "MAX", number); + printf("%10s ) %" PRIu64 "\n", "MAX", number); } else { number = disttotal[i]; mfu_format_bytes((uint64_t)option->separators[i], &size_tmp, &size_units); - HDprintf("%7.3lf %3s ) %" PRIu64 "\n", size_tmp, size_units, number); + printf("%7.3lf %3s ) %" PRIu64 "\n", size_tmp, size_units, number); } } } @@ -268,7 +268,7 @@ distribute_separator_add(struct distribute_option *option, uint64_t separator) count = option->separator_number; option->separator_number++; if (option->separator_number > MAX_DISTRIBUTE_SEPARATORS) { - HDprintf("Too many separators"); + printf("Too many separators"); return -1; } @@ -340,13 +340,13 @@ distribution_parse(struct distribute_option *option, const char *string) } if (mfu_abtoull(ptr, &separator) != MFU_SUCCESS) { - HDprintf("Invalid separator \"%s\"\n", ptr); + printf("Invalid separator \"%s\"\n", ptr); status = -1; goto out; } if (distribute_separator_add(option, separator)) { - HDprintf("Duplicated separator \"%llu\"\n", separator); + printf("Duplicated separator \"%llu\"\n", separator); status = -1; goto out; } @@ -450,8 +450,8 @@ print_file(mfu_flist flist, uint64_t idx) const char *size_units; mfu_format_bytes(size, &size_tmp, &size_units); - HDprintf("%s %s %s %7.3f %3s %s %s\n", mode_format, username, groupname, size_tmp, size_units, - modify_s, file); + printf("%s %s %s %7.3f %3s %s %s\n", mode_format, username, groupname, size_tmp, size_units, modify_s, + file); } else { /* get type */ @@ -467,7 +467,7 @@ print_file(mfu_flist flist, uint64_t idx) type_str = type_str_link; } - HDprintf("Type=%s File=%s\n", type_str, file); + printf("Type=%s File=%s\n", type_str, file); } } @@ -521,8 +521,8 @@ print_file_text(mfu_flist flist, uint64_t idx, char *buffer, size_t bufsize) const char *size_units; mfu_format_bytes(size, &size_tmp, &size_units); - numbytes = (size_t)snHDprintf(buffer, bufsize, "%s %s %s %7.3f %3s %s %s\n", mode_format, username, - groupname, size_tmp, size_units, modify_s, file); + numbytes = (size_t)snprintf(buffer, bufsize, "%s %s %s %7.3f %3s %s %s\n", mode_format, username, + groupname, size_tmp, size_units, modify_s, file); } else { /* get type */ @@ -538,7 +538,7 @@ print_file_text(mfu_flist flist, uint64_t idx, char *buffer, size_t bufsize) type_str = type_str_link; } - numbytes = (size_t)snHDprintf(buffer, bufsize, "Type=%s File=%s\n", type_str, file); + numbytes = (size_t)snprintf(buffer, bufsize, "Type=%s File=%s\n", type_str, file); } return numbytes; @@ -606,7 +606,7 @@ dh5tool_flist_write_text(const char *name, mfu_flist bflist) /* change number of ranks to string to pass to MPI_Info */ char str_buf[12]; - HDprintf(str_buf, "%d", ranks); + printf(str_buf, "%d", ranks); /* no. of I/O devices for lustre striping is number of ranks */ MPI_Info_set(info, "striping_factor", str_buf); @@ -924,7 +924,7 @@ run_command(int argc __attribute__((unused)), char **argv, char *cmdline, const int use_stdout = 0; #ifdef H5_HAVE_WINDOWS - HDprintf("ERROR: %s %s: Unable to support fork/exec on WINDOWS\n", PROGRAMNAME, __func__); + printf("ERROR: %s %s: Unable to support fork/exec on WINDOWS\n", PROGRAMNAME, __func__); h5dwalk_exit(EXIT_FAILURE); #else @@ -943,7 +943,7 @@ run_command(int argc __attribute__((unused)), char **argv, char *cmdline, const buf_cache = bufs; #ifdef VERBOSE if (buft_count == 0) { - HDprintf("[%d] Initial buf_cache allocation: buft_count=%d\n", sg_mpi_rank, buft_count); + printf("[%d] Initial buf_cache allocation: buft_count=%d\n", sg_mpi_rank, buft_count); } #endif bufs[buft_count++] = thisbuft = (buf_t *)MFU_CALLOC(1, sizeof(buf_t)); @@ -1006,7 +1006,7 @@ run_command(int argc __attribute__((unused)), char **argv, char *cmdline, const /* Create a new read buffer */ #ifdef VERBOSE - HDprintf("[%d] Allocate-1 a new read buffer:: buft_count=%d\n", sg_mpi_rank, buft_count); + printf("[%d] Allocate-1 a new read buffer:: buft_count=%d\n", sg_mpi_rank, buft_count); #endif bufs[buft_count++] = thisbuft = (buf_t *)MFU_CALLOC(1, sizeof(buf_t)); assert(thisbuft != NULL); @@ -1033,8 +1033,8 @@ run_command(int argc __attribute__((unused)), char **argv, char *cmdline, const thisbuft->count = 0; thisbuft->chars += read_bytes; #ifdef VERBOSE - HDprintf("[%d] Allocate-2 a new read buffer:: buft_count=%d\n", sg_mpi_rank, - buft_count); + printf("[%d] Allocate-2 a new read buffer:: buft_count=%d\n", sg_mpi_rank, + buft_count); #endif bufs[buft_count++] = thisbuft = (buf_t *)MFU_CALLOC(1, sizeof(buf_t)); assert(thisbuft != NULL); @@ -1109,7 +1109,7 @@ run_command(int argc __attribute__((unused)), char **argv, char *cmdline, const HDstrcpy(&logErrors[log_len - 3], "err"); } if (mfu_debug_level == MFU_LOG_VERBOSE) { - HDprintf("\tCreating logfile: %s\n", logpath); + printf("\tCreating logfile: %s\n", logpath); fflush(stdout); } pid = fork(); @@ -1191,8 +1191,8 @@ MFU_PRED_EXEC(mfu_flist flist, uint64_t idx, void *arg) buf += sizeof(mfu_flist *) + 2; fname_arg = mfu_flist_file_get_name(flist_arg, idx); if (fname_arg == NULL) { - HDprintf("[%d] Warning: Unable to resolve file_substitution %d (idx=%ld)\n", sg_mpi_rank, - file_substituted, idx); + printf("[%d] Warning: Unable to resolve file_substitution %d (idx=%ld)\n", sg_mpi_rank, + file_substituted, idx); argv[k] = HDstrdup(fname); } else { @@ -1224,7 +1224,7 @@ int MFU_PRED_PRINT(mfu_flist flist, uint64_t idx, void *arg __attribute__((unused))) { const char *name = mfu_flist_file_get_name(flist, idx); - HDprintf("%s\n", name); + printf("%s\n", name); return 1; } @@ -1517,7 +1517,7 @@ main(int argc, char *argv[]) } } if (count1 != count2) { - HDprintf("config files have different file counts: (1) %d and (2) %d\n", count1, count2); + printf("config files have different file counts: (1) %d and (2) %d\n", count1, count2); } } else if (numpaths > 0) { |