Notes on Torque Portable Batch System
This article simply holds my notes on the Torque Portable Batch System, a process manager that I use daily to balance the load on the my computers.
Sections
Change number of processors for a node
First take the node offline using the commands below. Then run the qmgr command to edit the number of processor on the node you like:
sudo qmgr -c "set node nodename np=number_of_processors"
In the above command you need to replace nodename with the name of your node, and the number_of_processors with the number you like. Don't forget to bring the node online.
Take a node offline
To take a node offline for maintenance can be done using the pbsnodes command:
sudo pbsnodes -o nodename
Once maintenance is complete you can bring the node back online using:
sudo pbsnodes -r nodename
You can of course check the node state with:
pbsnodes -a
The -r flag will reset the flags and set the node as down. If the server can communicate correctly with the server it will change the state to free.
Delete all jobs
I use the following bash script to delete all the jobs I (${USER}) created. Might not be the best way, or might not even work in all cases. I am not sure if it works on a node, I always run it on the head-node.
#!/bin/bash # DELETE ALL running TORQUE PBS jobs by the USER. for job in `qstat | grep ${USER} | awk '{print $1;}'`; do qdel ${job}@${HOSTNAME}; done
Modify attributes of an already running job
All my jobs are created with a maximum walltime, to free the resources from never ending jobs. However sometimes the jobs need a little more time to finish. In such cases one can use the following command to modify the job attributes:
sudo qalter -l walltime=96:00:00 jobid.host@hostname
At the above command, the qalter command updates the walltime attribute of the given jobid on the hostname. Of course you will have to change these with the job and hostname for your system.
Create a job from the command line
Coming soon. I have the script ready but needs to be cleaned up a bit. If you need it feel free to contact me and I'll email it to you.
References
|