PySlurm / pyslurm

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

Copy/Paste error in Job class memory property #312

Closed robgics closed 11 months ago

robgics commented 11 months ago

Details

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 11 months ago

Hi,

ah yeah, silly mistake. Thanks for spotting. Feel free to make a PR with the changes for the solution you described :)