darshan-hpc / darshan

Darshan I/O characterization tool
Other
56 stars 27 forks source link

ENH: add darshan-runtime configure option for specifying a username env var #925

Closed shanedsnyder closed 1 year ago

shanedsnyder commented 1 year ago

This should address a longstanding issue with Darshan not always being able to determine the username associated with a job on Cray systems that use Slurm. Specifically, when Slurm users use the --export option to srun to set additional environment variables, this can wipe out env vars like LOGNAME, which Darshan uses to determine the associated username with a job.

This new configure option allows users to specify additional env vars that can be considered for determining a job's username (e.g., SLURM_JOB_USER). If specified, Darshan will consider this provided env var first.

In my testing on NERSC Cori, this is all working as expected: