pbsrun_wrap.8B 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. .\" Copyright (C) 1994-2018 Altair Engineering, Inc.
  2. .\" For more information, contact Altair at www.altair.com.
  3. .\"
  4. .\" This file is part of the PBS Professional ("PBS Pro") software.
  5. .\"
  6. .\" Open Source License Information:
  7. .\"
  8. .\" PBS Pro is free software. You can redistribute it and/or modify it under the
  9. .\" terms of the GNU Affero General Public License as published by the Free
  10. .\" Software Foundation, either version 3 of the License, or (at your option) any
  11. .\" later version.
  12. .\"
  13. .\" PBS Pro is distributed in the hope that it will be useful, but WITHOUT ANY
  14. .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  15. .\" FOR A PARTICULAR PURPOSE.
  16. .\" See the GNU Affero General Public License for more details.
  17. .\"
  18. .\" You should have received a copy of the GNU Affero General Public License
  19. .\" along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. .\"
  21. .\" Commercial License Information:
  22. .\"
  23. .\" For a copy of the commercial license terms and conditions,
  24. .\" go to: (http://www.pbspro.com/UserArea/agreement.html)
  25. .\" or contact the Altair Legal Department.
  26. .\"
  27. .\" Altair’s dual-license business model allows companies, individuals, and
  28. .\" organizations to create proprietary derivative works of PBS Pro and
  29. .\" distribute them - whether embedded or bundled with other software -
  30. .\" under a commercial license agreement.
  31. .\"
  32. .\" Use of Altair’s trademarks, including but not limited to "PBS™",
  33. .\" "PBS Professional®", and "PBS Pro™" and Altair’s logos is subject to Altair's
  34. .\" trademark licensing policies.
  35. .\"
  36. .TH pbsrun_wrap 8B "16 October 2017" Local "PBS Professional"
  37. .SH NAME
  38. .B pbsrun_wrap
  39. \- general-purpose script for wrapping mpirun in pbsrun
  40. .SH SYNOPSIS
  41. .B pbsrun_wrap
  42. [-s] <path to actual mpirun> pbsrun.<mpirun version/flavor>
  43. .B pbsrun_wrap
  44. --version
  45. .SH DESCRIPTION
  46. The
  47. .B pbsrun_wrap
  48. script is used to wrap any of several versions of mpirun in
  49. .B pbsrun.
  50. The
  51. .B pbsrun_wrap
  52. script creates a symbolic link with the same
  53. path and name as the mpirun being wrapped. This calls
  54. .B pbsrun,
  55. which uses
  56. .B pbs_attach
  57. to give MoM control of jobs. The result is transparent to the
  58. user;
  59. when mpirun is called from inside a
  60. PBS job,
  61. PBS can monitor and control the job, but when mpirun is called
  62. from outside of a PBS job, it behaves as it would normally.
  63. See the
  64. .B pbs_attach(8B)
  65. and
  66. .B pbsrun(8B)
  67. man pages.
  68. Use
  69. .B pbsrun_unwrap
  70. to reverse the process.
  71. Using
  72. .B pbsrun_wrap
  73. with Intel MPI is
  74. .B deprecated
  75. as of 13.0.
  76. .SH USAGE
  77. Syntax:
  78. .RS 5
  79. .B pbsrun_wrap
  80. [-s] <path to actual mpirun> pbsrun.<mpirun version/flavor>
  81. .RE
  82. Any mpirun version/flavor that can be wrapped has
  83. an initialization script ending in ".init",
  84. found in $PBS_EXEC/lib/MPI:
  85. .br
  86. .RS 5
  87. $PBS_EXEC/lib/MPI/pbsrun.<mpirun version/flavor>.init
  88. .RE
  89. The
  90. .B pbsrun_wrap
  91. script
  92. instantiates the
  93. .B pbsrun
  94. wrapper script as
  95. .B pbsrun.<mpirun version/flavor>
  96. in the same directory where
  97. .B pbsrun
  98. is located, and sets up the link to actual mpirun call via the symbolic link
  99. .RS 5
  100. $PBS_EXEC/lib/MPI/pbsrun.<mpirun version/flavor>.link
  101. .RE
  102. For example, running:
  103. .RS 5
  104. .B pbsrun_wrap
  105. /opt/mpich-gm/bin/mpirun.ch_gm pbsrun.ch_gm
  106. .RE
  107. causes the following actions:
  108. .RS 4
  109. Save original mpirun.ch_gm script:
  110. .RS 4
  111. .IP "mv" 4
  112. /opt/mpich-gm/bin/mpirun.ch_gm
  113. .br
  114. /opt/mpich/gm/bin/mpirun.ch_gm.actual
  115. .LP
  116. .RE
  117. Instantiate pbsrun wrapper script as pbsrun.ch_gm:
  118. .RS 4
  119. .IP "cp" 4
  120. $PBS_EXEC/bin/pbsrun $PBS_EXEC/bin/pbsrun.ch_gm
  121. .LP
  122. .RE
  123. Link "mpirun.ch_gm" to actually call "pbsrun.ch_gm":
  124. .RS 4
  125. .IP "ln -s" 6
  126. $PBS_EXEC/bin/pbsrun.ch_gm /opt/mpich-gm/bin/mpirun.ch_gm
  127. .LP
  128. .RE
  129. Create a link so that "pbsrun.ch_gm" calls "mpirun.ch_gm.actual":
  130. .RS 4
  131. .IP "ln -s" 6
  132. /opt/mpich-gm/bin/mpirun.ch_gm.actual
  133. $PBS_EXEC/lib/MPI/pbsrun.ch_gm.link
  134. .RE
  135. .RE
  136. .RE
  137. .SH OPTIONS
  138. .IP "-s" 5
  139. Sets the "strict_pbs" options in the various
  140. initialization scripts (e.g. pbsrun.bgl.init, pbsrun.ch_gm.init, etc...)
  141. to 1 from the default 0. This means that the mpirun being wrapped by
  142. pbsrun will only be executed if inside a PBS environment. Otherwise, the user
  143. gets the error:
  144. .RS
  145. .IP
  146. Not running under PBS
  147. exiting since strict_pbs is enabled; execute only in PBS
  148. .LP
  149. .RE
  150. .IP "--version" 5
  151. The
  152. .B pbsrun_wrap
  153. command returns its PBS version information and exits.
  154. This option can only be used alone.
  155. .SH REQUIREMENTS
  156. The mpirun being wrapped
  157. must be installed and working on all thev nodes in the PBS complex.
  158. .SH SEE ALSO
  159. The
  160. .B PBS Professional Administrator's Guide
  161. .LP
  162. pbs_attach(8B),
  163. pbsrun(8B),
  164. pbsrun_unwrap(8B)