Closed jtfrey closed 5 years ago
Thanks for your interest and contributions! However, I want to keep the spart command as a user-oriented partition info command for slurm. Your contributions will convert the project to a very complex codebase which I cannot continue to develop. Also, from a normal user's point of view, there is not much of a difference.
This set of changes to the spart program streamlines the partition summary process to produce an in-memory representation of the summary data. The display of the summary data has been modularized so that multiple formats can easily be implemented, including:
Bug fixes
Jobs can be submitted with multiple partitions; this manifests as a comma-delimited list of partition names on the job record. The previous implementation:
doesn't account for a list of partition names and also could produce false positives for overlapping names (e.g. "large" and "large_smp") since strncmp() was used: for partition->name of "large" and a job->partition of "large_smp" the code above would evaluate to true.
Job state checking was modified to check the binary flags rather than fetching the textual state.