How to query the number of available cores to your job


#1

Dear folks I was wondering if it would be possible to let me know how to query the number of available jobs to your batch job after you’ve set up your nodes with something like #PBS -l nodes=3,cores=24.

I know there’s pbsnodes -a but I’m not sure if there anything like pbscores I’m expecting to return the number of nodes that I’ve requested for this particular job which is 24.

Thanks!


#2

Please note the syntax: nodes and cores are old syntax, please update your scripts to use select,ncpus,mem,mpiprocs etc.

#PBS -l select=3:ncpus=24
Which means you are requested 1 chunk with 24 cores .
In total you are requesting 72 cores for this job.

Please follow the quick start guide : https://www.pbsworks.com/pdfs/PBSQuickStartGuide18.2.pdf

The below commands might also help you to get the information you need:

  1. pbsnodes -aSj
  2. qstat -fx jobid
  3. qstat -answ1

#3

Thank you so much for the response and the link. I’ll definitely have a good look at them. I was wondering if you could point me out to a similar guide or material which shows how to use spark with PBS?


#4

pbsnodes -aSj seems to be an invalid commnad

-bash-4.1$ pbsnodes -aSj
pbsnodes: invalid option – ‘S’
pbsnodes: invalid option – ‘j’
usage: pbsnodes [-{c|d|l|o|p|r}] [-s server] [-n] [-N “note”] [-A “append note”] [-q] [-m standby|suspend|sleep|hibernate|shutdown] node …
pbsnodes [-{a|x}] [-s server] [-q] [node]


#5

Please note the command is valid for PBS Pro OSS . Please share the version of the PBS Pro you are running.

This is what i see on my system :

> root@pbsserver ~]# pbsnodes -aSj
>                                                         mem       ncpus   nmics   ngpus
> vnode           state           njobs   run   susp      f/t        f/t     f/t     f/t   jobs
> --------------- --------------- ------ ----- ------ ------------ ------- ------- ------- -------
> cn1     state-unknown        0     0      0      0kb/0kb     0/0     0/0     0/0 --
> cn2     state-unknown        0     0      0      0kb/0kb     0/0     0/0     0/0 --
> cn3         free                 0     0      0    23gb/23gb     4/4     0/0     2/2 --
> 
> [root@pbsserver ~]# pbsnodes --version
> pbs_version = 18.1.0