INSTALL 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. --------------------------------------------------------------------
  2. How to install PBS Pro using the configure script.
  3. 1. Install the prerequisite packages for building PBS Pro.
  4. For CentOS systems you should run the following command as root:
  5. yum install -y gcc make rpm-build libtool hwloc-devel \
  6. libX11-devel libXt-devel libedit-devel libical-devel \
  7. ncurses-devel perl postgresql-devel postgresql-contrib python-devel tcl-devel \
  8. tk-devel swig expat-devel openssl-devel libXext libXft \
  9. autoconf automake
  10. For openSUSE systems you should run the following command as root:
  11. zypper install gcc make rpm-build libtool hwloc-devel \
  12. libX11-devel libXt-devel libedit-devel libical-devel \
  13. ncurses-devel perl postgresql-devel postgresql-contrib python-devel tcl-devel \
  14. tk-devel swig libexpat-devel libopenssl-devel libXext-devel \
  15. libXft-devel fontconfig autoconf automake
  16. For Debian systems you should run the following command as root:
  17. sudo apt-get install gcc make libtool libhwloc-dev libx11-dev \
  18. libxt-dev libedit-dev libical-dev ncurses-dev perl \
  19. postgresql-server-dev-all postgresql-contrib python-dev tcl-dev tk-dev swig \
  20. libexpat-dev libssl-dev libxext-dev libxft-dev autoconf \
  21. automake
  22. 2. Install the prerequisite packages for running PBS Pro. In addition
  23. to the commands below, you should also install a text editor of
  24. your choosing (vim, emacs, gedit, etc.).
  25. For CentOS systems you should run the following command as root:
  26. yum install -y expat libedit postgresql-server postgresql-contrib python \
  27. sendmail sudo tcl tk libical
  28. For openSUSE systems you should run the following command as root:
  29. zypper install expat libedit postgresql-server postgresql-contrib python \
  30. sendmail sudo tcl tk libical1
  31. For Debian systems you should run the following command as root:
  32. apt-get install expat libedit2 postgresql python postgresql-contrib sendmail-bin \
  33. sudo tcl tk libical1a
  34. 3. Open a terminal as a normal (non-root) user, unpack the PBS Pro
  35. tarball, and cd to the package directory.
  36. tar -xpvf pbspro-19.1.3.tar.gz
  37. cd pbspro-19.1.3
  38. 4. Generate the configure script and Makefiles. (See note 1 below)
  39. ./autogen.sh
  40. 5. Display the available build parameters.
  41. ./configure --help
  42. 6. Configure the build for your environment. You may utilize the
  43. parameters displayed in the previous step. (See note 2 below)
  44. For CentOS and Debian systems you should run the following
  45. command:
  46. ./configure --prefix=/opt/pbs
  47. For openSUSE systems (see note 3 below) you should run the
  48. following command:
  49. ./configure --prefix=/opt/pbs --libexecdir=/opt/pbs/libexec
  50. If PTL needs to be installed along with pbspro use the option
  51. "--enable-ptl" (see note 5 below)
  52. eg ./configure --prefix=/opt/pbs --enable-ptl
  53. 7. Build PBS Pro by running "make". (See note 4 below)
  54. make
  55. 8. Configure sudo to allow your user account to run commands as
  56. root. Refer to the online manual pages for sudo, sudoers, and
  57. visudo.
  58. 9. Install PBS Pro. Use sudo to run the command as root.
  59. sudo make install
  60. 10. Configure PBS Pro by executing the post-install script.
  61. sudo /opt/pbs/libexec/pbs_postinstall
  62. 11. Edit /etc/pbs.conf to configure the PBS Pro services that
  63. should be started. If you are installing PBS Pro on only
  64. one system, you should change the value of PBS_START_MOM
  65. from zero to one. If you use vi as your editor, you would
  66. run:
  67. sudo vi /etc/pbs.conf
  68. 12. Some file permissions must be modified to add SUID privilege.
  69. sudo chmod 4755 /opt/pbs/sbin/pbs_iff /opt/pbs/sbin/pbs_rcp
  70. 13. Start the PBS Pro services.
  71. sudo /etc/init.d/pbs start
  72. 14. All configured PBS services should now be running. Update
  73. your PATH and MANPATH variables by sourcing the appropriate
  74. PBS Pro profile or logging out and back in.
  75. For Bourne shell (or similar) run the following:
  76. . /etc/profile.d/pbs.sh
  77. For C shell (or similar) run the following:
  78. source /etc/profile.d/pbs.csh
  79. 15. You should now be able to run PBS Pro commands to submit
  80. and query jobs. Some examples follow.
  81. bash$ qstat -B
  82. Server Max Tot Que Run Hld Wat Trn Ext Status
  83. ---------------- ----- ----- ----- ----- ----- ----- ----- ----- -----------
  84. host1 0 0 0 0 0 0 0 0 Active
  85. bash$ pbsnodes -a
  86. host1
  87. Mom = host1
  88. ntype = PBS
  89. state = free
  90. pcpus = 2
  91. resources_available.arch = linux
  92. resources_available.host = host1
  93. resources_available.mem = 2049248kb
  94. resources_available.ncpus = 2
  95. resources_available.vnode = host1
  96. resources_assigned.accelerator_memory = 0kb
  97. resources_assigned.mem = 0kb
  98. resources_assigned.naccelerators = 0
  99. resources_assigned.ncpus = 0
  100. resources_assigned.vmem = 0kb
  101. resv_enable = True
  102. sharing = default_shared
  103. license = l
  104. bash$ echo "sleep 60" | qsub
  105. 0.host1
  106. bash$ qstat -a
  107. host1:
  108. Req'd Req'd Elap
  109. Job ID Username Queue Jobname SessID NDS TSK Memory Time S Time
  110. --------------- -------- -------- ---------- ------ --- --- ------ ----- - -----
  111. 0.host1 mike workq STDIN 2122 1 1 -- -- R 00:00
  112. bash$
  113. --------------------------------------------------------------------
  114. NOTES:
  115. Note 1: If you modify configure.ac or adjust timestamps on any files
  116. that are automatically generated, you will need to regenerate them
  117. by re-running autogen.sh.
  118. Note 2: It is advisable to create a simple shell script that calls
  119. configure with the appropriate options for your environment. This
  120. ensures configure will be called with the same arguments during
  121. subsequent invocations. If you have already run configure you can
  122. regenerate all of the Makefiles by running "./config.status".
  123. The first few lines of config.status will reveal the options that
  124. were specified when configure was run. If you set envirnment
  125. variables such as CFLAGS it is best to do so as an argument to
  126. configure (e.g. ./configure CFLAGS="-O0 -g" --prefix=/opt/pbs).
  127. This will ensure consistency when config.status regenerates the
  128. Makefiles.
  129. Note 3: The openSUSE rpm package expands %_libexecdir to /opt/pbs/lib
  130. rather than /opt/pbs/libexec which causes problems for the post-
  131. install scripts. Providing the --libexecdir value to configure
  132. overrides this behavior.
  133. Note 4: You need to use a POSIX (or nearly POSIX) make. GNU make
  134. works quite well in this regard; BSD make does not. If you are
  135. having any sort of build problems, your make should be a prime
  136. suspect. Tremendous effort has been expended to provide proper
  137. dependency generation and makefiles without relying on any
  138. non-POSIX features. The build should work fine with a simple call
  139. to make, however, complicating things by using various make flags
  140. is not guaranteed to work. Don't be surprised if the first thing
  141. that make does is call configure again.
  142. Note 5: PTL gets installed in the parent directory of where PBS Professional
  143. is installed. For example if you have given install prefix=/opt/pbs, then
  144. you can find PTL installation in the directory /opt/ptl . You may need to
  145. log out and log in from the terminal for PATH and PYTHONPATH to update.
  146. Using valgrind with PBS Professional.
  147. -------------------------------------
  148. Here is a set of steps to detect memory errors/leaks within PBS code.
  149. 1. Install the valgrind development package.
  150. yum install valgrind-devel (zypper for OpenSUSE).
  151. 2. Compile Python in a way that valgrind can work with it, as follows:
  152. ./configure --prefix=<installdir> --without-pymalloc --with-pydebug --with-valgrind
  153. make; make install
  154. 3. Compile PBS Professional with the special python and in debug mode as follows:
  155. ./configure --prefix=<installdir> --with-python=<python-dir> CFLAGS="-g -DPy_DEBUG -DDEBUG -Wall -Werror"
  156. 4. Run pbs daemons under valgrind.
  157. a) To detect memory errors (not leaks) run pbs daemons as follows:
  158. export LD_LIBRARY_PATH=/opt/pbs/pgsql/lib:/opt/pbs/lib:$LD_LIBRARY_PATH
  159. valgrind --tool=memcheck --log-file=/tmp/val.out /opt/pbs/sbin/pbs_server.bin
  160. b) To detect memory leaks use the supplied leaks suppression file valgrind.supp, as follows:
  161. export LD_LIBRARY_PATH=/opt/pbs/pgsql/lib:/opt/pbs/lib:$LD_LIBRARY_PATH
  162. valgrind --tool=memcheck --log-file=/tmp/val.out --suppressions=./valgrind.supp --leak-check=full --track-origins=yes /opt/pbs/sbin/pbs_server.bin