Skip to content

Commit

Permalink
dcp, dcmp, dsync, dchmod: update progress messages
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Moody <moody20@llnl.gov>
  • Loading branch information
adammoody committed Feb 1, 2021
1 parent c119ca1 commit 87c3de7
Show file tree
Hide file tree
Showing 6 changed files with 315 additions and 277 deletions.
14 changes: 7 additions & 7 deletions src/common/mfu_flist_archive.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ static void reduce_fini(const void* buf, size_t size)
}

/* print status to stdout */
MFU_LOG(MFU_LOG_INFO, "%s %.3lf %s (%.0f\%) in %.3lf secs (%.3lf %s) %.0f secs left ...",
MFU_LOG(MFU_LOG_INFO, "%s %.3lf %s (%.0f%%) in %.3lf secs (%.3lf %s) %.0f secs left ...",
reduce_opstr, val_tmp, val_units, percent, secs, rate_tmp, rate_units, secs_remaining
);
}
Expand Down Expand Up @@ -2211,12 +2211,12 @@ static void create_progress_fn(const uint64_t* vals, int count, int complete, in

if (complete < ranks) {
MFU_LOG(MFU_LOG_INFO,
"Tarred %.3lf %s (%.0f\%) in %.3lf secs (%.3lf %s) %.0f secs left ...",
"Tarred %.3lf %s (%.0f%%) in %.3lf secs (%.3lf %s) %.0f secs left ...",
bytes_val, bytes_units, percent, secs, bw_val, bw_units, secs_remaining
);
} else {
MFU_LOG(MFU_LOG_INFO,
"Tarred %.3lf %s (%.0f\%) in %.3lf secs (%.3lf %s) done",
"Tarred %.3lf %s (%.0f%%) in %.3lf secs (%.3lf %s) done",
bytes_val, bytes_units, percent, secs, bw_val, bw_units
);
}
Expand Down Expand Up @@ -4144,12 +4144,12 @@ static void extract2_progress_fn(const uint64_t* vals, int count, int complete,

if (complete < ranks) {
MFU_LOG(MFU_LOG_INFO,
"Extracted %llu items and %.3lf %s (%.0f\%) in %.3lf secs (%.3lf items/sec, %.3lf %s) %.0f secs left ...",
"Extracted %llu items and %.3lf %s (%.0f%%) in %.3lf secs (%.3lf items/sec, %.3lf %s) %.0f secs left ...",
vals[REDUCE_ITEMS], bytes_val, bytes_units, percent, secs, item_rate, bw_val, bw_units, secs_remaining
);
} else {
MFU_LOG(MFU_LOG_INFO,
"Extracted %llu items and %.3lf %s (%.0f\%) in %.3lf secs (%.3lf items/sec, %.3lf %s) done",
"Extracted %llu items and %.3lf %s (%.0f%%) in %.3lf secs (%.3lf items/sec, %.3lf %s) done",
vals[REDUCE_ITEMS], bytes_val, bytes_units, percent, secs, item_rate, bw_val, bw_units
);
}
Expand Down Expand Up @@ -4188,12 +4188,12 @@ static void extract1_progress_fn(const uint64_t* vals, int count, int complete,

if (complete < ranks) {
MFU_LOG(MFU_LOG_INFO,
"Extracted %.3lf %s (%.0f\%) in %.3lf secs (%.3lf %s) %.0f secs left ...",
"Extracted %.3lf %s (%.0f%%) in %.3lf secs (%.3lf %s) %.0f secs left ...",
bytes_val, bytes_units, percent, secs, bw_val, bw_units, secs_remaining
);
} else {
MFU_LOG(MFU_LOG_INFO,
"Extracted %.3lf %s (%.0f\%) in %.3lf secs (%.3lf %s) done",
"Extracted %.3lf %s (%.0f%%) in %.3lf secs (%.3lf %s) done",
bytes_val, bytes_units, percent, secs, bw_val, bw_units
);
}
Expand Down
21 changes: 0 additions & 21 deletions src/common/mfu_flist_chmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -1194,9 +1194,6 @@ void mfu_flist_chmod(
/* set bits on items starting at the deepest level, this is so we still get child items
* in the case that we're disabling bits on the parent items */
for (int level = levels - 1; level >= 0; level--) {
/* start timer for this level */
double start = MPI_Wtime();

/* spread items for this level evenly over all procs */
mfu_flist list = mfu_flist_spread(lists[level]);

Expand All @@ -1218,24 +1215,6 @@ void mfu_flist_chmod(

/* wait for all processes to finish before we start with files at next level */
MPI_Barrier(MPI_COMM_WORLD);

/* stop timer and print stats */
double end = MPI_Wtime();
if (mfu_debug_level >= MFU_LOG_VERBOSE) {
uint64_t min, max, sum;
MPI_Allreduce(&stats[ITEM_COUNT], &min, 1, MPI_UINT64_T, MPI_MIN, MPI_COMM_WORLD);
MPI_Allreduce(&stats[ITEM_COUNT], &max, 1, MPI_UINT64_T, MPI_MAX, MPI_COMM_WORLD);
MPI_Allreduce(&stats[ITEM_COUNT], &sum, 1, MPI_UINT64_T, MPI_SUM, MPI_COMM_WORLD);
double rate = 0.0;
if (end - start > 0.0) {
rate = (double)sum / (end - start);
}
double time_diff = end - start;
if (mfu_rank == 0) {
MFU_LOG(MFU_LOG_INFO, "level=%d min=%lu max=%lu sum=%lu rate=%f secs=%f",
(minlevel + level), (unsigned long)min, (unsigned long)max, (unsigned long)sum, rate, time_diff);
}
}
}

/* finalize our progress messages */
Expand Down

0 comments on commit 87c3de7

Please sign in to comment.