Closed giovtorres closed 8 years ago
Giovanni, OK, I will take a look at the API structure and see what I'm missing to call. Which version are you using ?
Regards, Mark
pyslurm-14.11.5 slurm 14.11.9 (going to 15.08 soon)
Thanks, looks like I will need to call out to the opaque data structure via select_nodeinfo. Most of the code is there but not complete or tested for some time. As I'm working on slurm-14.11.x for other people I will look to adding it in to that branch first and then 15.x later.
Great! Thanks. I can help test that portion of the code as well.
It is now coded up but I will need to test it tonight/tomorrow before I push some code to you and then I will upload the changes to git.
OK, here we go. I believe It appears to work.......which is nice ! Of course I was banging my head on the desk as I was still getting zero until I realised that I needed to turn on "SelectTypeParameters=CR_CORE_MEMORY" in the config......dooh.
Please find attached a zipped replacement pyslurm.pyx for you. Obviously you will need to replace the existing one and do a build/install etc.
Looks good! Just need to remove the print statement on line 2385.
Cool, I will remove the debug line as well.
Giovanni, If you pull the latest 14.11.5 the changes as discussed previously have been committed. Please let me know if this now works and close the ticket if you are happy. I will look at the license gres handling now !
Mark
I pulled the latest 14.11.5 and rebuilt. alloc_memory is now not showing up for any nodes.
>>> pprint(nodes.get("cn0001").get("alloc_memory"))
None
Here's the diff between the latest 14.11.5 and yesterday's out-of-band patch:
$ diff 14.11.5/pyslurm/pyslurm.pyx patch/pyslurm/pyslurm.pyx
2148a2148,2149
> self.get()
>
2278c2279
< int i, total_used, cpus_per_node, rc
---
> int i, total_used, cpus_per_node, rc, alloc_mem
2281c2282
< uint32_t my_state, alloc_mem
---
> uint32_t my_state
2298,2300d2298
< if self._record.name is NULL:
< break
<
2302c2300,2301
< alloc_mem = alloc_cpus = err_cpus = 0
---
> alloc_cpus = err_cpus = 0
> alloc_mem = 0
2406c2405
< Host_dict['err_cpus'] = err_cpus
---
> Host_dict['alloc_memory'] = alloc_mem
2407a2407
> Host_dict['err_cpus'] = err_cpus
Yep, too much haste ! Have committed missing host dictionary entry, please try again
Yup, looks good. Thanks Mark!
pyslurm.node().get() doesn't give allocated memory for any nodes. I'm looking for this value:
pyslurm does report real_memory for each node.
Thanks, Giovanni