<div dir="ltr"><div dir="ltr"><div>I also haven't got along with the Perl API shipped with slurm. I got it to work, but there were things missing.</div><div>Currently I have some wrapper functions for most of slurm commands, and a general parsing function to slurm's common outputs (of scontrol, sacctmgr, etc.).</div><div>Not in CPAN, but you can see it under in the cshuji::Slurm module in:<br></div><div><a href="https://github.com/irush-cs/slurm-scripts/">https://github.com/irush-cs/slurm-scripts/</a></div><div><br></div><div>I haven't checked it yet, but now with the slurm rest API, I think getting the information should be simpler.<br></div><div><br></div><div>HTH,</div><div>    Yair.<br></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 23, 2020 at 10:27 PM Thomas M. Payerle <<a href="mailto:payerle@umd.edu">payerle@umd.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I was never able to figure out how to use the Perl API shipped with Slurm, but instead have written some wrappers around some of the Slurm commands for Perl.  My wrappers for the sacctmgr and share commands are available at CPAN:<br></div><div><a href="https://metacpan.org/release/Slurm-Sacctmgr" target="_blank">https://metacpan.org/release/Slurm-Sacctmgr</a></div><div><a href="https://metacpan.org/release/Slurm-Sshare" target="_blank">https://metacpan.org/release/Slurm-Sshare</a></div><div>(I have similar wrappers for a few other commands, but have not polished enough for CPAN release, but am willing to share if you contact me).<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 23, 2020 at 3:49 PM Burian, John <<a href="mailto:John.Burian@nationwidechildrens.org" target="_blank">John.Burian@nationwidechildrens.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I have some questions about the Slurm Perl API<br>
- Is it still actively supported? I see it's still in the source in Git.<br>
- Does anyone use it? If so, do you have a pointer to some example code?<br>
<br>
My immediate question is, for methods that take a data structure as an input argument, how does one define that data structure? In Perl, it's just a hash, am I supposed to populate the keys of the hash by reading the matching C structure in slurm.h? Or do I only need to populate the keys that I care to provide a value for, and Slurm assigns defaults to the other keys/fields? Thanks,<br>
<br>
-- <br>
John Burian<br>
Senior Systems Programmer, Technical Lead<br>
Institutional High Performance Computing<br>
Abigail Wexner Research Institute, Nationwide Children’s Hospital<br>
<br>
<br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Tom Payerle <br>DIT-ACIGS/Mid-Atlantic Crossroads        <a href="mailto:payerle@umd.edu" target="_blank">payerle@umd.edu</a><br></div><div>5825 University Research Park               (301) 405-6135<br></div><div dir="ltr">University of Maryland<br>College Park, MD 20740-3831<br></div></div></div></div></div></div>
</blockquote></div><br></div>