Dear Chris,

       Thanks a lot for your reply. However, it's not what I want to get.
For the example of Job 6449483, it is allocated with only one node, what if
it was allocated with multiple nodes? I'd like to get the accounting
statistics about how many CPUs/GPUs separately on each node, but not the
sum number on all nodes.

       For example, I submit a job with the following cmd:

[root@slurm01 ~]# sbatch  --gres=gpu:4 --ntasks=26 --wrap="sleep 300"

Submitted batch job 61

      And if I use the sacct cmd with the options you mentioned, it gets:

[root@slurm01 ~]# sacct -j 61 -o
jobid%20,jobname,alloccpus,allocgres,nodelist%20,nnodes%10

               JobID    JobName  AllocCPUS    AllocGRES
 NodeList     NNodes

 -------------------        ----------        ----------
 ------------            --------------------      ----------

                    61             wrap               26             gpu:8
        junogpu[001-002]               2

     I would like to know how many CPUs/GPUs allocated on junogpu001 and on
junogpu002 separately, but sacct only returns how many CPUs/GPUs allocated
on junogpu[001-002] in total.

     Do you have any other tools or log files I can check to get separate
number of CPUs/GPUs allocated on each node? Thanks a lot.

Best Regards,

Ran

On Wed, Nov 9, 2016 at 6:44 AM, Christopher Samuel <[email protected]>
wrote:

>
> On 08/11/16 19:23, Ran Du wrote:
>
> >        I am working on an accounting system to get a summary about how
> > many cpus/gpus per node has been allocated to a specific job. However,
> > all I can get from slurmdbd database is the total cpus/gpus allocated
> > for a job, but not cpus/gpus allocated from each node. Does anyone know
> > how to get these accounting information?
>
> How is this?
>
> $ sacct -j 6449483 -o jobid%20,jobname,alloccpus,allocgres
>                JobID    JobName  AllocCPUS    AllocGRES
> -------------------- ---------- ---------- ------------
>              6449483       wrap          6        mic:1
>        6449483.batch      batch          6        mic:1
>       6449483.extern     extern          6        mic:1
>
> That's just a single node job asking for 6 cores and 1 MIC (KNC) card.
>
> If you wanted more details you can use AllocTRES instead:
>
> [samuel@barcoo Slurm]$ sacct -j 6449483 -o jobid%20,jobname,alloctres%20,
> allocgres
>                JobID    JobName            AllocTRES    AllocGRES
> -------------------- ---------- -------------------- ------------
>              6449483       wrap  cpu=6,mem=4G,node=1        mic:1
>        6449483.batch      batch  cpu=6,mem=4G,node=1        mic:1
>       6449483.extern     extern  cpu=6,mem=4G,node=1        mic:1
>
>
> All the best,
> Chris
> --
>  Christopher Samuel        Senior Systems Administrator
>  VLSCI - Victorian Life Sciences Computation Initiative
>  Email: [email protected] Phone: +61 (0)3 903 55545
>  http://www.vlsci.org.au/      http://twitter.com/vlsci
>

Reply via email to