Copy/Paste error in Job class memory property
robgics opened this issue · 1 comments
robgics commented
Details
- Slurm Version: 23.2
- Python Version: 3.6.8
- Cython Version: 3.0.0
- PySlurm Branch: main
- Linux Distribution: RHEL8.3
Issue
Attempting to access the memory property of a job resulted in a python error. The offending code is in the memory property of the Job class (pyslurm/core/job/job.pyx). It references "self.min_nodes" which does not exist. It also tries to return the value of "mem_cpu" after calculating mem_node. Based on the code that is commented out below it, it would appear this is a copy/paste error.
Replacing min_nodes with num_nodes, and returning mem_node instead of mem_cpu appeared to fix my problem.
tazend commented
Hi,
ah yeah, silly mistake. Thanks for spotting.
Feel free to make a PR with the changes for the solution you described :)