Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve hostname detection #46

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

michaelmayer2
Copy link

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.

@gvegayon
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants