hpc / hpc/mpifileutils

The --quiet option to dfind doesn't supress log output

Open
#650 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
200
Forks
85
Avg merge
3d 21h
Merged PRs (30d)
2

Description

Running dfind --quiet doesn't appear to suppress logging lines as intended. The telemetry data still gets printed to standard output. Therefore capturing output from via the --print predicate includes but the matching entries and the log lines that show progress of dfind.

For example a run like the follwing

srun --mem 8G -n 1 -N 1 mpiexec -n 1 dfind -i data/newlines-dfind.dat --quiet  --print

Will include the following to log lines at the start of the output

[2025-07-22T18:39:10] Reading from input file: data/newlines-dfind.dat
[2025-07-22T18:39:10] Read 5 files in 0.004 seconds (1309.568 files/sec)

The source suggests these lines are MFU_LOG_INFO level and should be suppressed by --quite:

$ grep -r MFU_LOG_INFO src/*| egrep 'Reading from input|Read .* files in'
src/common/mfu_flist_io.c:        MFU_LOG(MFU_LOG_INFO, "Reading from input file: %s", name);
src/common/mfu_flist_io.c:        MFU_LOG(MFU_LOG_INFO, "Read %lu files in %.3lf seconds (%.3lf files/sec)",

The macro MFU_LOG(level, ...) should be skipping these logs because quiet sets mfu_debug_level = MFU_LOG_NONE in dfind.c

https://github.com/hpc/mpifileutils/blob/8e5e35fb5d46976429a91a4bbe56321ede5de537/src/dfind/dfind.c#L550

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the command shown with dfind --quiet --print, then inspect the quiet setup in src/dfind/dfind.c and the MFU_LOG macro in src/common/mfu_util.h. Trace the logging calls in src/common/mfu_flist_io.c and verify that completed output contains the matching entries without the telemetry lines.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.