PySlurm / pyslurm

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

Fix a crash in cstr.to_gres_dict when the input is just "gres:gpu" #334

Closed tazend closed 5 months ago

tazend commented 5 months ago

Slurm allows to pass things like --gres=gpu, which in this case the default value will be just one. However, the char gres value also really just contains "gres:gpu" when displayed via scontrol, with no indication of the count. The code previously assumed that Slurm internally modifies the char explicitly to reflect the default count of 1.

Fixes #333