[309] | 1 | /* |
---|
| 2 | * $Id: pbs_ifl.h 529 2010-04-07 11:55:45Z bas $ |
---|
| 3 | * |
---|
| 4 | * Portable Batch System (PBS) Software License |
---|
| 5 | * |
---|
| 6 | * Copyright (c) 1999, MRJ Technology Solutions. |
---|
| 7 | * All rights reserved. |
---|
| 8 | * |
---|
| 9 | * Acknowledgment: The Portable Batch System Software was originally developed |
---|
| 10 | * as a joint project between the Numerical Aerospace Simulation (NAS) Systems |
---|
| 11 | * Division of NASA Ames Research Center and the National Energy Research |
---|
| 12 | * Supercomputer Center (NERSC) of Lawrence Livermore National Laboratory. |
---|
| 13 | * |
---|
| 14 | * Redistribution of the Portable Batch System Software and use in source |
---|
| 15 | * and binary forms, with or without modification, are permitted provided |
---|
| 16 | * that the following conditions are met: |
---|
| 17 | * |
---|
| 18 | * - Redistributions of source code must retain the above copyright and |
---|
| 19 | * acknowledgment notices, this list of conditions and the following |
---|
| 20 | * disclaimer. |
---|
| 21 | * |
---|
| 22 | * - Redistributions in binary form must reproduce the above copyright and |
---|
| 23 | * acknowledgment notices, this list of conditions and the following |
---|
| 24 | * disclaimer in the documentation and/or other materials provided with the |
---|
| 25 | * distribution. |
---|
| 26 | * |
---|
| 27 | * - All advertising materials mentioning features or use of this software must |
---|
| 28 | * display the following acknowledgment: |
---|
| 29 | * |
---|
| 30 | * This product includes software developed by NASA Ames Research Center, |
---|
| 31 | * Lawrence Livermore National Laboratory, and MRJ Technology Solutions. |
---|
| 32 | * |
---|
| 33 | * DISCLAIMER OF WARRANTY |
---|
| 34 | * |
---|
| 35 | * THIS SOFTWARE IS PROVIDED BY MRJ TECHNOLOGY SOLUTIONS ("MRJ") "AS IS" WITHOUT |
---|
| 36 | * WARRANTY OF ANY KIND, AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, |
---|
| 37 | * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS |
---|
| 38 | * FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT ARE EXPRESSLY DISCLAIMED. |
---|
| 39 | * |
---|
| 40 | * IN NO EVENT, UNLESS REQUIRED BY APPLICABLE LAW, SHALL MRJ, NASA, NOR |
---|
| 41 | * THE U.S. GOVERNMENT BE LIABLE FOR ANY DIRECT DAMAGES WHATSOEVER, |
---|
| 42 | * NOR ANY INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
---|
| 43 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
---|
| 44 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
---|
| 45 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
---|
| 46 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE |
---|
| 47 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
---|
| 48 | * |
---|
| 49 | * This license will be governed by the laws of the Commonwealth of Virginia, |
---|
| 50 | * without reference to its choice of law rules. |
---|
| 51 | */ |
---|
| 52 | |
---|
| 53 | /* |
---|
| 54 | * @(#) $Id: pbs_ifl.h 529 2010-04-07 11:55:45Z bas $ |
---|
| 55 | */ |
---|
| 56 | |
---|
| 57 | /* |
---|
| 58 | * |
---|
| 59 | * pbs_ifl.h |
---|
| 60 | * |
---|
| 61 | */ |
---|
| 62 | |
---|
| 63 | /* |
---|
| 64 | * Changed by: Bas van der Vlies <basv@sara.nl>. |
---|
| 65 | * Desc. : removed the macro definitions so that SWIG can understand |
---|
| 66 | * the header file syntax |
---|
| 67 | */ |
---|
| 68 | |
---|
| 69 | #ifndef _PBS_IFL_DEF |
---|
| 70 | #define _PBS_IFL_DEF |
---|
| 71 | |
---|
| 72 | /* Attribute Names used by user commands */ |
---|
| 73 | |
---|
| 74 | #define ATTR_a "Execution_Time" |
---|
| 75 | #define ATTR_c "Checkpoint" |
---|
| 76 | #define ATTR_e "Error_Path" |
---|
| 77 | #define ATTR_f "fault_tolerant" |
---|
| 78 | #define ATTR_g "group_list" |
---|
| 79 | #define ATTR_h "Hold_Types" |
---|
| 80 | #define ATTR_j "Join_Path" |
---|
| 81 | #define ATTR_k "Keep_Files" |
---|
| 82 | #define ATTR_l "Resource_List" |
---|
| 83 | #define ATTR_m "Mail_Points" |
---|
| 84 | #define ATTR_o "Output_Path" |
---|
| 85 | #define ATTR_p "Priority" |
---|
| 86 | #define ATTR_q "destination" |
---|
| 87 | #define ATTR_r "Rerunable" |
---|
| 88 | #define ATTR_t "job_array_request" |
---|
| 89 | #define ATTR_array_id "job_array_id" |
---|
| 90 | #define ATTR_u "User_List" |
---|
| 91 | #define ATTR_v "Variable_List" |
---|
| 92 | #define ATTR_A "Account_Name" |
---|
| 93 | #define ATTR_M "Mail_Users" |
---|
| 94 | #define ATTR_N "Job_Name" |
---|
| 95 | #define ATTR_S "Shell_Path_List" |
---|
| 96 | #define ATTR_depend "depend" |
---|
| 97 | #define ATTR_inter "interactive" |
---|
| 98 | #define ATTR_stagein "stagein" |
---|
| 99 | #define ATTR_stageout "stageout" |
---|
| 100 | #define ATTR_jobtype "jobtype" |
---|
| 101 | |
---|
| 102 | /* additional job and general attribute names */ |
---|
| 103 | |
---|
| 104 | #define ATTR_ctime "ctime" |
---|
| 105 | #define ATTR_exechost "exec_host" |
---|
| 106 | #define ATTR_mtime "mtime" |
---|
| 107 | #define ATTR_qtime "qtime" |
---|
| 108 | #define ATTR_session "session_id" |
---|
| 109 | #define ATTR_euser "euser" |
---|
| 110 | #define ATTR_egroup "egroup" |
---|
| 111 | #define ATTR_hashname "hashname" |
---|
| 112 | #define ATTR_hopcount "hop_count" |
---|
| 113 | #define ATTR_security "security" |
---|
| 114 | #define ATTR_sched_hint "sched_hint" |
---|
| 115 | #define ATTR_substate "substate" |
---|
| 116 | #define ATTR_name "Job_Name" |
---|
| 117 | #define ATTR_owner "Job_Owner" |
---|
| 118 | #define ATTR_used "resources_used" |
---|
| 119 | #define ATTR_state "job_state" |
---|
| 120 | #define ATTR_queue "queue" |
---|
| 121 | #define ATTR_server "server" |
---|
| 122 | #define ATTR_maxrun "max_running" |
---|
| 123 | #define ATTR_maxreport "max_report" |
---|
| 124 | #define ATTR_total "total_jobs" |
---|
| 125 | #define ATTR_comment "comment" |
---|
| 126 | #define ATTR_cookie "cookie" |
---|
| 127 | #define ATTR_qrank "queue_rank" |
---|
| 128 | #define ATTR_altid "alt_id" |
---|
| 129 | #define ATTR_etime "etime" |
---|
| 130 | #define ATTR_exitstat "exit_status" |
---|
| 131 | #define ATTR_forwardx11 "forward_x11" |
---|
| 132 | #define ATTR_submit_args "submit_args" |
---|
| 133 | #define ATTR_tokens "tokens" |
---|
| 134 | #define ATTR_netcounter "net_counter" |
---|
| 135 | #define ATTR_umask "umask" |
---|
| 136 | #define ATTR_start_time "start_time" |
---|
| 137 | #define ATTR_start_count "start_count" |
---|
| 138 | #define ATTR_checkpoint_dir "checkpoint_dir" /* user specified directory for checkpoint files */ |
---|
| 139 | #define ATTR_checkpoint_name "checkpoint_name" /* user specified name of checkpoint file */ |
---|
| 140 | #define ATTR_checkpoint_time "checkpoint_time" /* timestamp of start of last checkpoint */ |
---|
| 141 | #define ATTR_checkpoint_restart_status "checkpoint_restart_status" /* checkpoint restart status */ |
---|
| 142 | #define ATTR_restart_name "restart_name" /* saved name of checkpoint restart file */ |
---|
| 143 | #define ATTR_comp_time "comp_time" |
---|
| 144 | #define ATTR_reported "reported" |
---|
| 145 | #define ATTR_intcmd "inter_cmd" |
---|
| 146 | |
---|
| 147 | #ifdef USEJOBCREATE |
---|
| 148 | #define ATTR_pagg "pagg_id" |
---|
| 149 | #endif /* USEJOBCREATE */ |
---|
| 150 | |
---|
| 151 | /* additional queue attributes names */ |
---|
| 152 | |
---|
| 153 | #define ATTR_aclgren "acl_group_enable" |
---|
| 154 | #define ATTR_aclgroup "acl_groups" |
---|
| 155 | #define ATTR_aclhten "acl_host_enable" |
---|
| 156 | #define ATTR_aclhost "acl_hosts" |
---|
| 157 | #define ATTR_acluren "acl_user_enable" |
---|
| 158 | #define ATTR_acluser "acl_users" |
---|
| 159 | #define ATTR_altrouter "alt_router" |
---|
| 160 | #define ATTR_checkpoint_min "checkpoint_min" |
---|
| 161 | #define ATTR_enable "enabled" |
---|
| 162 | #define ATTR_fromroute "from_route_only" |
---|
| 163 | #define ATTR_hostlist "hostlist" /* TORQUE only */ |
---|
| 164 | #define ATTR_killdelay "kill_delay" |
---|
| 165 | #define ATTR_maxgrprun "max_group_run" |
---|
| 166 | #define ATTR_maxque "max_queuable" |
---|
| 167 | #define ATTR_maxuserque "max_user_queuable" |
---|
| 168 | #define ATTR_maxuserrun "max_user_run" |
---|
| 169 | #define ATTR_qtype "queue_type" |
---|
| 170 | #define ATTR_rescassn "resources_assigned" |
---|
| 171 | #define ATTR_rescdflt "resources_default" |
---|
| 172 | #define ATTR_rescmax "resources_max" |
---|
| 173 | #define ATTR_rescmin "resources_min" |
---|
| 174 | #define ATTR_rerunnable "restartable" /* TORQUE only */ |
---|
| 175 | #define ATTR_rndzretry "rendezvous_retry" |
---|
| 176 | #define ATTR_routedest "route_destinations" |
---|
| 177 | #define ATTR_routeheld "route_held_jobs" |
---|
| 178 | #define ATTR_routewait "route_waiting_jobs" |
---|
| 179 | #define ATTR_routeretry "route_retry_time" |
---|
| 180 | #define ATTR_routelife "route_lifetime" |
---|
| 181 | #define ATTR_rsvexpdt "reserved_expedite" |
---|
| 182 | #define ATTR_rsvsync "reserved_sync" |
---|
| 183 | #define ATTR_start "started" |
---|
| 184 | #define ATTR_count "state_count" |
---|
| 185 | #define ATTR_number "number_jobs" |
---|
| 186 | #define ATTR_acllogic "acl_logic_or" |
---|
| 187 | #define ATTR_aclgrpslpy "acl_group_sloppy" |
---|
| 188 | #define ATTR_keepcompleted "keep_completed" |
---|
| 189 | #define ATTR_disallowedtypes "disallowed_types" |
---|
| 190 | #define ATTR_is_transit "is_transit" |
---|
| 191 | |
---|
| 192 | /* additional server attributes names */ |
---|
| 193 | |
---|
| 194 | /* NOTE: steps for adding new attribute described in ??? */ |
---|
| 195 | /* - create #define ATTR_* in include/pbs_ifl.h |
---|
| 196 | - insert SRV_ATR_* in include/server.h |
---|
| 197 | - add ATTR_* in include/qmgr_svr_public.h |
---|
| 198 | - insert structure in server/svr_attr_def.c |
---|
| 199 | NOTE: structure must be in same relative position as SRV_ATR_* |
---|
| 200 | - insert usage code in proper location |
---|
| 201 | */ |
---|
| 202 | |
---|
| 203 | #define ATTR_aclroot "acl_roots" |
---|
| 204 | #define ATTR_managers "managers" |
---|
| 205 | #define ATTR_dfltque "default_queue" |
---|
| 206 | #define ATTR_dispsvrsuffix "display_job_server_suffix" |
---|
| 207 | #define ATTR_jobsuffixalias "job_suffix_alias" |
---|
| 208 | #define ATTR_defnode "default_node" |
---|
| 209 | #define ATTR_locsvrs "location_servers" |
---|
| 210 | #define ATTR_logevents "log_events" |
---|
| 211 | #define ATTR_logfile "log_file" |
---|
| 212 | #define ATTR_loglevel "log_level" |
---|
| 213 | #define ATTR_mailfrom "mail_from" |
---|
| 214 | #define ATTR_nodepack "node_pack" |
---|
| 215 | #define ATTR_nodesuffix "node_suffix" |
---|
| 216 | #define ATTR_operators "operators" |
---|
| 217 | #define ATTR_queryother "query_other_jobs" |
---|
| 218 | #define ATTR_resccost "resources_cost" |
---|
| 219 | #define ATTR_rescavail "resources_available" |
---|
| 220 | #define ATTR_schedit "scheduler_iteration" |
---|
| 221 | #define ATTR_scheduling "scheduling" |
---|
| 222 | #define ATTR_status "server_state" |
---|
| 223 | #define ATTR_syscost "system_cost" |
---|
| 224 | #define ATTR_pingrate "node_ping_rate" |
---|
| 225 | #define ATTR_ndchkrate "node_check_rate" |
---|
| 226 | #define ATTR_tcptimeout "tcp_timeout" |
---|
| 227 | #define ATTR_jobstatrate "job_stat_rate" |
---|
| 228 | #define ATTR_polljobs "poll_jobs" |
---|
| 229 | #define ATTR_downonerror "down_on_error" |
---|
| 230 | #define ATTR_disableserveridcheck "disable_server_id_check" |
---|
| 231 | #define ATTR_jobnanny "job_nanny" |
---|
| 232 | #define ATTR_ownerpurge "owner_purge" |
---|
| 233 | #define ATTR_qcqlimits "queue_centric_limits" |
---|
| 234 | #define ATTR_momjobsync "mom_job_sync" |
---|
| 235 | #define ATTR_maildomain "mail_domain" |
---|
| 236 | #define ATTR_pbsversion "pbs_version" |
---|
| 237 | #define ATTR_submithosts "submit_hosts" |
---|
| 238 | #define ATTR_allownodesubmit "allow_node_submit" |
---|
| 239 | #define ATTR_allowproxyuser "allow_proxy_user" |
---|
| 240 | #define ATTR_autonodenp "auto_node_np" |
---|
| 241 | #define ATTR_servername "server_name" |
---|
| 242 | #define ATTR_logfilemaxsize "log_file_max_size" |
---|
| 243 | #define ATTR_logfilerolldepth "log_file_roll_depth" |
---|
| 244 | #define ATTR_logkeepdays "log_keep_days" |
---|
| 245 | #define ATTR_nextjobnum "next_job_number" |
---|
| 246 | #define ATTR_extraresc "extra_resc" |
---|
| 247 | #define ATTR_schedversion "sched_version" |
---|
| 248 | #define ATTR_acctkeepdays "accounting_keep_days" |
---|
| 249 | #define ATTR_lockfile "lock_file" |
---|
| 250 | #define ATTR_credentiallifetime "credential_lifetime" |
---|
| 251 | #define ATTR_jobmustreport "job_must_report" |
---|
| 252 | #define ATTR_LockfileUpdateTime "lock_file_update_time" |
---|
| 253 | #define ATTR_LockfileCheckTime "lock_file_check_time" |
---|
| 254 | #define ATTR_npdefault "np_default" |
---|
| 255 | #define ATTR_jobstarttimeout "job_start_timeout" |
---|
| 256 | |
---|
| 257 | /* additional node "attributes" names */ |
---|
| 258 | |
---|
| 259 | #define ATTR_NODE_state "state" |
---|
| 260 | #define ATTR_NODE_np "np" |
---|
| 261 | #define ATTR_NODE_properties "properties" |
---|
| 262 | #define ATTR_NODE_ntype "ntype" |
---|
| 263 | #define ATTR_NODE_jobs "jobs" |
---|
| 264 | #define ATTR_NODE_status "status" |
---|
| 265 | #define ATTR_NODE_note "note" |
---|
| 266 | |
---|
| 267 | /* notification email formating */ |
---|
| 268 | #define ATTR_mailsubjectfmt "mail_subject_fmt" |
---|
| 269 | #define ATTR_mailbodyfmt "mail_body_fmt" |
---|
| 270 | |
---|
| 271 | |
---|
| 272 | /* various attribute values */ |
---|
| 273 | |
---|
| 274 | #define CHECKPOINT_UNSPECIFIED "u" |
---|
| 275 | #define NO_HOLD "n" |
---|
| 276 | #define NO_JOIN "n" |
---|
| 277 | #define NO_KEEP "n" |
---|
| 278 | #define MAIL_AT_ABORT "a" |
---|
| 279 | |
---|
| 280 | |
---|
| 281 | #define DELDELAY "deldelay=" /* see qdel.c */ |
---|
| 282 | #define DELPURGE "delpurge=" /* see qdel.c */ |
---|
| 283 | #define PURGECOMP "purgecomplete=" /* see req_delete.c */ |
---|
| 284 | #define EXECQUEONLY "exec_queue_only" /* see req_stat.c */ |
---|
| 285 | #define RERUNFORCE "force" |
---|
| 286 | |
---|
| 287 | #define USER_HOLD "u" |
---|
| 288 | #define OTHER_HOLD "o" |
---|
| 289 | #define SYSTEM_HOLD "s" |
---|
| 290 | |
---|
| 291 | /* node-attribute values (state,ntype) */ |
---|
| 292 | |
---|
| 293 | #define ND_free "free" |
---|
| 294 | #define ND_offline "offline" |
---|
| 295 | #define ND_down "down" |
---|
| 296 | #define ND_reserve "reserve" |
---|
| 297 | #define ND_job_exclusive "job-exclusive" |
---|
| 298 | #define ND_job_sharing "job-sharing" |
---|
| 299 | #define ND_busy "busy" |
---|
| 300 | #define ND_state_unknown "state-unknown" |
---|
| 301 | #define ND_timeshared "time-shared" |
---|
| 302 | #define ND_cluster "cluster" |
---|
| 303 | |
---|
| 304 | /* queue disallowed types */ |
---|
| 305 | #define Q_DT_batch "batch" |
---|
| 306 | #define Q_DT_interactive "interactive" |
---|
| 307 | #define Q_DT_rerunable "rerunable" |
---|
| 308 | #define Q_DT_nonrerunable "nonrerunable" |
---|
| 309 | #define Q_DT_fault_tolerant "fault_tolerant" |
---|
| 310 | #define Q_DT_fault_intolerant "fault_intolerant" |
---|
| 311 | #define Q_DT_job_array "job_array" |
---|
| 312 | |
---|
| 313 | /*constant related to sum of string lengths for above strings*/ |
---|
| 314 | #define MAX_ENCODE_BFR 100 |
---|
| 315 | |
---|
| 316 | #define MGR_CMD_CREATE 0 |
---|
| 317 | #define MGR_CMD_DELETE 1 |
---|
| 318 | #define MGR_CMD_SET 2 |
---|
| 319 | #define MGR_CMD_UNSET 3 |
---|
| 320 | #define MGR_CMD_LIST 4 |
---|
| 321 | #define MGR_CMD_PRINT 5 |
---|
| 322 | #define MGR_CMD_ACTIVE 6 |
---|
| 323 | |
---|
| 324 | #define MGR_OBJ_NONE -1 |
---|
| 325 | #define MGR_OBJ_SERVER 0 |
---|
| 326 | #define MGR_OBJ_QUEUE 1 |
---|
| 327 | #define MGR_OBJ_JOB 2 |
---|
| 328 | #define MGR_OBJ_NODE 3 |
---|
| 329 | |
---|
| 330 | /* Misc defines for various requests */ |
---|
| 331 | |
---|
| 332 | #define MSG_OUT 1 |
---|
| 333 | #define MSG_ERR 2 |
---|
| 334 | |
---|
| 335 | #define SHUT_SIG -1 |
---|
| 336 | #define SHUT_IMMEDIATE 0 |
---|
| 337 | #define SHUT_DELAY 1 |
---|
| 338 | #define SHUT_QUICK 2 |
---|
| 339 | |
---|
| 340 | #define SIG_RESUME "resume" |
---|
| 341 | #define SIG_SUSPEND "suspend" |
---|
| 342 | |
---|
| 343 | |
---|
| 344 | /* WARNING: be careful changing these PBS_MAX* values. They can result in a |
---|
| 345 | change in the structure of the .JB file, and binary incompatibilities between |
---|
| 346 | versions of TORQUE. Do not change in a -fixes branch */ |
---|
| 347 | |
---|
| 348 | |
---|
| 349 | |
---|
| 350 | #define PBS_MAXHOSTNAME 1024 /* max host name length */ |
---|
| 351 | #ifndef MAXPATHLEN |
---|
| 352 | #define MAXPATHLEN 1024 /* max path name length */ |
---|
| 353 | #endif |
---|
| 354 | #ifndef MAXNAMLEN |
---|
| 355 | #define MAXNAMLEN 255 |
---|
| 356 | #endif |
---|
| 357 | #define MAX_NOTE 256 /* max node note length */ |
---|
| 358 | #define MAX_NOTE_STR "256" /* max node note length as a string literal (this MUST match MAX_NOTE) */ |
---|
| 359 | |
---|
| 360 | #define PBS_MAXUSER 32 /* max user name length */ |
---|
| 361 | #define PBS_MAXGRPN 16 /* max group name length */ |
---|
| 362 | #define PBS_MAXQUEUENAME 15 /* max queue name length */ |
---|
| 363 | #define PBS_MAXSERVERNAME PBS_MAXHOSTNAME /* max server name length */ |
---|
| 364 | #define PBS_MAXJOBARRAYLEN 6 /* number of characters allowed in jobarray portion of job id, including '-' */ |
---|
| 365 | #define PBS_MAXSEQNUM 8 /* max sequence number length */ |
---|
| 366 | #define PBS_MAXPORTNUM 5 /* udp/tcp port numbers max=16 bits */ |
---|
| 367 | #define PBS_MAXJOBARRAY 99999 |
---|
| 368 | #define PBS_MAXSVRJOBID (PBS_MAXSEQNUM + PBS_MAXSERVERNAME + PBS_MAXPORTNUM + PBS_MAXJOBARRAYLEN + 2 ) /* server job id size */ |
---|
| 369 | #define PBS_MAXCLTJOBID (PBS_MAXSVRJOBID + PBS_MAXSERVERNAME + PBS_MAXPORTNUM + PBS_MAXJOBARRAYLEN + 2) /* client job id size */ |
---|
| 370 | #define PBS_MAXDEST 1024 /* destination size -- increased from 256 */ |
---|
| 371 | #define PBS_MAXROUTEDEST (PBS_MAXQUEUENAME + PBS_MAXSERVERNAME + PBS_MAXPORTNUM + 2) /* destination size */ |
---|
| 372 | #define PBS_USE_IFF 1 /* pbs_connect() to call pbs_iff */ |
---|
| 373 | #define PBS_INTERACTIVE 1 /* Support of Interactive jobs */ |
---|
| 374 | #define PBS_TERM_BUF_SZ 80 /* Interactive term buffer size */ |
---|
| 375 | #define PBS_TERM_CCA 6 /* Interactive term cntl char array */ |
---|
| 376 | |
---|
| 377 | /* constants used to indicate version of job ji_qs struct written to disk. |
---|
| 378 | starting with 2.4.0 we stopped encoding the torque version number into the |
---|
| 379 | hex value e.g. 0x00020300 for torque v2.3.0. Now we just increment a value |
---|
| 380 | which is added to the last version encoded that way */ |
---|
| 381 | #define PBS_QS_VERSION_BASE 0x00020300 /* magic number do not change */ |
---|
| 382 | #define PBS_QS_VERSION_INT 1 /* increment this version number with every change to the ji_qs struct */ |
---|
| 383 | #define PBS_QS_VERSION (PBS_QS_VERSION_BASE + PBS_QS_VERSION_INT) /* version number saved in the ji_qs struct */ |
---|
| 384 | |
---|
| 385 | /* someday the PBS_*_PORT definition will go away and only the */ |
---|
| 386 | /* PBS_*_SERVICE_NAME form will be used, maybe */ |
---|
| 387 | |
---|
| 388 | #define PBS_BATCH_SERVICE_NAME "pbs" |
---|
| 389 | |
---|
| 390 | #ifndef PBS_BATCH_SERVICE_PORT |
---|
| 391 | #define PBS_BATCH_SERVICE_PORT 15001 |
---|
| 392 | #endif /* PBS_BATCH_SERVICE_PORT */ |
---|
| 393 | |
---|
| 394 | #define PBS_BATCH_SERVICE_NAME_DIS "pbs_dis" /* new DIS port */ |
---|
| 395 | |
---|
| 396 | #ifndef PBS_BATCH_SERVICE_PORT_DIS |
---|
| 397 | #define PBS_BATCH_SERVICE_PORT_DIS 15001 /* new DIS port */ |
---|
| 398 | #endif /* PBS_BATCH_SERVICE_PORT_DIS */ |
---|
| 399 | |
---|
| 400 | #define PBS_MOM_SERVICE_NAME "pbs_mom" |
---|
| 401 | |
---|
| 402 | #ifndef PBS_MOM_SERVICE_PORT |
---|
| 403 | #define PBS_MOM_SERVICE_PORT 15002 |
---|
| 404 | #endif /* PBS_MOM_SERVICE_PORT */ |
---|
| 405 | |
---|
| 406 | #define PBS_MANAGER_SERVICE_NAME "pbs_resmon" |
---|
| 407 | |
---|
| 408 | #ifndef PBS_MANAGER_SERVICE_PORT |
---|
| 409 | #define PBS_MANAGER_SERVICE_PORT 15003 |
---|
| 410 | #endif /* PBS_MANAGER_SERVICE_PORT */ |
---|
| 411 | |
---|
| 412 | #define PBS_SCHEDULER_SERVICE_NAME "pbs_sched" |
---|
| 413 | |
---|
| 414 | #ifndef PBS_SCHEDULER_SERVICE_PORT |
---|
| 415 | #define PBS_SCHEDULER_SERVICE_PORT 15004 |
---|
| 416 | #endif /* PBS_SCHEDULER_SERVICE_PORT */ |
---|
| 417 | |
---|
| 418 | /* |
---|
| 419 | * Other misc checkpoint defines |
---|
| 420 | */ |
---|
| 421 | #define CHECKPOINTHOLD "checkpoint_hold" |
---|
| 422 | #define CHECKPOINTCONT "checkpoint_cont" |
---|
| 423 | #define MOM_DEFAULT_CHECKPOINT_DIR "$MOMDEFAULTCHECKPOINTDIR$" |
---|
| 424 | |
---|
| 425 | |
---|
| 426 | enum batch_op { SET, UNSET, INCR, DECR, EQ, NE, GE, GT, LE, LT, DFLT, MERGE }; |
---|
| 427 | |
---|
| 428 | /* |
---|
| 429 | ** This structure is identical to attropl so they can be used |
---|
| 430 | ** interchangably. The op field is not used. |
---|
| 431 | */ |
---|
| 432 | |
---|
| 433 | struct attrl |
---|
| 434 | { |
---|
| 435 | struct attrl *next; |
---|
| 436 | char *name; |
---|
| 437 | char *resource; |
---|
| 438 | char *value; |
---|
| 439 | enum batch_op op; /* not used */ |
---|
| 440 | }; |
---|
| 441 | |
---|
| 442 | struct attropl |
---|
| 443 | { |
---|
| 444 | struct attropl *next; |
---|
| 445 | char *name; |
---|
| 446 | char *resource; |
---|
| 447 | char *value; |
---|
| 448 | enum batch_op op; |
---|
| 449 | }; |
---|
| 450 | |
---|
| 451 | struct batch_status |
---|
| 452 | { |
---|
| 453 | struct batch_status *next; |
---|
| 454 | char *name; |
---|
| 455 | struct attrl *attribs; |
---|
| 456 | char *text; |
---|
| 457 | }; |
---|
| 458 | |
---|
| 459 | |
---|
| 460 | |
---|
| 461 | |
---|
| 462 | /* Resource Reservation Information */ |
---|
| 463 | typedef int resource_t; /* resource reservation handle */ |
---|
| 464 | |
---|
| 465 | #define RESOURCE_T_NULL (resource_t)0 |
---|
| 466 | #define RESOURCE_T_ALL (resource_t)-1 |
---|
| 467 | |
---|
| 468 | extern int pbs_errno; /* error number */ |
---|
| 469 | |
---|
| 470 | extern char *pbs_server; /* server attempted to connect | connected to */ |
---|
| 471 | /* see pbs_connect(3B) */ |
---|
| 472 | |
---|
| 473 | extern char *avail(int connect, char *resc); |
---|
| 474 | extern int pbs_asyrunjob(int c, char *jobid, char *location, char *extend); |
---|
| 475 | extern int pbs_alterjob(int connect, char *job_id, struct attrl *ATTRL, char *extend); |
---|
| 476 | extern int pbs_connect(char *server); |
---|
| 477 | extern int pbs_query_max_connections(void); |
---|
| 478 | extern char *pbs_default(void); |
---|
| 479 | |
---|
| 480 | extern int pbs_deljob(int connect, char *job_id, char *extend); |
---|
| 481 | extern int pbs_disconnect(int connect); |
---|
| 482 | extern char *pbs_geterrmsg(int connect); |
---|
| 483 | extern int pbs_holdjob(int connect, char *job_id, char *hold_type, char *extend); |
---|
| 484 | extern char *pbs_locjob(int connect, char *job_id, char *extend); |
---|
| 485 | |
---|
| 486 | extern int pbs_manager(int connect, int command, int obj_type, char *obj_name, |
---|
| 487 | struct attropl *ATTROPL, char *extend); |
---|
| 488 | |
---|
| 489 | extern int pbs_movejob(int connect, char *job_id, char *destination, char *extend); |
---|
| 490 | |
---|
| 491 | extern int pbs_msgjob(int connect, char *job_id, int file, char *message, char *extend); |
---|
| 492 | |
---|
| 493 | extern int pbs_orderjob (int connect, char *job1, char *job2, char *extend); |
---|
| 494 | |
---|
| 495 | extern int pbs_rescquery(int connect, char **CHAR, int nresc, int *avail, |
---|
| 496 | int *alloc, int *resv, int *down); |
---|
| 497 | |
---|
| 498 | extern int pbs_rescreserve(int connect, char **CHAR, int nresc, resource_t *phandle); |
---|
| 499 | |
---|
| 500 | extern int pbs_rescrelease(int connect, resource_t rhandle); |
---|
| 501 | |
---|
| 502 | extern int pbs_rerunjob(int connect, char *job_id, char *extend); |
---|
| 503 | |
---|
| 504 | extern int pbs_rlsjob(int connect, char *job_id, char *hold_type, char *extend); |
---|
| 505 | |
---|
| 506 | extern int pbs_runjob(int connect, char *jobid, char *loc, char *extend); |
---|
| 507 | |
---|
| 508 | extern char **pbs_selectjob(int connect, struct attropl *ATTROPL, char *extend); |
---|
| 509 | |
---|
| 510 | extern int pbs_sigjob(int connect, char *job_id, char *signal, char *extend); |
---|
| 511 | |
---|
| 512 | |
---|
| 513 | extern void pbs_statfree(struct batch_status *BATCH_STATUS); |
---|
| 514 | |
---|
| 515 | // Function does not exitst Bas van der Vlies |
---|
| 516 | // |
---|
| 517 | // extern struct batch_status *pbs_statdest(int connect, char *id, char *extend); |
---|
| 518 | |
---|
| 519 | extern struct batch_status *pbs_statjob(int connect, char *id, struct attrl *ATTRL, char *extend); |
---|
| 520 | |
---|
| 521 | extern struct batch_status *pbs_selstat(int connect, struct attropl *ATTROPL, char *extend); |
---|
| 522 | |
---|
| 523 | extern struct batch_status *pbs_statque(int connect, char *id, struct attrl *ATTRL, char *extend); |
---|
| 524 | |
---|
| 525 | extern struct batch_status *pbs_statserver(int connect, struct attrl *ATTRL, char *extend); |
---|
| 526 | |
---|
| 527 | extern struct batch_status *pbs_statnode(int connect, char *id, struct attrl *ATTRL, char *extend); |
---|
| 528 | |
---|
| 529 | extern char *pbs_submit(int connect, struct attropl *ATTROPL, char *script, |
---|
| 530 | char *destination, char *extend); |
---|
| 531 | |
---|
| 532 | extern int pbs_terminate(int connect, int manner, char *extend); |
---|
| 533 | |
---|
| 534 | extern int totpool(int connect, int update); |
---|
| 535 | |
---|
| 536 | extern int usepool(int connect, int update); |
---|
| 537 | |
---|
| 538 | #ifdef TORQUE_2_4 |
---|
| 539 | extern char *pbs_fbserver(void); |
---|
| 540 | extern char *pbs_get_server_list(void); |
---|
| 541 | extern int pbs_sigjobasync(int connect, char *job_id, char *signal, char *extend); |
---|
| 542 | extern int pbs_alterjob_async(int connect, char *job_id, struct attrl *ATTRL, char *extend); |
---|
| 543 | extern int pbs_checkpointjob(int connect, char *job_id, char *extend); |
---|
| 544 | #endif |
---|
| 545 | |
---|
| 546 | #endif /* _PBS_IFL_DEF */ |
---|
| 547 | |
---|
| 548 | /* end of pbs_ifl.h */ |
---|