<div dir="ltr"><div>Hi Jürgen, <br></div><div><br></div><div>No reservation was done during that time. <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 1, 2021 at 7:11 PM Juergen Salk <<a href="mailto:juergen.salk@uni-ulm.de">juergen.salk@uni-ulm.de</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">Dear Jeherul,<br>
<br>
sacct is for job accounting, sreport for cluster usage accounting. <br>
<br>
Did you maybe had any resource reservations for this user in place during <br>
that period of time? <br>
<br>
To my very best knowledge, resource reservations for one or more users <br>
do count in terms of cluster usage as reported by sreport for that user(s), <br>
even if there were no jobs submitted into the reservation, while sacct<br>
reports the resources actually allocated by jobs but does not count idle<br>
reservation time.<br>
<br>
Best regards,<br>
Jürgen<br>
<br>
<br>
* Jeherul Islam <<a href="mailto:jeherul@gmail.com" target="_blank">jeherul@gmail.com</a>> [210901 18:24]:<br>
> Dear Loris,<br>
> <br>
> When we grep it by the user name "j.mira" it will strike out the multiple<br>
> counts. Again sacct is showing fewer gpu minutes than sreport.<br>
> <br>
> On Wed, 1 Sep, 2021, 6:03 PM Loris Bennett, <<a href="mailto:loris.bennett@fu-berlin.de" target="_blank">loris.bennett@fu-berlin.de</a>><br>
> wrote:<br>
> <br>
> > Dear Jeherul,<br>
> ><br>
> > Jeherul Islam <<a href="mailto:jeherul@gmail.com" target="_blank">jeherul@gmail.com</a>> writes:<br>
> ><br>
> > > Dear Loris,<br>
> > ><br>
> > > Thanks for your reply. Here is the output for the same period but the<br>
> > result is not matching.<br>
> > ><br>
> > > #sacct --account=chemistry<br>
> > --format=jobid,user,ElapsedRaw,state,AllocGRES,ncpus --starttime=2021-05-01<br>
> > --endtime=2021-08-31  | grep j.mira| grep gpu| awk '{sum += $3} END {print<br>
> > sum}'<br>
> ><br>
> > I think you need the option '-X' for 'sacct'.  This will give you one<br>
> > line per job rather than including the steps.  Without '-X' you are<br>
> > counting the usage multiple times for each job.<br>
> ><br>
> > Cheers,<br>
> ><br>
> > Loris<br>
> ><br>
> ><br>
> > > 6835053          (6835053/60 = 113917 )<br>
> > ><br>
> > > # sreport cluster AccountUtilizationByUser cluster=**** user=j.mira<br>
> > start=2021-05-01 end=2021-08-31 --tres="gres/gpu"<br>
> > ><br>
> > --------------------------------------------------------------------------------<br>
> > > Cluster/Account/User Utilization 2021-05-01T00:00:00 -<br>
> > 2021-08-30T23:59:59 (10540800 secs)<br>
> > > Usage reported in TRES Minutes<br>
> > ><br>
> > --------------------------------------------------------------------------------<br>
> > >   Cluster         Account     Login     Proper Name      TRES Name<br>
> >  Used<br>
> > > --------- --------------- --------- --------------- --------------<br>
> > --------<br>
> > > ********       chemistry    j.mira          j.mira       gres/gpu<br>
> >  149434<br>
> > ><br>
> > > On Wed, Sep 1, 2021 at 5:27 PM Loris Bennett <<a href="mailto:loris.bennett@fu-berlin.de" target="_blank">loris.bennett@fu-berlin.de</a>><br>
> > wrote:<br>
> > ><br>
> > >  Dear Jeherul,<br>
> > ><br>
> > >  Jeherul Islam <<a href="mailto:jeherul@gmail.com" target="_blank">jeherul@gmail.com</a>> writes:<br>
> > ><br>
> > >  > Dear All,<br>
> > >  ><br>
> > >  > Please share the correct way of calculating the GPU usages.<br>
> > >  > I am confused with sreport and sacct cmd. I am getting a different<br>
> > result.<br>
> > >  ><br>
> > >  > # sreport cluster AccountUtilizationByUser cluster=**** user=j.mira<br>
> > start=2021-05-01 end=2021-08-31 --tres="gres/gpu"<br>
> > ><br>
> > >  Here you have:<br>
> > ><br>
> > >    end=2021-08-31<br>
> > ><br>
> > >  ><br>
> > --------------------------------------------------------------------------------<br>
> > >  > Cluster/Account/User Utilization 2021-05-01T00:00:00 -<br>
> > 2021-08-30T23:59:59 (10540800 secs)<br>
> > >  > Usage reported in TRES Minutes<br>
> > >  ><br>
> > --------------------------------------------------------------------------------<br>
> > >  >   Cluster         Account     Login     Proper Name      TRES Name<br>
> >  Used<br>
> > >  > --------- --------------- --------- --------------- --------------<br>
> > --------<br>
> > >  > ****       chemistry    j.mira          j.mira       gres/gpu<br>
> >  149434<br>
> > >  ><br>
> > >  > # sacct --account=chemistry<br>
> > --format=jobid,user,ElapsedRaw,state,AllocGRES,ncpus --starttime=2021-05-01<br>
> > --endtime=2021-08-01  | grep j.mira| grep gpu| awk '{sum += $3} END {print<br>
> > sum}'<br>
> > ><br>
> > >  whereas here you have<br>
> > ><br>
> > >    --endtime=2021-08-01<br>
> > ><br>
> > >  > 4957060<br>
> > >  ><br>
> > >  > Please share the correct way.<br>
> > >  ><br>
> > >  > With Thanks and regards<br>
> > ><br>
> > >  so, without having checked your sacct/awk logic I would not expect the<br>
> > results to be the same.<br>
> > ><br>
> > >  Cheers,<br>
> > ><br>
> > >  Loris<br>
> > ><br>
> > >  --<br>
> > >  Dr. Loris Bennett (Hr./Mr.)<br>
> > >  ZEDAT, Freie Universität Berlin         Email<br>
> > <a href="mailto:loris.bennett@fu-berlin.de" target="_blank">loris.bennett@fu-berlin.de</a><br>
> > --<br>
> > Dr. Loris Bennett (Hr./Mr.)<br>
> > ZEDAT, Freie Universität Berlin         Email <a href="mailto:loris.bennett@fu-berlin.de" target="_blank">loris.bennett@fu-berlin.de</a><br>
> ><br>
> ><br>
<br>
-- <br>
GPG A997BA7A | 87FC DA31 5F00 C885 0DC3  E28F BD0D 4B33 A997 BA7A<br>
<br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Jeherul Islam <br>Technical Officer Grade I <br></div><div>Data Centre and High Performance Computing<br></div><div>Computer Centre<br>Indian Institute of Technology Guwahati<br>Guwahati-39<br>India<br>Office No :+91-361-258-3353<br><br></div></div></div>