Thursday, October 2, 2014

Installing TORQUE and Maui on a Rocks Cluster

Download Torque:
  1. http://www.adaptivecomputing.com/download/torque/torque-5.0.0-1_43d8f09a.tar.gz
Download Maui
  1. http://www.adaptivecomputing.com/download/mauischeduler/maui-3.3.1.tar.gz
  2. NOTE: You will need an account to download maui from adaptivecomputing.com

Install Torque:

On the RocksCluster Headnode - 
  1. As root move to the directory containing the tar files for torque.
  2. Execute the following commands to change the folder/package name
    1. Copy torque-5.0.0-1_43d8f09a.tar.gz to /tmp and extract
      1. tar xvf torque-5.0.0-1_43d8f09a.tar.gz
      2. mv torque-5.0.0-1_43d8f09a torque-5.0.0
      3. tar czvf torque-5.0.0.tar.gz torque-5.0.0
      4. rm -rf torque-5.0.0-1_43d8f09a torque-5.0.0
      5. tar xvf torque-5.0.0.tar.gz
    2. yum --enablerepo=base install boost-devel
    3. cd ./torque-5.0.0
    4. ./configure
    5. make
    6. make install
    7. cp contrib/init.d/trqauthd /etc/init.d/
    8. cp contrib/init.d/pbs_server /etc/init.d/
    9. chkconfig --add trqauthd
    10. chkconfig --add pbs_server
    11. echo /usr/local/lib > /etc/ld.so.conf.d/torque.conf
    12. ldconfig
    13. service trqauthd start
  3. Verify /var/spool/torque/server_name exists with the server hostname
  4. Run Torque.Setup
    1. ./torque.setup root 
    2. qterm
    3. pbs_server
    4. qmgr -c 'p s'
  5. Make client packages
    1. Install rpmbuild 
      1. yum --enablerepo=base install rpmdevtools rpmlint
      2. Switch to a regular user account and run
        1. rpmdev-setuptree
    2.  Build Torque RPMS
      1. Switch to a regular user account and run
        1. rpmbuild -tb /tmp/torque-5.0.0.tar.gz
    3. Switch to root and run move the following RPMS from /state/partition1/home/<user_name>/rpmbuild/RPMS/x86_64/ to /export/rocks/install/contrib/6.1.1/x86_64/RPMS
      1. torque-5.0.0-1.adaptive.el6.x86_64.rpm
      2. torque-client-5.0.0-1.adaptive.el6.x86_64.rpm
    4. Create extend-compute.xml
      1. In the /export/rocks/install/site-profiles/6.1.1/nodes run the following
        1. cp skeleton.xml extend-compute.xml
      2. Edit the extend-compute.xml file
        1. In the packages section add
          1. <package>torque</package>
          2. <package>torque-client</package>
        2. In the post section add
          1. echo <your_hostname.local> > /var/spool/torque/server_name
          2. echo <your_hostname.yourdomain> > /var/spool/torque/mom_priv/config
    5. Create distro
      1. cd to /export/rocks/install
      2. Run the following
        1. rocks create distro
Install Maui:
  1. As root move to the directory containing the tar files for maui.
  2. Execute the following commands
    1. tar xvf maui.3.3.1.tar.gz
    2. cd maui.3.3.1
    3. ./configure
    4. make 
    5. make install
  3. Move the following files
    1. mv /usr/local/maui/sbin/* /usr/local/sbin
    2. mv /usr/local/maui/bin/* /usr/local/bin
    3. rmdir /usr/local/maui/sbin /usr/local/maui/bin
    4. cp /tmp/maui-3.3.1/etc/maui.d /etc/init.d/maui
  4. Verify the following
    1. /etc/init.d/maui
      1. MAUI_PREFIX=/usr/local
  5. Run the following
    1. chkconfig --add maui
    2. service maui start
  6. Reboot the head node
Provision Compute Nodes:
      1. Follow compute node provisioning from Installing Rocks Cluster
      2. Run the following for each node
        1. qmgr -c 'create node compute-<x-x>.local np=<number_of_processors>'
        2. pbsnodes -c <compute-<x-x>.local
      3. Reboot the head node then compute nodes
      Create Test Job:
      1. As a user create a test job called sleep.job with execute permissions and the following text inside
      #!/bin/sh
      for i in `seq 1 60` ; do
              echo $i
              sleep 1
      done
      Run Test Job:

      1. Run the following 
        1. qsub sleep.job
      2. Executing qstat should show the job in the queue
      3. As root diagnose -n / pbsnodes -a should both show the nodes
      4. After ~1 Min the files sleep.job.e<job_number> and sleep.job.o<job_number> should appear in the same directory sleep.job is located in.
        1. sleep.job.e<job_number> should be empty
        2. sleep.job.o<job_number> should have seq 1 60 in it