Operation system: CentOS 7.3

Torque PBS: torque-6.1.1.1.tar

hostname: rfmlab

user name: cfd01

1. Installation

$ tar -zxvf torque-6.1.1.1.tar

$ yum install -y libxml2-devel openssl-devel gcc gcc-c++ boost-devel libtool

$ cd torque-6.1.1.1

$ ./configure --prefix=/usr/local/torque --with-scp --with-default-server=rfmlab

$ make

$ make install

$ make packages

## After above command, there may be a warning about "libtool --finish", run it

$ libtool --finish /...

2. Configure pbs service: pbs_server, pbs_sched, pbs_mom, trqauthd

$ cp contrib/init.d/{pbs_{server,sched,mom},trqauthd} /etc/init.d/

$ for i in pbs_server pbs_sched pbs_mom trqauthd; do chkconfig --add $i; chkconfig $i on; done

## Set environment variable

$ TORQUE=/usr/local/torque

$ echo "TORQUE=$TORQUE" >> /etc/profile

$ echo "export PATH=\$PATH:$TORQUE/bin:$TORQUE/sbin" >> /etc/profile

$ source /etc/profile

## Set the manager user for TORQUE, not root user

$ ./torque.setup cfd01

## Start the services of pbs_server, pbs_sched, pbs_mom and trqauthd

$ qterm

$ for i in pbs_server pbs_sched pbs_mom trqauthd; do service $i start; done

3. Assign computational node

## Add computing node "rfmlab", set the number of CPU

## Check the number of CPU by using the command “lscpu" or "nproc"

$ vi /var/spool/torque/server_priv/nodes

rfmlab np=40

$ vi /var/spool/torque/mom_priv/config

pbsserver rfmlab

logevent 255

4. Check the information of pbs

$ ps -e | grep pbs

$ for i in pbs_server pbs_sched pbs_mom trqauthd; do service $i restart; done

## Check the node information, if "state= free", then everything is fine

$ qnodes  ## or use "pbsnodes -a"

4. Create default information of the queue

$ qmgr -c 'create queue rfmlab'

$ qmgr -c 'set queue rfmlab queue_type= execution'

$ qmgr -c 'set queue rfmlab started= true'

$ qmgr -c 'set queue rfmlab enabled= true'

$ qmgr -c 'set queue rfmlab resources_default.walltime= 240:00:00'

$ qmgr -c 'set queue rfmlab resources_default.nodes= 1'

$ qmgr -c 'set server default_queue= rfmlab'

5. Test

## Return back to the "cfd01" user

$ su cfd01

$ qstat

NOTES:

(1) ## start, stop and status of the pbs

$ for i in pbs_server pbs_sched pbs_mom trqauthd; do service $i start; done

$ for i in pbs_server pbs_sched pbs_mom trqauthd; do service $i stop; done

$ for i in pbs_server pbs_sched pbs_mom trqauthd; do service $i status; done

(2) Queue configuration

max_queuable: Specifies the maximum number of jobs allowed in the queue at any given time (includes idle, running, and blocked jobs).

$ qmgr -c "set queue batch max_queuable=20"

max_running: Specifies the maximum number of jobs in the queue allowed to run at any given time.

$ qmgr -c "set queue batch max_running=20"

max_user_queuable: Specifies the maximum number of jobs, per user, allowed in the queue at any given time (includes idle, running, and blocked jobs). Version 2.1.3 and greater.

$ qmgr -c "set queue batch max_user_queuable=20"

max_user_run: Specifies the maximum number of jobs, per user, in the queue allowed to run at any given time.

$ qmgr -c "set queue batch max_user_run=20"

priority: Specifies the priority value associated with the queue. Default value is "0".

$ priority: qmgr -c "set queue batch priority=20"

Website: http://docs.adaptivecomputing.com/torque/archive/3-0-2/4.1queueconfig.php

05-06 20:11