- Linux: RHEL 5.4
- Torque: 2.5.5
- decompress
[root@server ~]tar -xzvf torque-2.5.5.tar.gz
[root@server ~]cd torque-2.5.5
- configure
[root@server torque-2.5.5]./configure --prefix=/opt/torque-2.5.5
- install
[root@server torque-2.5.5]make
[root@server torque-2.5.5]make install
Install TORQUE on compute nodes
- make packages on server
[root@server torque-2.5.5]make packages
- scp *clients*.sh and *mom*.sh to compute nodes
[root@server torque-2.5.5]scp *clients*.sh *mom*.sh root@node:~/
- install on compute nodes
[root@node ~]./torque-package-clients-linux-x86_64.sh --install
[root@node ~]./torque-package-mom-linux-x86_64.sh --install
Configure Torque on the server node
- modify enviromental variables, add the content below to /etc/profile
- ref: http://scc.qibebt.cas.cn/docs/linux/base/%D7%CA%D4%B4%B9%DC%C0%ED%C8%ED%BC%FETORQUE%D3%EB%D7%F7%D2%B5%B5%F7%B6%C8%C8%ED%BC%FEMaui%B5%C4%B0%B2%D7%B0%A1%A2%C9%E8%D6%C3%BC%B0%CA%B9%D3%C3.pdf
TORQUE=/opt/torque2.2.5
if [ ”`id u`” -eq 0 ]; then
PATH=”/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:”
PATH=$PATH:$TORQUE/bin:$TORQUE/sbin:$MAUI/bin:
else
PATH=”/usr/local/bin:/usr/bin:/bin:/usr/games:$TORQUE/bin”
PATH=$PATH:$TORQUE/bin
fi
- take effect
[root@server torque-2.5.5]source /etc/profile
- set a user as a administrator, here set [root] as the administrator
[root@server torque-2.5.5]./torque.setup root
- specify compute nodes, add copute nodes compute ability to /var/spool/torque/server_priv/nodes
node1 np=12
node2 np=12
- create torque server
[root@server torque-2.5.5]pbs_server -t create
- configure torque server
- ref: http://wenku.baidu.com/view/06d7cbce0508763231121265.html
- submit_host: a node or nodes which can be able to submit jobs
- resources_default.walltime: the max time a job can running at mmost
- query_other_jobs: whether a user can query other users' jobs
[root@server torque-2.5.5]qmgr -c 'set server submit_hosts=server'
[root@server torque-2.5.5]qmgr -c 'set queue batch resources_default.walltime=604800'
[root@server torque-2.5.5]qmgr -c ' set server query_other_jobs=TRUE'
Configure Torque on a compute node
- at the normal conditon, there is no need to configure the compute nodes
- if sth goes wrong, check /var/spool/torque/mom_priv/config(ref: http://scc.qibebt.cas.cn/docs/linux/base/%D7%CA%D4%B4%B9%DC%C0%ED%C8%ED%BC%FETORQUE%D3%EB%D7%F7%D2%B5%B5%F7%B6%C8%C8%ED%BC%FEMaui%B5%C4%B0%B2%D7%B0%A1%A2%C9%E8%D6%C3%BC%B0%CA%B9%D3%C3.pdf)
Launch TORQUE
- on compute nodes
[root@node ~]/opt/torque-2.5.5/sbin/pbs_mom
- on the server, launch torque server and scheduler
[root@server ~]qterm
[root@server ~]pbs_server
[root@server ~]pbs_sched
Check TORQUE
- check compute nodes state
[root@server ~]qnodes
- check queue state
[root@server ~]qstat -q
- check job state in a queue or queues
[root@server ~]qstat
- check recent job specific
[root@server ~]qstat -f
Submit a job
- when submint a job, must su to a non-root user.
- submit a simple job
[user@server ~]echo "sleep 30; hostname" | qsub
- submit a MPI job, take the default example - cpi
[user@server ~]vi test.pbs
- the content of test.pbs is:
- use the complete path of mpiexec and cpi
#PBS -N [job name]
#PBS -l nodes=[nodes count to be needed]
cd $PBS_O_WORKDIR
/home/mpich2-1.4.1p1/bin/mpiexec -np 6 /home/user/cpi
- submit a MPI job
[user@server ~]qsub test.pbs