pbs_rescreserve.3B 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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_rescreserve 3B "13 Sept 2011" Local "PBS Professional"
  37. .SH NAME
  38. pbs_rescreserve, pbs_rescrelease - reserve/free batch resources
  39. .SH SYNOPSIS
  40. #include <pbs_error.h>
  41. .br
  42. #include <pbs_ifl.h>
  43. .sp
  44. .B int pbs_rescreserve\^(\^int\ connect, char\ **resourcelist,
  45. .B int arraysize, resource_t *resource_id\^)
  46. .sp
  47. .B int pbs_rescrelease\^(\^int connect, resource_t resource_id\^)
  48. .SH DESCRIPTION
  49. .HP 2
  50. .B pbs_rescreserve
  51. .br
  52. Issue a request to the batch server to reserve specified resources.
  53. .I connect
  54. is the connection returned by \f3pbs_connect\fP().
  55. .I resourcelist
  56. is an array of one or more strings specifying the resources to be queried.
  57. .I arraysize
  58. is the is the number of strings in resourcelist.
  59. .I resource_id
  60. is a pointer to a resource handle.
  61. The pointer cannot be null.
  62. If the present value of the resource handle is
  63. .B RESOURCE_T_NULL ,
  64. this request is for a new reservation and if successful, a resource handle
  65. will be returned in resource_id.
  66. .IP
  67. If the value of resource_id as supplied by the caller is not
  68. .B RESOURCE_T_NULL ,
  69. this is a existing (partial) reservation. Resources currently reserved
  70. for this handle will be released and the full reservation will be attempted
  71. again.
  72. If the caller wishes to release the resources allocated to a partial
  73. reservation, the caller should pass the resource handle to
  74. \f2pbs_rescrelease\fP().
  75. .IP
  76. At the present time the only resources which may be specified are "nodes".
  77. It should be specified as:
  78. .RS 4
  79. .I nodes=specification
  80. .RE
  81. .IP
  82. where specification is what a user specifies in the -l option argument list
  83. for nodes, see
  84. .I qsub (1B).
  85. .HP 2
  86. .B pbs_rescrelease
  87. .br
  88. The \f2pbs_rescrelease\fP()
  89. call releases or frees resources reserved with the resource handle of
  90. .I resource_id
  91. returned from a prior \f2pbs_rescreserve\fP() call.
  92. .I connect
  93. is the connection returned by \f3pbs_connect\fP().
  94. .LP
  95. Both functions require that the issuing user have operator or administrator
  96. privilege.
  97. .SH "SEE ALSO"
  98. qsub(1B), pbs_connect(3B), pbs_disconnect(3B) and
  99. pbs_resources(7B)
  100. .SH DIAGNOSTICS
  101. pbs_rescreserve() and pbs_rescrelease() return zero on success.
  102. Otherwise, a non zero error is returned. The error number is also set
  103. in pbs_errno.
  104. .IP PBSE_RMPART
  105. is a special case indicating that some but not all of the requested resources
  106. could be reserved; a partial reservation was made. The reservation request
  107. should either be rerequested with the returned handle or the partial
  108. resources released.
  109. .IP PBSE_RMBADPARAM
  110. a parameter is incorrect, such as a null for the pointer to the resource_id.
  111. .IP PBSE_RMNOPARAM
  112. a parameter is missing, such as a null resource list.
  113. .LP