slurmR
slurmR copied to clipboard
Improve hostname detection
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.
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.