PySlurm / pyslurm

Python Interface to Slurm
https://pyslurm.github.io
GNU General Public License v2.0
467 stars 116 forks source link

Node in Nodes collection do not report a MIXED state, only IDLE or ALLOCATED #317

Closed tazend closed 11 months ago

tazend commented 11 months ago

Discussed in https://github.com/orgs/PySlurm/discussions/316

Originally posted by **robgics** August 25, 2023 I used the collection to load all nodes, and then I print out the state of all of them. They are all either IDLE, ALLOCATED, or some form of DOWN/DRAIN...but no MIXED. Inspecting particular nodes that I know are mixed (via scontrol show node) shows that if a node is MIXED (so even 1 cpu in use, out of 48), then it will appear as ALLOCATED via pyslurm. I *think* we can work around this by comparing total cpus and allocated cpus. But I'm just wondering if this simplification is intentional or if I'm missing something. Thanks!
tazend commented 11 months ago

mh, that is weird. Because I'm using the exact same function that scontrol is also using, and they just print the result of that function out. I'll have to test that out on my Cluster.

tazend commented 11 months ago

@robgics

also found the error in this case - will make the fix tomorrow together with #315. Thank you for spotting all the bugs :)

robgics commented 11 months ago

Heh, that's been the easy part for me. It's been being SURE it's a bug and not just a mistake I'm making that's been the hard part. Thanks for being so responsive. You fixed those bugs before I was able to make a dent in understanding the deeper workings of pyslurm.

tazend commented 11 months ago

Alright, fixed now in main, same with #315

robgics commented 10 months ago

Looks like it's working great, thanks!