<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Just FYI, there's one minor issue with spart: for pending jobs, the "partition" parameter can be a comma-separated list of partitions and not just a single partition name<div class=""><br class=""></div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">If the job can use more than one partition, specify their names in a comma separate list and the one</div><div class="">offering earliest initiation will be used with no regard given to the partition name ordering (although</div><div class="">higher priority partitions will be considered first). When the job is initiated, the name of the par‐</div><div class="">tition used will be placed first in the job record partition string.</div></blockquote><div class=""><br class=""></div><div class=""><br class=""></div><div class="">So the code that identifies to which partition a pending job belongs may not work properly:<div class=""><br class=""></div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div class="">strncmp(</div></div><div class=""><div class=""> part_buffer_ptr->partition_array[j].name,</div></div><div class=""><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>job_buffer_ptr->job_array[i].partition,</div></div><div class=""><div class=""> <span class="Apple-tab-span" style="white-space:pre"> </span>strlen (part_buffer_ptr->partition_array[j].name)) == 0</div></div></blockquote><div class=""><br class=""></div><div class=""><br class=""></div><div class="">This can also produce incorrect matches if a cluster has partitions with overlapping names: e.g. for a job requesting partition "large_smp" the code above would evaluate to true for a partition named "large". And if the user had requested</div><div class=""><br class=""></div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">sbatch --partition small --partition medium --partition large ...</div></blockquote><div class=""><br class=""></div><div class=""><br class=""></div><div class="">then it would only include the pending CPU counts on the "small" partition.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">If your cluster has no overlap between partition names and users do not submit jobs against multiple partitions, the program will work fine.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><blockquote type="cite" class="">On Mar 27, 2019, at 5:51 AM, mercan <<a href="mailto:ahmet.mercan@uhem.itu.edu.tr" class="">ahmet.mercan@uhem.itu.edu.tr</a>> wrote:<br class=""><br class="">Hi;<br class=""><br class="">Except sjstat script, Slurm does not contains a command to show user-oriented partition info. I wrote a command. I hope you will find it useful.<br class=""><br class=""><a href="https://github.com/mercanca/spart" class="">https://github.com/mercanca/spart</a><br class=""><br class="">Regards,<br class=""><br class="">Ahmet M.<br class=""><br class=""><br class=""><br class=""></blockquote><br class=""><div class=""><br class="">::::::::::::::::::::::::::::::::::::::::::::::::::::::<br class="">Jeffrey T. Frey, Ph.D.<br class="">Systems Programmer V / HPC Management<br class="">Network & Systems Services / College of Engineering<br class="">University of Delaware, Newark DE 19716<br class="">Office: (302) 831-6034 Mobile: (302) 419-4976<br class="">::::::::::::::::::::::::::::::::::::::::::::::::::::::<br class=""><br class=""><br class=""><br class=""></div><br class=""></div></div></body></html>