slurmR icon indicating copy to clipboard operation
slurmR copied to clipboard

Improve hostname detection

Open michaelmayer2 opened this issue 1 year ago • 1 comments

At the moment, the hostnames allocated to a SLURM job launched by slurmR are detected via running srun hostname and then browsing SLURM stdout of the resulting job. This works for many cases but also can be error prone if the srun command is returning more than just the hostname.

The patch in this PR is using a tool called python-hostlist to programmatically determine the hostnames from the scontrol show job output.

Curious to see/hear if this PR makes sense or not.

michaelmayer2 avatar Jun 17 '24 07:06 michaelmayer2

This is great, @michaelmayer2! Without having done a review yet, I wonder if there's a way of doing this optional, i.e., what happens if (even if unlikely) Python is not loaded? Furthermore, I'd try to wrap the call using tryCatch or something alike. I'll take a look ASAP.

gvegayon avatar Jun 17 '24 16:06 gvegayon