source: devel/C++/pbs_ifl.h @ 309

Last change on this file since 309 was 309, checked in by bas, 10 years ago

Checkin the pbs swig development files

File size: 24.8 KB
Line 
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#include "u_hash_map_structs.h"
91#include "u_memmgr.h"
92
93/* Attribute Names used by user commands */
94
95#define ATTR_a "Execution_Time"
96#define ATTR_c "Checkpoint"
97#define ATTR_e "Error_Path"
98#define ATTR_f "fault_tolerant"
99#define ATTR_g "group_list"
100#define ATTR_h "Hold_Types"
101#define ATTR_j "Join_Path"
102#define ATTR_k "Keep_Files"
103#define ATTR_l "Resource_List"
104#define ATTR_m "Mail_Points"
105#define ATTR_o "Output_Path"
106#define ATTR_p "Priority"
107#define ATTR_q "destination"
108#define ATTR_r "Rerunable"
109#define ATTR_t "job_array_request"
110#define ATTR_array_id "job_array_id"
111#define ATTR_u "User_List"
112#define ATTR_v "Variable_List"
113#define ATTR_A "Account_Name"
114#define ATTR_args "job_arguments"
115#define ATTR_reservation_id "reservation_id"
116#define ATTR_login_node_id "login_node_id"
117#define ATTR_login_prop "login_property"
118#define ATTR_external_nodes "external_nodes"
119#define ATTR_multi_req_alps "multi_req_alps"
120#define ATTR_M "Mail_Users"
121#define ATTR_N "Job_Name"
122#define ATTR_S "Shell_Path_List"
123#define ATTR_depend   "depend"
124#define ATTR_inter    "interactive"
125#define ATTR_stagein  "stagein"
126#define ATTR_stageout "stageout"
127#define ATTR_jobtype  "jobtype"
128#define ATTR_submit_host "submit_host"
129#define ATTR_init_work_dir "init_work_dir"
130/* The following were part of the variable_list */
131#define ATTR_pbs_o_initdir          "PBS_O_INITDIR"
132#define ATTR_pbs_o_rootdir          "PBS_O_ROOTDIR"
133#define ATTR_pbs_o_workdir          "PBS_O_WORKDIR" /* same as init_work_dir */
134#define ATTR_pbs_o_host             "PBS_O_HOST" /* same as submit_host */
135#define ATTR_pbs_o_server           "PBS_O_SERVER"
136#define ATTR_pbs_o_home             "PBS_O_HOME"
137#define ATTR_pbs_o_logname          "PBS_O_LOGNAME"
138#define ATTR_pbs_o_path             "PBS_O_PATH"
139#define ATTR_pbs_o_mail             "PBS_O_MAIL"
140#define ATTR_pbs_o_shell            "PBS_O_SHELL"
141#define ATTR_pbs_o_tz               "PBS_O_TZ"
142#define ATTR_pbs_o_lang             "PBS_O_LANG"
143#define ATTR_pbs_o_uid              "PBS_O_UID"
144#define ATTR_pbs_o_submit_filter    "PBS_O_SUBMIT_FILTER"
145
146/* additional job and general attribute names */
147
148#define ATTR_ctime      "ctime"
149#define ATTR_exechost   "exec_host"
150#define ATTR_execport   "exec_port"
151#define ATTR_mtime      "mtime"
152#define ATTR_qtime      "qtime"
153#define ATTR_session    "session_id"
154#define ATTR_euser      "euser"
155#define ATTR_egroup     "egroup"
156#define ATTR_hashname   "hashname"
157#define ATTR_hopcount   "hop_count"
158#define ATTR_security   "security"
159#define ATTR_sched_hint "sched_hint"
160#define ATTR_substate   "substate"
161#define ATTR_name       "Job_Name"
162#define ATTR_owner      "Job_Owner"
163#define ATTR_used       "resources_used"
164#define ATTR_state      "job_state"
165#define ATTR_queue      "queue"
166#define ATTR_server     "server"
167#define ATTR_maxrun     "max_running"
168#define ATTR_maxreport  "max_report"
169#define ATTR_total      "total_jobs"
170#define ATTR_comment    "comment"
171#define ATTR_cookie     "cookie"
172#define ATTR_qrank      "queue_rank"
173#define ATTR_altid      "alt_id"
174#define ATTR_etime      "etime"
175#define ATTR_exitstat   "exit_status"
176#define ATTR_forwardx11 "forward_x11"
177#define ATTR_submit_args "submit_args"
178#define ATTR_tokens     "tokens"
179#define ATTR_netcounter "net_counter"
180#define ATTR_umask      "umask"
181#define ATTR_start_time "start_time"
182#define ATTR_start_count "start_count"
183#define ATTR_checkpoint_dir  "checkpoint_dir"    /* user specified directory for checkpoint files */
184#define ATTR_checkpoint_name  "checkpoint_name"   /* user specified name of checkpoint file */
185#define ATTR_checkpoint_time  "checkpoint_time"   /* timestamp of start of last checkpoint */
186#define ATTR_checkpoint_restart_status  "checkpoint_restart_status"   /* checkpoint restart status */
187#define ATTR_restart_name       "restart_name"   /* saved name of checkpoint restart file */
188#define ATTR_comp_time          "comp_time"
189#define ATTR_reported           "reported"
190#define ATTR_intcmd             "inter_cmd"
191#define ATTR_job_radix          "job_radix"
192#define ATTR_sister_list        "sister_list"
193#define ATTR_total_runtime  "total_runtime"
194#define ATTR_P           "proxy_user"
195#define ATTR_node_exclusive "node_exclusive"
196#define ATTR_exec_gpus   "exec_gpus"
197#define ATTR_exec_mics   "exec_mics"
198#define ATTR_J           "job_id"
199#define ATTR_pagg         "pagg_id"
200#define ATTR_system_start_time "system_start_time"
201  /* JOB_ATR_gpu_flags */
202#define ATTR_gpu_flags          "gpu_flags"
203
204/* additional queue attributes names */
205
206#define ATTR_aclgren    "acl_group_enable"
207#define ATTR_aclgroup   "acl_groups"
208#define ATTR_aclhten    "acl_host_enable"
209#define ATTR_aclhost    "acl_hosts"
210#define ATTR_acluren    "acl_user_enable"
211#define ATTR_acluser    "acl_users"
212#define ATTR_altrouter  "alt_router"
213#define ATTR_checkpoint_min  "checkpoint_min"
214#define ATTR_checkpoint_defaults  "checkpoint_defaults"
215#define ATTR_enable     "enabled"
216#define ATTR_fromroute  "from_route_only"
217#define ATTR_hostlist    "hostlist"         /* TORQUE only */
218#define ATTR_killdelay   "kill_delay"
219#define ATTR_maxgrprun   "max_group_run"
220#define ATTR_maxque      "max_queuable"
221#define ATTR_maxuserque  "max_user_queuable"
222#define ATTR_maxuserrun  "max_user_run"
223#define ATTR_qtype       "queue_type"
224#define ATTR_rescassn    "resources_assigned"
225#define ATTR_rescdflt    "resources_default"
226#define ATTR_rescmax     "resources_max"
227#define ATTR_rescmin     "resources_min"
228#define ATTR_featreqd    "features_required"
229#define ATTR_req_login_property "required_login_property"
230#define ATTR_rerunnable  "restartable"      /* TORQUE only */
231#define ATTR_rndzretry   "rendezvous_retry"
232#define ATTR_routedest   "route_destinations"
233#define ATTR_routeheld   "route_held_jobs"
234#define ATTR_routewait   "route_waiting_jobs"
235#define ATTR_routeretry  "route_retry_time"
236#define ATTR_routelife   "route_lifetime"
237#define ATTR_rsvexpdt    "reserved_expedite"
238#define ATTR_rsvsync     "reserved_sync"
239#define ATTR_start       "started"
240#define ATTR_count       "state_count"
241#define ATTR_number      "number_jobs"
242#define ATTR_acllogic    "acl_logic_or"
243#define ATTR_aclgrpslpy  "acl_group_sloppy"
244#define ATTR_keepcompleted "keep_completed"
245#define ATTR_disallowedtypes "disallowed_types"
246#define ATTR_is_transit  "is_transit"
247
248/* additional server attributes names */
249
250/* NOTE: steps for adding new attribute described in ??? */
251/*  - create #define ATTR_* in include/pbs_ifl.h
252    - insert SRV_ATR_* in include/server.h
253    - add ATTR_* in include/qmgr_svr_public.h
254    - insert structure in server/svr_attr_def.c
255        NOTE:  structure must be in same relative position as SRV_ATR_*
256    - insert usage code in proper location
257*/
258
259#define ATTR_aclroot     "acl_roots"
260#define ATTR_managers    "managers"
261#define ATTR_dfltque     "default_queue"
262#define ATTR_dispsvrsuffix "display_job_server_suffix"
263#define ATTR_jobsuffixalias "job_suffix_alias"
264#define ATTR_defnode     "default_node"
265#define ATTR_locsvrs     "location_servers"
266#define ATTR_logevents   "log_events"
267#define ATTR_logfile     "log_file"
268#define ATTR_loglevel    "log_level"
269#define ATTR_mailfrom    "mail_from"
270#define ATTR_nodepack    "node_pack"
271#define ATTR_nodesuffix  "node_suffix"
272#define ATTR_operators   "operators"
273#define ATTR_queryother  "query_other_jobs"
274#define ATTR_resccost    "resources_cost"
275#define ATTR_rescavail   "resources_available"
276#define ATTR_schedit     "scheduler_iteration"
277#define ATTR_scheduling  "scheduling"
278#define ATTR_status      "server_state"
279#define ATTR_syscost     "system_cost"
280#define ATTR_pingrate    "node_ping_rate"
281#define ATTR_ndchkrate   "node_check_rate"
282#define ATTR_tcptimeout  "tcp_timeout"
283#define ATTR_jobstatrate "job_stat_rate"
284#define ATTR_polljobs    "poll_jobs"
285#define ATTR_downonerror "down_on_error"
286#define ATTR_disableserveridcheck "disable_server_id_check"
287#define ATTR_jobnanny    "job_nanny"
288#define ATTR_ownerpurge  "owner_purge"
289#define ATTR_qcqlimits   "queue_centric_limits"
290#define ATTR_momjobsync  "mom_job_sync"
291#define ATTR_maildomain  "mail_domain"
292#define ATTR_pbsversion  "pbs_version"
293#define ATTR_submithosts "submit_hosts"
294#define ATTR_allownodesubmit  "allow_node_submit"
295#define ATTR_allowproxyuser   "allow_proxy_user"
296#define ATTR_autonodenp  "auto_node_np"
297#define ATTR_servername  "server_name"
298#define ATTR_logfilemaxsize "log_file_max_size"
299#define ATTR_logfilerolldepth "log_file_roll_depth"
300#define ATTR_logkeepdays  "log_keep_days"
301#define ATTR_nextjobnum   "next_job_number"
302#define ATTR_extraresc    "extra_resc"
303#define ATTR_schedversion "sched_version"
304#define ATTR_acctkeepdays "accounting_keep_days"
305#define ATTR_lockfile "lock_file"
306#define ATTR_credentiallifetime "credential_lifetime"
307#define ATTR_jobmustreport "job_must_report"
308#define ATTR_LockfileUpdateTime "lock_file_update_time"
309#define ATTR_LockfileCheckTime "lock_file_check_time"
310#define ATTR_npdefault  "np_default"
311#define ATTR_clonebatchsize "clone_batch_size"
312#define ATTR_clonebatchdelay "clone_batch_delay"
313#define ATTR_jobstarttimeout "job_start_timeout"
314#define ATTR_jobforcecanceltime "job_force_cancel_time"
315#define ATTR_maxarraysize    "max_job_array_size"
316#define ATTR_maxslotlimit    "max_slot_limit"
317#define ATTR_recordjobinfo   "record_job_info"
318#define ATTR_recordjobscript   "record_job_script"
319#define ATTR_joblogfilemaxsize "job_log_file_max_size"
320#define ATTR_joblogfilerolldepth "job_log_file_roll_depth"
321#define ATTR_joblogkeepdays  "job_log_keep_days"
322#ifdef MUNGE_AUTH
323  #define ATTR_authusers       "authorized_users"
324#endif
325#define ATTR_minthreads          "min_threads"
326#define ATTR_maxthreads          "max_threads"
327#define ATTR_threadidleseconds   "thread_idle_seconds"
328#define ATTR_moabarraycompatible "moab_array_compatible"
329#define ATTR_nomailforce             "no_mail_force"
330#define ATTR_interactivejobscanroam  "interactive_jobs_can_roam"
331#define ATTR_crayenabled             "cray_enabled"
332#define ATTR_nppcu                   "nppcu"
333#define ATTR_maxuserqueuable         "max_user_queuable"
334#define ATTR_automaticrequeueexitcode "automatic_requeue_exit_code"
335#define ATTR_jobsynctimeout           "job_sync_timeout"
336/* additional node "attributes" names */
337
338#define ATTR_NODE_state            "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/* notification email formating */
356#define ATTR_mailsubjectfmt "mail_subject_fmt"
357#define ATTR_mailbodyfmt    "mail_body_fmt"
358
359
360/* various attribute values */
361
362#define CHECKPOINT_UNSPECIFIED "u"
363#define NO_HOLD "n"
364#define NO_JOIN "n"
365#define NO_KEEP "n"
366#define MAIL_AT_ABORT "a"
367#define DEFAULT_PRIORITY "0"
368
369
370
371#define ARRAY_RANGE  "array_range=" /* see qdel.c */
372#define DELDELAY     "deldelay=" /* see qdel.c */
373#define DELPURGE     "delpurge="   /* see qdel.c */
374#define DELASYNC     "delasync"   /* see req_delete.c */
375#define PURGECOMP    "purgecomplete="   /* see req_delete.c */
376#define EXECQUEONLY  "exec_queue_only"   /* see req_stat.c */
377#define RERUNFORCE   "force"
378
379#define USER_HOLD   "u"
380#define OTHER_HOLD  "o"
381#define SYSTEM_HOLD "s"
382
383/* node-attribute values (state,ntype) */
384
385#define ND_free          "free"
386#define ND_offline       "offline"
387#define ND_down          "down"
388#define ND_reserve       "reserve"
389#define ND_job_exclusive "job-exclusive"
390#define ND_job_sharing   "job-sharing"
391#define ND_busy          "busy"
392#define ND_state_unknown "state-unknown"
393
394/* these are not state values, they describe states and are used in pbsnodes */
395/* active = job-exclusive, job-sharing, or busy */
396#define ND_active        "active"
397/* all = all */
398#define ND_all           "all"
399/* up = job-execlusive, job-sharing, reserve, free, busy and time-shared */
400#define ND_up            "up"
401
402/* this specifies the type of node */
403#define ND_timeshared    "time-shared"
404#define ND_cluster       "cluster"
405
406/* queue disallowed types */
407#define Q_DT_batch              "batch"
408#define Q_DT_interactive        "interactive"
409#define Q_DT_rerunable          "rerunable"
410#define Q_DT_nonrerunable       "nonrerunable"
411#define Q_DT_fault_tolerant     "fault_tolerant"
412#define Q_DT_fault_intolerant   "fault_intolerant"
413#define Q_DT_job_array          "job_array"
414
415/*constant related to sum of string lengths for above strings*/
416#define MAX_ENCODE_BFR  150
417
418#define MGR_CMD_CREATE 0
419#define MGR_CMD_DELETE 1
420#define MGR_CMD_SET 2
421#define MGR_CMD_UNSET 3
422#define MGR_CMD_LIST 4
423#define MGR_CMD_PRINT 5
424#define MGR_CMD_ACTIVE 6
425
426#define MGR_OBJ_NONE -1
427#define MGR_OBJ_SERVER  0
428#define MGR_OBJ_QUEUE   1
429#define MGR_OBJ_JOB 2
430#define MGR_OBJ_NODE 3
431
432/* Misc defines for various requests */
433
434#define MSG_OUT 1
435#define MSG_ERR 2
436
437#define SHUT_SIG -1
438#define SHUT_IMMEDIATE 0
439#define SHUT_DELAY 1
440#define SHUT_QUICK 2
441
442#define SIG_RESUME "resume"
443#define SIG_SUSPEND "suspend"
444
445
446/* WARNING: be careful changing these PBS_MAX* values.  They can result in a
447   change in the structure of the .JB file, and binary incompatibilities between
448   versions of TORQUE.  Do not change in a -fixes branch, avoid changing in
449   a minor release if possible */
450
451
452
453#define PBS_MAXHOSTNAME  1024 /* max host name length */
454#ifndef MAXPATHLEN
455#define MAXPATHLEN  1024 /* max path name length */
456#endif
457
458#ifndef MAXPORTLEN
459#define MAXPORTLEN  5
460#endif
461
462#ifndef MAXNAMLEN
463#define MAXNAMLEN  255
464#endif
465#define MAX_NOTE  256 /* max node note length */
466#define MAX_NOTE_STR  "256" /* max node note length as a string literal (this MUST match MAX_NOTE) */
467
468#define PBS_MAXUSER  32 /* max user name length */
469#define PBS_MAXGRPN  16 /* max group name length */
470#define PBS_MAXGPUID 16 /* max gpu id length */
471#define PBS_MAXQUEUENAME 15 /* max queue name length */
472#define PBS_MAXSERVERNAME PBS_MAXHOSTNAME /* max server name length */
473#define PBS_MAXJOBARRAYLEN      7       /* number of characters allowed in jobarray portion of job id, including '[]' */
474#ifdef USE_MAXINT_JOBIDS
475#define PBS_MAXSEQNUM  12 /* max sequence number length */
476#else
477#define PBS_MAXSEQNUM  8 /* max sequence number length */
478#endif
479#define PBS_MAXPORTNUM  5 /* udp/tcp port numbers max=16 bits */
480#define PBS_MAXJOBARRAY  99999
481#define PBS_MAXSVRJOBID  (PBS_MAXSEQNUM + PBS_MAXSERVERNAME + PBS_MAXPORTNUM + PBS_MAXJOBARRAYLEN + 2 ) /* server job id size */
482#define PBS_MAXCLTJOBID  (PBS_MAXSVRJOBID + PBS_MAXSERVERNAME + PBS_MAXPORTNUM + PBS_MAXJOBARRAYLEN + 2) /* client job id size */
483#define PBS_MAXDEST  1024  /* destination size -- increased from 256 */
484#define PBS_MAXROUTEDEST (PBS_MAXQUEUENAME + PBS_MAXSERVERNAME + PBS_MAXPORTNUM + 2) /* destination size */
485#define PBS_USE_IFF  1 /* pbs_connect() to call pbs_iff */
486#define PBS_INTERACTIVE  1 /* Support of Interactive jobs */
487#define PBS_TERM_BUF_SZ  80 /* Interactive term buffer size */
488#define PBS_TERM_CCA  6 /* Interactive term cntl char array */
489
490#define PBS_MAXCREDENTIAL_LEN 2048 /* Maximum authentication credential length. */
491/* constants used to indicate version of job ji_qs struct written to disk.
492   starting with 2.4.0 we stopped encoding the torque version number into the
493   hex value e.g. 0x00020300 for torque v2.3.0. Now we just increment a value
494   which is added to the last version encoded that way */
495#define PBS_QS_VERSION_BASE 0x00020300 /* magic number do not change */
496#define PBS_QS_VERSION_INT 2 /* increment this version number with every change to the ji_qs struct */
497#define PBS_QS_VERSION  (PBS_QS_VERSION_BASE + PBS_QS_VERSION_INT) /* version number saved in the ji_qs struct */
498
499/* someday the PBS_*_PORT definition will go away and only the */
500/* PBS_*_SERVICE_NAME form will be used, maybe   */
501
502#define PBS_BATCH_SERVICE_NAME  "pbs"
503
504#ifndef PBS_BATCH_SERVICE_PORT
505#define PBS_BATCH_SERVICE_PORT  15001
506#endif /* PBS_BATCH_SERVICE_PORT */
507
508#define PBS_BATCH_SERVICE_NAME_DIS "pbs_dis" /* new DIS port   */
509
510#define PBS_MOM_SERVICE_NAME  "pbs_mom"
511
512#ifndef PBS_MOM_SERVICE_PORT
513#define PBS_MOM_SERVICE_PORT  15002
514#endif /* PBS_MOM_SERVICE_PORT */
515
516#define PBS_MANAGER_SERVICE_NAME "pbs_resmon"
517
518#ifndef PBS_MANAGER_SERVICE_PORT
519#define PBS_MANAGER_SERVICE_PORT 15003
520#endif /* PBS_MANAGER_SERVICE_PORT */
521
522#define PBS_SCHEDULER_SERVICE_NAME "pbs_sched"
523
524#ifndef PBS_SCHEDULER_SERVICE_PORT
525#define PBS_SCHEDULER_SERVICE_PORT 15004
526#endif /* PBS_SCHEDULER_SERVICE_PORT */
527
528#ifndef TRQ_AUTHD_SERVICE_PORT
529#define TRQ_AUTHD_SERVICE_PORT 15005
530#endif /* TRQ_AUTHD_SERVICE_PORT */
531
532/*
533 * Other misc checkpoint defines
534 */
535#define CHECKPOINTHOLD "checkpoint_hold"
536#define CHECKPOINTCONT "checkpoint_cont"
537#define MOM_DEFAULT_CHECKPOINT_DIR "$MOMDEFAULTCHECKPOINTDIR$"
538
539#define NO_MOM_RELAY 1
540
541enum batch_op { SET, UNSET, INCR, DECR, EQ, NE, GE, GT, LE, LT, DFLT, MERGE, INCR_OLD };
542
543/* ALPS nppcu values */
544enum nppcu_values { NPPCU_ALPS_CHOOSES = 0, NPPCU_NO_USE_HT, NPPCU_USE_HT };
545
546/*
547** This structure is identical to attropl so they can be used
548** interchangably.  The op field is not used.
549*/
550
551struct attrl
552  {
553
554  struct attrl  *next;
555  char          *name;
556  char          *resource;
557  char          *value;
558  enum batch_op  op; /* not used */
559  };
560
561struct attropl
562  {
563
564  struct attropl *next;
565  char   *name;
566  char   *resource;
567  char   *value;
568  enum batch_op   op;
569  };
570
571struct batch_status
572  {
573
574  struct batch_status *next;
575  char                *name;
576
577  struct attrl        *attribs;
578  char                *text;
579  };
580
581
582
583
584/* Resource Reservation Information */
585typedef int resource_t;  /* resource reservation handle */
586
587#define RESOURCE_T_NULL  (resource_t)0
588#define RESOURCE_T_ALL  (resource_t)-1
589
590extern char *pbs_server; /* server attempted to connect | connected to */
591
592#ifdef __cplusplus
593extern "C"
594{
595#endif
596/* see pbs_connect(3B)         */
597
598char *avail(int connect, char *resc);
599int pbs_asyrunjob(int c, char *jobid, char *location, char *extend);
600int pbs_alterjob_async(int connect, char *job_id, struct attrl *ATTRL, char *extend);
601int pbs_alterjob(int connect, char *job_id, struct attrl *ATTRL, char *extend);
602int pbs_connect(char *server);
603/* HvB
604int pbs_query_max_connections();
605*/
606char *pbs_default(void);
607char *pbs_fbserver(void);
608char *pbs_get_server_list(void);
609
610int pbs_deljob(int connect, char *job_id, char *extend);
611int pbs_disconnect(int connect);
612char *pbs_geterrmsg(int connect);
613int pbs_holdjob(int connect, char *job_id, char *hold_type, char *extend);
614int pbs_checkpointjob(int connect, char *job_id, char *extend);
615char *pbs_locjob(int connect, char *job_id, char *extend);
616
617int pbs_manager(int connect, int command, int obj_type, char *obj_name, struct attropl *ATTROPL, char *extend);
618
619int pbs_movejob(int connect, char *job_id, char *destination, char *extend);
620
621int pbs_msgjob(int connect, char *job_id, int file, char *message, char *extend);
622
623int pbs_orderjob(int connect, char *job1, char *job2, char *extend);
624
625int pbs_rescquery(int connect, char **rlist, int nresc, int *avail,
626                    int *alloc, int *resv, int *down);
627
628int pbs_rescreserve(int connect, char **rlist, int nresc, resource_t *phandle);
629
630int pbs_rescrelease(int connect, resource_t rhandle);
631
632int pbs_rerunjob(int connect, char *job_id, char *extend);
633
634int pbs_rlsjob(int connect, char *job_id, char *hold_type, char *extend);
635
636int pbs_runjob(int connect, char *jobid, char *loc, char *extend);
637
638char **pbs_selectjob(int connect, struct attropl *ATTROPL, char *extend);
639
640int pbs_sigjob(int connect, char *job_id, char *signal, char *extend);
641
642int pbs_sigjobasync(int connect, char *job_id, char *signal, char *extend);
643
644void pbs_statfree(struct batch_status *BATCH_STATUS);
645
646struct batch_status *pbs_statjob(int connect, char *id, struct attrl *ATTRL, char *extend);
647
648struct batch_status *pbs_selstat(int connect, struct attropl *ATTROPL, char *extend);
649
650struct batch_status *pbs_statque(int connect, char *id, struct attrl *ATTRL, char *extend);
651
652struct batch_status *pbs_statserver(int connect, struct attrl *ATTRL, char *extend);
653
654struct batch_status *pbs_statnode(int connect, char *id, struct attrl *ATTRL, char *extend);
655
656char *pbs_submit(int connect, struct attropl *ATTROPL, char *script, char *destination, char *extend);
657
658int pbs_submit_hash(int connect, memmgr **mm, job_data *job_attr, job_data *res_attr, char *script, char *destination, char *extend, char **job_id, char **msg);
659
660int pbs_terminate(int connect, int manner, char *extend);
661
662int totpool(int connect, int update);
663
664int usepool(int connect, int update);
665
666int pbs_gpumode(int connect, char *node, char *gpuid, int gpumode);
667
668int trq_set_preferred_network_interface(char *if_name, struct sockaddr *preferred_addr);
669char *trq_get_if_name(void);
670
671/* used by Moab */
672int pbs_stagein(int, char *, char *, char *);
673
674#ifdef __cplusplus
675}
676#endif
677#endif /* _PBS_IFL_DEF */
678
679/*  end of pbs_ifl.h  */
Note: See TracBrowser for help on using the repository browser.