source: devel/5.X/pbs_ifl.h @ 329

Last change on this file since 329 was 324, checked in by bas, 9 years ago

added 5.X setup, must be made better, want to generate a of stuff from the debian installation package, see #47

File size: 25.2 KB
RevLine 
[324]1/*
2*         OpenPBS (Portable Batch System) v2.3 Software License
3*
4* Copyright (c) 1999-2000 Veridian Information Solutions, Inc.
5* All rights reserved.
6*
7* ---------------------------------------------------------------------------
8* For a license to use or redistribute the OpenPBS software under conditions
9* other than those described below, or to purchase support for this software,
10* please contact Veridian Systems, PBS Products Department ("Licensor") at:
11*
12*    www.OpenPBS.org  +1 650 967-4675                  sales@OpenPBS.org
13*                        877 902-4PBS (US toll-free)
14* ---------------------------------------------------------------------------
15*
16* This license covers use of the OpenPBS v2.3 software (the "Software") at
17* your site or location, and, for certain users, redistribution of the
18* Software to other sites and locations.  Use and redistribution of
19* OpenPBS v2.3 in source and binary forms, with or without modification,
20* are permitted provided that all of the following conditions are met.
21* After December 31, 2001, only conditions 3-6 must be met:
22*
23* 1. Commercial and/or non-commercial use of the Software is permitted
24*    provided a current software registration is on file at www.OpenPBS.org.
25*    If use of this software contributes to a publication, product, or
26*    service, proper attribution must be given; see www.OpenPBS.org/credit.html
27*
28* 2. Redistribution in any form is only permitted for non-commercial,
29*    non-profit purposes.  There can be no charge for the Software or any
30*    software incorporating the Software.  Further, there can be no
31*    expectation of revenue generated as a consequence of redistributing
32*    the Software.
33*
34* 3. Any Redistribution of source code must retain the above copyright notice
35*    and the acknowledgment contained in paragraph 6, this list of conditions
36*    and the disclaimer contained in paragraph 7.
37*
38* 4. Any Redistribution in binary form must reproduce the above copyright
39*    notice and the acknowledgment contained in paragraph 6, this list of
40*    conditions and the disclaimer contained in paragraph 7 in the
41*    documentation and/or other materials provided with the distribution.
42*
43* 5. Redistributions in any form must be accompanied by information on how to
44*    obtain complete source code for the OpenPBS software and any
45*    modifications and/or additions to the OpenPBS software.  The source code
46*    must either be included in the distribution or be available for no more
47*    than the cost of distribution plus a nominal fee, and all modifications
48*    and additions to the Software must be freely redistributable by any party
49*    (including Licensor) without restriction.
50*
51* 6. All advertising materials mentioning features or use of the Software must
52*    display the following acknowledgment:
53*
54*     "This product includes software developed by NASA Ames Research Center,
55*     Lawrence Livermore National Laboratory, and Veridian Information
56*     Solutions, Inc.
57*     Visit www.OpenPBS.org for OpenPBS software support,
58*     products, and information."
59*
60* 7. DISCLAIMER OF WARRANTY
61*
62* THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ANY EXPRESS
63* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
64* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT
65* ARE EXPRESSLY DISCLAIMED.
66*
67* IN NO EVENT SHALL VERIDIAN CORPORATION, ITS AFFILIATED COMPANIES, OR THE
68* U.S. GOVERNMENT OR ANY OF ITS AGENCIES BE LIABLE FOR ANY DIRECT OR INDIRECT,
69* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
70* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
71* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
72* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
73* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
74* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
75*
76* This license will be governed by the laws of the Commonwealth of Virginia,
77* without reference to its choice of law rules.
78*/
79
80/*
81 *
82 *  pbs_ifl.h
83 *
84 */
85
86#ifndef _PBS_IFL_DEF
87#define _PBS_IFL_DEF
88#include <sys/socket.h>
89
90/* Attribute Names used by user commands */
91
92#define ATTR_a "Execution_Time"
93#define ATTR_c "Checkpoint"
94#define ATTR_e "Error_Path"
95#define ATTR_f "fault_tolerant"
96#define ATTR_g "group_list"
97#define ATTR_h "Hold_Types"
98#define ATTR_j "Join_Path"
99#define ATTR_k "Keep_Files"
100#define ATTR_l "Resource_List"
101#define ATTR_m "Mail_Points"
102#define ATTR_o "Output_Path"
103#define ATTR_p "Priority"
104#define ATTR_q "destination"
105#define ATTR_r "Rerunable"
106#define ATTR_t "job_array_request"
107#define ATTR_array_id "job_array_id"
108#define ATTR_u "User_List"
109#define ATTR_v "Variable_List"
110#define ATTR_A "Account_Name"
111#define ATTR_args "job_arguments"
112#define ATTR_reservation_id "reservation_id"
113#define ATTR_login_node_id "login_node_id"
114#define ATTR_login_prop "login_property"
115#define ATTR_external_nodes "external_nodes"
116#define ATTR_multi_req_alps "multi_req_alps"
117#define ATTR_M "Mail_Users"
118#define ATTR_N "Job_Name"
119#define ATTR_S "Shell_Path_List"
120#define ATTR_depend   "depend"
121#define ATTR_inter    "interactive"
122#define ATTR_stagein  "stagein"
123#define ATTR_stageout "stageout"
124#define ATTR_jobtype  "jobtype"
125#define ATTR_submit_host "submit_host"
126#define ATTR_init_work_dir "init_work_dir"
127/* The following were part of the variable_list */
128#define ATTR_pbs_o_initdir          "PBS_O_INITDIR"
129#define ATTR_pbs_o_rootdir          "PBS_O_ROOTDIR"
130#define ATTR_pbs_o_workdir          "PBS_O_WORKDIR" /* same as init_work_dir */
131#define ATTR_pbs_o_host             "PBS_O_HOST" /* same as submit_host */
132#define ATTR_pbs_o_server           "PBS_O_SERVER"
133#define ATTR_pbs_o_home             "PBS_O_HOME"
134#define ATTR_pbs_o_logname          "PBS_O_LOGNAME"
135#define ATTR_pbs_o_path             "PBS_O_PATH"
136#define ATTR_pbs_o_mail             "PBS_O_MAIL"
137#define ATTR_pbs_o_shell            "PBS_O_SHELL"
138#define ATTR_pbs_o_tz               "PBS_O_TZ"
139#define ATTR_pbs_o_lang             "PBS_O_LANG"
140#define ATTR_pbs_o_uid              "PBS_O_UID"
141#define ATTR_pbs_o_submit_filter    "PBS_O_SUBMIT_FILTER"
142
143/* additional job and general attribute names */
144
145#define ATTR_ctime      "ctime"
146#define ATTR_exechost   "exec_host"
147#define ATTR_execport   "exec_port"
148#define ATTR_mtime      "mtime"
149#define ATTR_qtime      "qtime"
150#define ATTR_session    "session_id"
151#define ATTR_euser      "euser"
152#define ATTR_egroup     "egroup"
153#define ATTR_hashname   "hashname"
154#define ATTR_hopcount   "hop_count"
155#define ATTR_security   "security"
156#define ATTR_sched_hint "sched_hint"
157#define ATTR_substate   "substate"
158#define ATTR_name       "Job_Name"
159#define ATTR_owner      "Job_Owner"
160#define ATTR_used       "resources_used"
161#define ATTR_state      "job_state"
162#define ATTR_queue      "queue"
163#define ATTR_server     "server"
164#define ATTR_maxrun     "max_running"
165#define ATTR_maxreport  "max_report"
166#define ATTR_total      "total_jobs"
167#define ATTR_comment    "comment"
168#define ATTR_cookie     "cookie"
169#define ATTR_qrank      "queue_rank"
170#define ATTR_altid      "alt_id"
171#define ATTR_etime      "etime"
172#define ATTR_exitstat   "exit_status"
173#define ATTR_forwardx11 "forward_x11"
174#define ATTR_submit_args "submit_args"
175#define ATTR_tokens     "tokens"
176#define ATTR_netcounter "net_counter"
177#define ATTR_umask      "umask"
178#define ATTR_start_time "start_time"
179#define ATTR_start_count "start_count"
180#define ATTR_checkpoint_dir  "checkpoint_dir"    /* user specified directory for checkpoint files */
181#define ATTR_checkpoint_name  "checkpoint_name"   /* user specified name of checkpoint file */
182#define ATTR_checkpoint_time  "checkpoint_time"   /* timestamp of start of last checkpoint */
183#define ATTR_checkpoint_restart_status  "checkpoint_restart_status"   /* checkpoint restart status */
184#define ATTR_restart_name       "restart_name"   /* saved name of checkpoint restart file */
185#define ATTR_comp_time          "comp_time"
186#define ATTR_reported           "reported"
187#define ATTR_intcmd             "inter_cmd"
188#define ATTR_job_radix          "job_radix"
189#define ATTR_sister_list        "sister_list"
190#define ATTR_total_runtime  "total_runtime"
191#define ATTR_P           "proxy_user"
192#define ATTR_node_exclusive "node_exclusive"
193#define ATTR_exec_gpus   "exec_gpus"
194#define ATTR_exec_mics   "exec_mics"
195#define ATTR_J           "job_id"
196#define ATTR_pagg         "pagg_id"
197#define ATTR_system_start_time "system_start_time"
198  /* JOB_ATR_gpu_flags */
199#define ATTR_gpu_flags          "gpu_flags"
200
201/* additional queue attributes names */
202
203#define ATTR_aclgren    "acl_group_enable"
204#define ATTR_aclgroup   "acl_groups"
205#define ATTR_aclhten    "acl_host_enable"
206#define ATTR_aclhost    "acl_hosts"
207#define ATTR_acluren    "acl_user_enable"
208#define ATTR_acluser    "acl_users"
209#define ATTR_altrouter  "alt_router"
210#define ATTR_checkpoint_min  "checkpoint_min"
211#define ATTR_checkpoint_defaults  "checkpoint_defaults"
212#define ATTR_enable     "enabled"
213#define ATTR_fromroute  "from_route_only"
214#define ATTR_hostlist    "hostlist"         /* TORQUE only */
215#define ATTR_killdelay   "kill_delay"
216#define ATTR_maxgrprun   "max_group_run"
217#define ATTR_maxque      "max_queuable"
218#define ATTR_maxuserque  "max_user_queuable"
219#define ATTR_maxuserrun  "max_user_run"
220#define ATTR_qtype       "queue_type"
221#define ATTR_rescassn    "resources_assigned"
222#define ATTR_rescdflt    "resources_default"
223#define ATTR_rescmax     "resources_max"
224#define ATTR_rescmin     "resources_min"
225#define ATTR_featreqd    "features_required"
226#define ATTR_req_login_property "required_login_property"
227#define ATTR_rerunnable  "restartable"      /* TORQUE only */
228#define ATTR_rndzretry   "rendezvous_retry"
229#define ATTR_routedest   "route_destinations"
230#define ATTR_routeheld   "route_held_jobs"
231#define ATTR_routewait   "route_waiting_jobs"
232#define ATTR_routeretry  "route_retry_time"
233#define ATTR_routelife   "route_lifetime"
234#define ATTR_rsvexpdt    "reserved_expedite"
235#define ATTR_rsvsync     "reserved_sync"
236#define ATTR_start       "started"
237#define ATTR_count       "state_count"
238#define ATTR_number      "number_jobs"
239#define ATTR_acllogic    "acl_logic_or"
240#define ATTR_aclgrpslpy  "acl_group_sloppy"
241#define ATTR_keepcompleted "keep_completed"
242#define ATTR_disallowedtypes "disallowed_types"
243#define ATTR_is_transit  "is_transit"
244
245/* additional server attributes names */
246
247/* NOTE: steps for adding new attribute described in ??? */
248/*  - create #define ATTR_* in include/pbs_ifl.h
249    - insert SRV_ATR_* in include/server.h
250    - add ATTR_* in include/qmgr_svr_public.h
251    - insert structure in server/svr_attr_def.c
252        NOTE:  structure must be in same relative position as SRV_ATR_*
253    - insert usage code in proper location
254*/
255
256#define ATTR_aclroot     "acl_roots"
257#define ATTR_managers    "managers"
258#define ATTR_dfltque     "default_queue"
259#define ATTR_dispsvrsuffix "display_job_server_suffix"
260#define ATTR_jobsuffixalias "job_suffix_alias"
261#define ATTR_defnode     "default_node"
262#define ATTR_locsvrs     "location_servers"
263#define ATTR_logevents   "log_events"
264#define ATTR_logfile     "log_file"
265#define ATTR_loglevel    "log_level"
266#define ATTR_mailfrom    "mail_from"
267#define ATTR_nodepack    "node_pack"
268#define ATTR_nodesuffix  "node_suffix"
269#define ATTR_operators   "operators"
270#define ATTR_queryother  "query_other_jobs"
271#define ATTR_resccost    "resources_cost"
272#define ATTR_rescavail   "resources_available"
273#define ATTR_schedit     "scheduler_iteration"
274#define ATTR_scheduling  "scheduling"
275#define ATTR_status      "server_state"
276#define ATTR_syscost     "system_cost"
277#define ATTR_pingrate    "node_ping_rate"
278#define ATTR_ndchkrate   "node_check_rate"
279#define ATTR_tcptimeout  "tcp_timeout"
280#define ATTR_jobstatrate "job_stat_rate"
281#define ATTR_polljobs    "poll_jobs"
282#define ATTR_downonerror "down_on_error"
283#define ATTR_disableserveridcheck "disable_server_id_check"
284#define ATTR_jobnanny    "job_nanny"
285#define ATTR_ownerpurge  "owner_purge"
286#define ATTR_qcqlimits   "queue_centric_limits"
287#define ATTR_momjobsync  "mom_job_sync"
288#define ATTR_maildomain  "mail_domain"
289#define ATTR_pbsversion  "pbs_version"
290#define ATTR_submithosts "submit_hosts"
291#define ATTR_allownodesubmit  "allow_node_submit"
292#define ATTR_allowproxyuser   "allow_proxy_user"
293#define ATTR_autonodenp  "auto_node_np"
294#define ATTR_servername  "server_name"
295#define ATTR_logfilemaxsize "log_file_max_size"
296#define ATTR_logfilerolldepth "log_file_roll_depth"
297#define ATTR_logkeepdays  "log_keep_days"
298#define ATTR_nextjobnum   "next_job_number"
299#define ATTR_extraresc    "extra_resc"
300#define ATTR_schedversion "sched_version"
301#define ATTR_acctkeepdays "accounting_keep_days"
302#define ATTR_lockfile "lock_file"
303#define ATTR_credentiallifetime "credential_lifetime"
304#define ATTR_jobmustreport "job_must_report"
305#define ATTR_LockfileUpdateTime "lock_file_update_time"
306#define ATTR_LockfileCheckTime "lock_file_check_time"
307#define ATTR_npdefault  "np_default"
308#define ATTR_clonebatchsize "clone_batch_size"
309#define ATTR_clonebatchdelay "clone_batch_delay"
310#define ATTR_jobstarttimeout "job_start_timeout"
311#define ATTR_jobforcecanceltime "job_force_cancel_time"
312#define ATTR_maxarraysize    "max_job_array_size"
313#define ATTR_maxslotlimit    "max_slot_limit"
314#define ATTR_recordjobinfo   "record_job_info"
315#define ATTR_recordjobscript   "record_job_script"
316#define ATTR_joblogfilemaxsize "job_log_file_max_size"
317#define ATTR_joblogfilerolldepth "job_log_file_roll_depth"
318#define ATTR_joblogkeepdays  "job_log_keep_days"
319#ifdef MUNGE_AUTH
320  #define ATTR_authusers       "authorized_users"
321#endif
322#define ATTR_minthreads          "min_threads"
323#define ATTR_maxthreads          "max_threads"
324#define ATTR_threadidleseconds   "thread_idle_seconds"
325#define ATTR_moabarraycompatible "moab_array_compatible"
326#define ATTR_nomailforce             "no_mail_force"
327#define ATTR_interactivejobscanroam  "interactive_jobs_can_roam"
328#define ATTR_crayenabled             "cray_enabled"
329#define ATTR_nppcu                   "nppcu"
330#define ATTR_login_node_key          "login_node_key"
331#define ATTR_maxuserqueuable         "max_user_queuable"
332#define ATTR_automaticrequeueexitcode "automatic_requeue_exit_code"
333#define ATTR_jobsynctimeout           "job_sync_timeout"
334#define ATTR_pass_cpu_clock           "pass_cpu_clock"
335/* additional node "attributes" names */
336
337#define ATTR_NODE_state            "state"
338#define ATTR_NODE_power_state      "power_state"
339#define ATTR_NODE_np               "np"
340#define ATTR_NODE_properties       "properties"
341#define ATTR_NODE_ntype            "ntype"
342#define ATTR_NODE_jobs             "jobs"
343#define ATTR_NODE_status           "status"
344#define ATTR_NODE_note             "note"
345#define ATTR_NODE_mom_port             "mom_service_port"
346#define ATTR_NODE_mom_rm_port      "mom_manager_port"
347#define ATTR_NODE_num_node_boards  "num_node_boards"
348#define ATTR_NODE_numa_str         "numa_board_str"
349#define ATTR_NODE_gpus             "gpus"
350#define ATTR_NODE_gpustatus        "gpu_status"
351#define ATTR_NODE_gpus_str         "numa_gpu_node_str"
352#define ATTR_NODE_mics             "mics"
353#define ATTR_NODE_micstatus        "mic_status"
354
355#define ATTR_copy_on_rerun         "copy_on_rerun"
356#define ATTR_job_exclusive_on_use   "job_exclusive_on_use"
357
358/* notification email formating */
359#define ATTR_mailsubjectfmt "mail_subject_fmt"
360#define ATTR_mailbodyfmt    "mail_body_fmt"
361
362
363/* various attribute values */
364
365#define CHECKPOINT_UNSPECIFIED "u"
366#define NO_HOLD "n"
367#define NO_JOIN "n"
368#define NO_KEEP "n"
369#define MAIL_AT_ABORT "a"
370#define DEFAULT_PRIORITY "0"
371
372
373
374#define ARRAY_RANGE  "array_range=" /* see qdel.c */
375#define DELDELAY     "deldelay=" /* see qdel.c */
376#define DELPURGE     "delpurge="   /* see qdel.c */
377#define DELASYNC     "delasync"   /* see req_delete.c */
378#define PURGECOMP    "purgecomplete="   /* see req_delete.c */
379#define EXECQUEONLY  "exec_queue_only"   /* see req_stat.c */
380#define RERUNFORCE   "force"
381
382#define USER_HOLD   "u"
383#define OTHER_HOLD  "o"
384#define SYSTEM_HOLD "s"
385
386/* node-attribute values (state,ntype) */
387
388#define ND_free          "free"
389#define ND_offline       "offline"
390#define ND_down          "down"
391#define ND_reserve       "reserve"
392#define ND_job_exclusive "job-exclusive"
393#define ND_job_sharing   "job-sharing"
394#define ND_busy          "busy"
395#define ND_state_unknown "state-unknown"
396
397/* node power state values */
398
399#define ND_running       "Running"
400#define ND_standby       "Standby"
401#define ND_suspend       "Suspend"
402#define ND_sleep         "Sleep"
403#define ND_hibernate     "Hibernate"
404#define ND_shutdown      "Shutdown"
405
406/* these are not state values, they describe states and are used in pbsnodes */
407/* active = job-exclusive, job-sharing, or busy */
408#define ND_active        "active"
409/* all = all */
410#define ND_all           "all"
411/* up = job-execlusive, job-sharing, reserve, free, busy and time-shared */
412#define ND_up            "up"
413
414/* this specifies the type of node */
415#define ND_timeshared    "time-shared"
416#define ND_cluster       "cluster"
417
418/* queue disallowed types */
419#define Q_DT_batch              "batch"
420#define Q_DT_interactive        "interactive"
421#define Q_DT_rerunable          "rerunable"
422#define Q_DT_nonrerunable       "nonrerunable"
423#define Q_DT_fault_tolerant     "fault_tolerant"
424#define Q_DT_fault_intolerant   "fault_intolerant"
425#define Q_DT_job_array          "job_array"
426
427/*constant related to sum of string lengths for above strings*/
428#define MAX_ENCODE_BFR  150
429
430#define MGR_CMD_CREATE 0
431#define MGR_CMD_DELETE 1
432#define MGR_CMD_SET 2
433#define MGR_CMD_UNSET 3
434#define MGR_CMD_LIST 4
435#define MGR_CMD_PRINT 5
436#define MGR_CMD_ACTIVE 6
437
438#define MGR_OBJ_NONE -1
439#define MGR_OBJ_SERVER  0
440#define MGR_OBJ_QUEUE   1
441#define MGR_OBJ_JOB 2
442#define MGR_OBJ_NODE 3
443
444/* Misc defines for various requests */
445
446#define MSG_OUT 1
447#define MSG_ERR 2
448
449#define SHUT_SIG -1
450#define SHUT_IMMEDIATE 0
451#define SHUT_DELAY 1
452#define SHUT_QUICK 2
453
454#define SIG_RESUME "resume"
455#define SIG_SUSPEND "suspend"
456
457
458/* WARNING: be careful changing these PBS_MAX* values.  They can result in a
459   change in the structure of the .JB file, and binary incompatibilities between
460   versions of TORQUE.  Do not change in a -fixes branch, avoid changing in
461   a minor release if possible */
462
463
464
465#define PBS_MAXHOSTNAME  1024 /* max host name length */
466#ifndef MAXPATHLEN
467#define MAXPATHLEN  1024 /* max path name length */
468#endif
469
470#ifndef MAXPORTLEN
471#define MAXPORTLEN  5
472#endif
473
474#ifndef MAXNAMLEN
475#define MAXNAMLEN  255
476#endif
477#define MAX_NOTE  256 /* max node note length */
478#define MAX_NOTE_STR  "256" /* max node note length as a string literal (this MUST match MAX_NOTE) */
479
480#define PBS_MAXUSER  32 /* max user name length */
481#define PBS_MAXGRPN  16 /* max group name length */
482#define PBS_MAXGPUID 16 /* max gpu id length */
483#define PBS_MAXQUEUENAME 15 /* max queue name length */
484#define PBS_MAXSERVERNAME PBS_MAXHOSTNAME /* max server name length */
485#define PBS_MAXJOBARRAYLEN      7       /* number of characters allowed in jobarray portion of job id, including '[]' */
486#ifdef USE_MAXINT_JOBIDS
487#define PBS_MAXSEQNUM  12 /* max sequence number length */
488#else
489#define PBS_MAXSEQNUM  8 /* max sequence number length */
490#endif
491#define PBS_MAXPORTNUM  5 /* udp/tcp port numbers max=16 bits */
492#define PBS_MAXJOBARRAY  99999
493#define PBS_MAXSVRJOBID  (PBS_MAXSEQNUM + PBS_MAXSERVERNAME + PBS_MAXPORTNUM + PBS_MAXJOBARRAYLEN + 2 ) /* server job id size */
494#define PBS_MAXCLTJOBID  (PBS_MAXSVRJOBID + PBS_MAXSERVERNAME + PBS_MAXPORTNUM + PBS_MAXJOBARRAYLEN + 2) /* client job id size */
495#define PBS_MAXDEST  1024  /* destination size -- increased from 256 */
496#define PBS_MAXROUTEDEST (PBS_MAXQUEUENAME + PBS_MAXSERVERNAME + PBS_MAXPORTNUM + 2) /* destination size */
497#define PBS_USE_IFF  1 /* pbs_connect() to call pbs_iff */
498#define PBS_INTERACTIVE  1 /* Support of Interactive jobs */
499#define PBS_TERM_BUF_SZ  80 /* Interactive term buffer size */
500#define PBS_TERM_CCA  6 /* Interactive term cntl char array */
501
502#define PBS_MAXCREDENTIAL_LEN 2048 /* Maximum authentication credential length. */
503/* constants used to indicate version of job ji_qs struct written to disk.
504   starting with 2.4.0 we stopped encoding the torque version number into the
505   hex value e.g. 0x00020300 for torque v2.3.0. Now we just increment a value
506   which is added to the last version encoded that way */
507#define PBS_QS_VERSION_BASE 0x00020300 /* magic number do not change */
508#define PBS_QS_VERSION_INT 2 /* increment this version number with every change to the ji_qs struct */
509#define PBS_QS_VERSION  (PBS_QS_VERSION_BASE + PBS_QS_VERSION_INT) /* version number saved in the ji_qs struct */
510
511/* someday the PBS_*_PORT definition will go away and only the */
512/* PBS_*_SERVICE_NAME form will be used, maybe   */
513
514#define PBS_BATCH_SERVICE_NAME  "pbs"
515
516#ifndef PBS_BATCH_SERVICE_PORT
517#define PBS_BATCH_SERVICE_PORT  15001
518#endif /* PBS_BATCH_SERVICE_PORT */
519
520#define PBS_BATCH_SERVICE_NAME_DIS "pbs_dis" /* new DIS port   */
521
522#define PBS_MOM_SERVICE_NAME  "pbs_mom"
523
524#ifndef PBS_MOM_SERVICE_PORT
525#define PBS_MOM_SERVICE_PORT  15002
526#endif /* PBS_MOM_SERVICE_PORT */
527
528#define PBS_MANAGER_SERVICE_NAME "pbs_resmon"
529
530#ifndef PBS_MANAGER_SERVICE_PORT
531#define PBS_MANAGER_SERVICE_PORT 15003
532#endif /* PBS_MANAGER_SERVICE_PORT */
533
534#define PBS_SCHEDULER_SERVICE_NAME "pbs_sched"
535
536#ifndef PBS_SCHEDULER_SERVICE_PORT
537#define PBS_SCHEDULER_SERVICE_PORT 15004
538#endif /* PBS_SCHEDULER_SERVICE_PORT */
539
540#ifndef TRQ_AUTHD_SERVICE_PORT
541#define TRQ_AUTHD_SERVICE_PORT 15005
542#endif /* TRQ_AUTHD_SERVICE_PORT */
543
544/*
545 * Other misc checkpoint defines
546 */
547#define CHECKPOINTHOLD "checkpoint_hold"
548#define CHECKPOINTCONT "checkpoint_cont"
549#define MOM_DEFAULT_CHECKPOINT_DIR "$MOMDEFAULTCHECKPOINTDIR$"
550
551#define NO_MOM_RELAY 1
552
553enum batch_op { SET, UNSET, INCR, DECR, EQ, NE, GE, GT, LE, LT, DFLT, MERGE, INCR_OLD };
554
555/* ALPS nppcu values */
556enum nppcu_values { NPPCU_ALPS_CHOOSES = 0, NPPCU_NO_USE_HT, NPPCU_USE_HT };
557
558/*
559** This structure is identical to attropl so they can be used
560** interchangably.  The op field is not used.
561*/
562
563struct attrl
564  {
565
566  struct attrl  *next;
567  char          *name;
568  char          *resource;
569  char          *value;
570  enum batch_op  op; /* not used */
571  };
572
573struct attropl
574  {
575
576  struct attropl *next;
577  char   *name;
578  char   *resource;
579  char   *value;
580  enum batch_op   op;
581  };
582
583struct batch_status
584  {
585
586  struct batch_status *next;
587  char                *name;
588
589  struct attrl        *attribs;
590  char                *text;
591  };
592
593
594
595
596/* Resource Reservation Information */
597typedef int resource_t;  /* resource reservation handle */
598
599#define RESOURCE_T_NULL  (resource_t)0
600#define RESOURCE_T_ALL  (resource_t)-1
601
602extern char *pbs_server; /* server attempted to connect | connected to */
603
604#ifdef __cplusplus
605extern "C"
606{
607#endif
608/* see pbs_connect(3B)         */
609
610char *avail(int connect, char *resc);
611int pbs_asyrunjob(int c, char *jobid, char *location, char *extend);
612int pbs_alterjob_async(int connect, char *job_id, struct attrl *attrib, char *extend);
613int pbs_alterjob(int connect, char *job_id, struct attrl *attrib, char *extend);
614int pbs_connect(char *server);
615int pbs_query_max_connections();
616char *pbs_default(void);
617char *pbs_fbserver(void);
618char *pbs_get_server_list(void);
619
620int pbs_deljob(int connect, char *job_id, char *extend);
621int pbs_disconnect(int connect);
622char *pbs_geterrmsg(int connect);
623int pbs_holdjob(int connect, char *job_id, char *hold_type, char *extend);
624int pbs_checkpointjob(int connect, char *job_id, char *extend);
625char *pbs_locjob(int connect, char *job_id, char *extend);
626
627int pbs_manager(int connect, int command, int obj_type, char *obj_name, struct attropl *attrib, char *extend);
628
629int pbs_movejob(int connect, char *job_id, char *destination, char *extend);
630
631int pbs_msgjob(int connect, char *job_id, int file, char *message, char *extend);
632
633int pbs_orderjob(int connect, char *job1, char *job2, char *extend);
634
635int pbs_rescquery(int connect, char **rlist, int nresc, int *avail,
636                    int *alloc, int *resv, int *down);
637
638int pbs_rescreserve(int connect, char **rlist, int nresc, resource_t *phandle);
639
640int pbs_rescrelease(int connect, resource_t rhandle);
641
642int pbs_rerunjob(int connect, char *job_id, char *extend);
643
644int pbs_rlsjob(int connect, char *job_id, char *hold_type, char *extend);
645
646int pbs_runjob(int connect, char *jobid, char *loc, char *extend);
647
648char **pbs_selectjob(int connect, struct attropl *select_list, char *extend);
649
650int pbs_sigjob(int connect, char *job_id, char *signal, char *extend);
651
652int pbs_sigjobasync(int connect, char *job_id, char *signal, char *extend);
653
654void pbs_statfree(struct batch_status *stat);
655
656struct batch_status *pbs_statjob(int connect, char *id, struct attrl *attrib, char *extend);
657
658struct batch_status *pbs_selstat(int connect, struct attropl *select_list, char *extend);
659
660struct batch_status *pbs_statque(int connect, char *id, struct attrl *attrib, char *extend);
661
662struct batch_status *pbs_statserver(int connect, struct attrl *attrib, char *extend);
663
664struct batch_status *pbs_statnode(int connect, char *id, struct attrl *attrib, char *extend);
665
666char *pbs_submit(int connect, struct attropl *attrib, char *script, char *destination, char *extend);
667
668int pbs_submit_hash_ext(int connect, void *job_attr, void *res_attr, char *script, char *destination, char *extend, char **job_id, char **msg);
669
670int pbs_terminate(int connect, int manner, char *extend);
671
672int totpool(int connect, int update);
673
674int usepool(int connect, int update);
675
676int pbs_gpumode(int connect, char *node, char *gpuid, int gpumode);
677
678int trq_set_preferred_network_interface(char *if_name, struct sockaddr *preferred_addr);
679char *trq_get_if_name(void);
680
681/* used by Moab */
682int pbs_stagein(int, char *, char *, char *);
683
684#ifdef __cplusplus
685}
686#endif
687#endif /* _PBS_IFL_DEF */
688
689/*  end of pbs_ifl.h  */
Note: See TracBrowser for help on using the repository browser.