Replies: 5 comments 4 replies
-
I'm curious how you implemented this. I had tried this years ago and on large clusters, the local user lookups added a fair amount of latency on nodes with a large number of users. Then i took it out and left just the user ids, which had expected performance. I think slurm caches this lookup internally somewhere. |
Beta Was this translation helpful? Give feedback.
-
If it's been tried before then I think I can safely say I didn't do it right. Job_dict['user_name'] = slurm.stringOrNone(self._record.user_name, '') At least in our case (RHEL8, slurm 23.2, python3) it is being set consistently. |
Beta Was this translation helpful? Give feedback.
-
This was a few years ago and could be better now. If slurm exposes it, then maybe it's okay. I would take your test and try to run it on a test machine with like 2000 fake users, and then try to get all jobs (which should include the user names) and see what the performance is. |
Beta Was this translation helpful? Give feedback.
-
Hi @robgics just wanted to note that the pyslurm.job class has been marked deprecated. When you get all Jobs with But now that you mention it, it might make sense to add whether However if you'd still want to continue using
and see how that works out. |
Beta Was this translation helpful? Give feedback.
-
Ok...there doesn't seem to be any point in submitting a PR to change a deprecated job class. And I have confirmed that pyslurm.Jobs jobs do indeed contain user_name. So that is resolved for me. Thanks for the help. |
Beta Was this translation helpful? Give feedback.
-
I can access user_id of course, but for our data purposes we need user_name, and I'd rather not do an extra lookup on the system. I did a test where I added it to the pyslurm.pyslurm.job class and that seems to work.
Can I PR this, or is there another way I don't know of to access the username for a given userid?
Beta Was this translation helpful? Give feedback.
All reactions