Select no of cores without nodes and ppn


#1

Hi all,

i want to select only the no of cores to be used instead of both the ppn and node.

Can anyone let me know how can i change the parameters in my job submission script.

Thanks,
ANS


#2

The below statement can be used to submit jobs requesting only number of cores, but number of chunks would depend on the default_chunks set at the server level.
qsub -l ncpus=10 – /bin/sleep 10 # this would be scheduled on to a node which has 10 free cores.

The PBS Pro OSS , qsub chunk request system is as below (ppn and nodes are no more used )

qsub -l select=<number_of_chunks>:ncpus=:mem<memory_per_chunk> -l place=

Please check the below section from the https://www.pbsworks.com/pdfs/PBS18.2.3_BigBook.pdf
5.4.8 Platform-specific vs. Generally Available Resources


#3

Hi Adarsh,

Thank you for the reply.

I have used the below script
#!/bin/bash
#PBS -N test
#PBS -S /bin/bash
#PBS -q workq
#$#PBS -l nodes=2:ppn=5
#PBS -l select=1:ncpus=10
#PBS -j oe
cd $PBS_O_WORKDIR
NP=cat $PBS_NODEFILE | wc -l
mpirun -np ${NP} gmx_mpi mdrun -v -s md.tpr

But the job is being executed on single core.
After changing select=2 also still it is running only on 1 core.

Can you help me out.

Thanks,
ANS


#4

ANS,

Please use the below script

#!/bin/bash
#PBS -N test
#PBS -S /bin/bash
#PBS -q workq
#PBS -l select=2:ncpus=5
#PBS -l place=scatter
#PBS -j oe
cd $PBS_O_WORKDIR
NP= `cat PBS_NODEFILE | wc -l\` mpirun -np {NP} gmx_mpi mdrun -v -s md.tpr

Note:

  1. mpirun path is set or same across the compute nodes
  2. the above script is run from a shared location accessible by all the nodes and the user running this script
  3. Please use absolute path in the script , unless there are no more than one flavour of mpirun (Intel/OpenMPI/Platformmpi)
  4. it the mpi is not integrated with PBS (compiling the mpi with PBS TM from source, then you might have use -hostfile or -machinefile pointing to $PBS_NODEFILE in the batch command line

Thank you


#5

Thank you.

But again we are mentioning the nodes and cpus in different way here.
select=2:ncpus=5 instead of nodes=2:ppn=5

But i require to mention only no of cores, some thing similar to SGE script where we will mention only the no of core.

Thanks,
ANS


#6

Ans,

PBS syntax has been select/ncpus/mem (if i remember correctly since PBS Pro 11.x)
You can submit job as below

qsub -l ncpus=10 -- /bin/sleep

But the number of chunks (select bit) would be used from the server attribute default_chunk.ncpus. So you would be always requesting one chunk.

On the other hand:

  • you can write a queuejob hook that will convert the requested ncpus into select/ncpus/mem statement
    say you request
    qsub -l ncpus=120 -- /bin/sleep 100
    The queuejob hook will compose the select statement (based on some logic)
    qsub -l select=6:ncpus=20 -- /bin/sleep 100

Correction: (Thank you @agurban for this information)
PBS converts old-style resource requests to select and place statements.
See the 18.2 UG, section 4.8.3, "Conversion of Old Style to New", on page UG-70.