pbs_submit.3B 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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 pbs_submit 3B "3 March 2015" Local "PBS Professional"
  37. .SH NAME
  38. pbs_submit - submit a PBS batch job
  39. .SH SYNOPSIS
  40. #include <pbs_error.h>
  41. .br
  42. #include <pbs_ifl.h>
  43. .sp
  44. .B char *pbs_submit(\^int\ connect, struct\ attropl\ *attrib,
  45. .B char\ *script,
  46. .br
  47. .B\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ char\ *destination, char\ *extend)
  48. .SH DESCRIPTION
  49. Issue a batch request to submit a new batch job.
  50. .LP
  51. A
  52. .I "Queue Job"
  53. batch request is generated and sent to the server over the connection
  54. specified by
  55. .I connect
  56. which is the return value of \f3pbs_connect\f1().
  57. The job will be submitted to the queue specified by
  58. .I destination .
  59. .LP
  60. The parameter,
  61. .I attrib ,
  62. is a list of
  63. .I attropl
  64. structures which is defined in pbs_ifl.h as:
  65. .sp
  66. .Ty
  67. .nf
  68. struct attrl {
  69. char *name;
  70. char *resource;
  71. char *value;
  72. struct attrl *next;
  73. enum batch_op op;
  74. };
  75. .fi
  76. .sp
  77. The
  78. .I attrib
  79. list is terminated by the first entry where
  80. .I next
  81. is a null pointer.
  82. .LP
  83. The
  84. .I name
  85. member points to a string which is the name of the attribute. The
  86. .I value
  87. member points to a string which is the value of the attribute.
  88. The attribute names are defined in pbs_job_attributes(7B).
  89. .br
  90. .LP
  91. If an attribute is not named in the
  92. .I attrib
  93. array, the default action will be taken. It will either be assigned
  94. the default value or will not be passed with the job. The action
  95. depends on the attribute.
  96. If
  97. .I attrib
  98. itself is a null pointer, then the default action will be taken for
  99. each attribute.
  100. .LP
  101. Associated with an attribute of type ATTR_l (the letter ell)
  102. is a resource name indicated by
  103. .I resource
  104. in the
  105. .I attrl
  106. structure.
  107. All other attribute types should have a pointer to a null string for
  108. .I resource .
  109. .LP
  110. The
  111. .I op
  112. member is forced to a value of
  113. .I SET
  114. by pbs_submit().
  115. .LP
  116. The parameter,
  117. .I script ,
  118. is the path name to the job script. If the path name is relative, it will
  119. be expanded to the processes current working directory. If
  120. .I script
  121. is a null pointer or the path name pointed to
  122. is specified as the null string, no script is passed with the job.
  123. .LP
  124. The
  125. .I destination
  126. parameter specifies the destination for the job. It is specified as:
  127. .RS 4
  128. .I [queue]
  129. .RE
  130. If
  131. .I destination
  132. is the null string or the queue is not specified, the destination will be
  133. the default queue at the connected server.
  134. .LP
  135. The parameter,
  136. .I extend ,
  137. is reserved for implementation-defined extensions.
  138. .LP
  139. The return value is a character string which is the
  140. .I job_identifier
  141. assigned to the job by the server.
  142. The space for the
  143. .I job_identifier
  144. string is allocated by \f3pbs_submit\f1()
  145. and should be released via a call to \f3free\f1()
  146. by the user when no longer needed.
  147. .SH "SEE ALSO"
  148. qsub(1B) and pbs_connect(3B)
  149. .SH DIAGNOSTICS
  150. When the batch request generated by pbs_submit()
  151. function has been completed successfully by a batch server, the routine will
  152. return a pointer to a character string which is the job identifier of the
  153. submitted batch job.
  154. Otherwise, a null pointer is returned and the error code is set in pbs_error.