These days, all desktops easily have at least 4 or more cores. We can use Torque to continuously use all these for running jobs in a batch.
Here, we install Torque on a linux desktop, with eight cores. The desktop will act both as the torque server and also as the compute node on which computations are carried out.
Let us assume that we are trying to install it on the desktop with the fully qualified domain: bluesky.breezy.day. It is running openSuSE 13.2. So, the hostname would just be bluesky. Then, do the following.
Install all torque related stuff (torque-sever, torque-client, torque-mom, etc.) from here. They are listed as unstable.
Check the hostname. In my case, for some reason,
hostname -fwas not giving the fully qualified domain name bluesky.breezy.day, but just the hostnmame bluesky.
hostname bluesky hostname -f bluesky
Make sure that /etc/hosts has a line which lists the ip address of whatever you get for hostname in 1.
echo '18.104.22.168 bleusky' >> /etc/hosts
Create a serverdb file
pbs_server -t create
Create a nodes file
cat server_priv/nodes bluesky np=6 # np is the number of cores on the desktop that you want to use
Since, we are using the server also as the compute node, modify mom_priv/config. It should be:
cat mom_priv/config $pbsserver bluesky # hostname running pbs server $logevent 225 # bitmap of which events to log
Open up the ports for Torque in openSuSE firewall.
Enable pbs_server, pbs_mom and pbs_sched in Yast > System > Services in exactly the order listed. Enabling the pbs_server AFTER pbs_mom, will not result in the pbs_server starting properly.
Finally create a queue in which to run the jobs.
qmgr -c "set server scheduling=true" qmgr -c "create queue default queue_type=execution" qmgr -c "set queue default started=true" qmgr -c "set queue default enabled=true" qmgr -c "set queue default enabled=true" qmgr -c "set server default_queue=default"