--- name: hpc-darshan description: "Characterizes an application's I/O from a Darshan log: runs darshan-parser through a bundled summarizer, reads volumes, access sizes, sequentiality and collective use, and names the bottleneck the counters support. Not for instrumenting a build or for tuning without a log." --- # Darshan I/O analysis A Darshan log records what one run did to the file system: bytes, operation counts, request-size histograms and time per module (POSIX, MPI-IO, STDIO). Read it before tuning I/O, and read it again after, so that every claim about I/O names the counter behind it. The analysis is local and read-only: it needs `darshan-util` on `PATH` and no network. ## Phase 0 - Find the log and the tool 1. `bash`: `command -v darshan-parser && darshan-parser --version`. If it is missing, look for a module (`module -t --redirect spider darshan`, see hpc-modules) or a Spack install (`spack find darshan-util`). Without it, stop and say that darshan-util is needed. Never guess counters. 2. The log is a `*.darshan` file. Runtime builds write it to the site's log directory, organized by date, and `DARSHAN_LOGFILE` names an exact path for one run. Ask for the path if it is not given. 3. Capture with Darshan only when asked: link the runtime library, or preload it with `LD_PRELOAD=/libdarshan.so` (`darshan-config --libdir` prints that directory). Non-MPI programs also need `DARSHAN_ENABLE_NONMPI=1`. ## Phase 1 - Summarize Run the bundled summarizer as an observable step with `run_script`: ```text run_script(interpreter="python3", script="${pluginRoot}/assets/scripts/darshan_summary.py", args=[".darshan"], inputs=[".darshan"]) ``` `run_script` accepts only a script inside the workspace. When the pack is installed for the user rather than the project, run the same command through `bash` with `python3