Repository navigation
[stat-cl] Add --attach-job in stat-cl for sampling Slurm and Flux jobs by ID - #94
Conversation
- Resolve a Slurm launcher or manage a Flux debug helper and forward native sampling options to STATbin. - Install the resolver with headless builds and document scheduler selection for local and remote sampling.
|
Can you please change stat-gui-remote-cli to stat-remote-cl? It's not the GUI, so we should remove that from the name. And minor issue, but to be consistent with stat-cl, remove the trailing "i". This may be a moot point depending on what you think about my next request. There is an inconsistency with the remote GUI and the CLI commands. The remote GUI still uses the old stat-gui command, just requiring certain options to make it clear that it is operating remotely. Currently the local and remote CLIs are separate commands. Would it make sense to also unify remote and local within the stat-cl command? |
@lee218llnl - this is good point. Actually, few days ago I was thinking if This could be a separate issue/PR discussion but let me write here details anyway: stat-cl and stat-remote-clBy keeping I was also thinking of changes I did/proposed in #95 with GDB and CUDA-GDBToday, Here is the summary table. The
A GDB-enabled build accepts Does this make sense? I have renamed command in d87060e. I can do whole unification changes in a separate PR shortly as it would involve a bit of refactoring of the existing CLI parsing. But if you prefer, happy to push it here. |
|
By the way, as I am looking through the existing options and thinking about new ones, what do you think about using hyphens in multiword option names? I find We could follow that convention for new options and add aliases for existing ones over time so current scripts keep working for near future (until / beyond v5.0). |
|
I think those sample options make sense. I'm not going to put you on the hook, but some of the same logic applies for gdb-oneapi and roc-gdb. I can take care of any of those if they don't align with the cuda-gdb implementation. Obviously cudaquick (or perhaps cuda-quick) is unique to cuda-gdb. I don't recall if there are equivalents. The --sample-individual flags looks better to me too. Both can be done in a separate PR. Let me know if you want to do to the stat-gui-remote-cli -> stat-cl merge here or in another PR. If that too is another PR, please let me know if this one is good and then I can merge this PR. Thanks! |
Certainly make sense! I just don't have a way/dev environment to test those. During the review process if you could check/provide feedback, happy to make changes accordingly. No problem!
Ok, I will use this style and keep backward compatibility.
I am looking into this and considering overall, I think better to do that as a separate PR. Also easy to track issues later. So let's merge this. Thanks! |
Summary
Remote Connect already supports sampling a running job by ID with
stat-gui-remote-cli sample-job JOBID.This PR brings that workflow to the native CLI with
stat-cl --attach-job JOBID.For Slurm, STAT looks up the launcher PID and lists the candidates when several launchers match. For Flux,
STAT starts the debug helper and cleans it up after sampling. Passing
--flux-allocationselects Flux scheduler explicitly.Examples
Collect one sample from a running Slurm job with a single launcher.
Sample a Flux application from inside its instance, or from the login node using the outer allocation ID.
For a nested Flux job, use the existing Remote Connect command from desktop. Put
--flux-allocation ALLOCATION_IDbeforesample-jobto select the outer allocation:Notes / Disclaimer