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:
## 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