1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
|
'\" et
.TH QSUB "1P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
.\"
.SH PROLOG
This manual page is part of the POSIX Programmer's Manual.
The Linux implementation of this interface may differ (consult
the corresponding Linux manual page for details of Linux behavior),
or the interface may not be implemented on Linux.
.\"
.SH NAME
qsub
\(em submit a script
.SH SYNOPSIS
.LP
.nf
qsub \fB[\fR-a \fIdate_time\fB] [\fR-A \fIaccount_string\fB] [\fR-c \fIinterval\fB]
[\fR-C \fIdirective_prefix\fB] [\fR-e \fIpath_name\fB] [\fR-h\fB] [\fR-j \fIjoin_list\fB]
[\fR-k \fIkeep_list\fB] [\fR-m \fImail_options\fB] [\fR-M \fImail_list\fB] [\fR-N \fIname\fB]
[\fR-o \fIpath_name\fB] [\fR-p \fIpriority\fB] [\fR-q \fIdestination\fB] [\fR-r \fIy\fR|\fIn\fB]
[\fR-S \fIpath_name_list\fB] [\fR-u \fIuser_list\fB] [\fR-v \fIvariable_list\fB] [\fR-V\fB]
[\fR-z\fB] [\fIscript\fB]\fR
.fi
.SH DESCRIPTION
To submit a script is to create a batch job that executes the script. A
script is submitted by a request to a batch server. The
.IR qsub
utility is a user-accessible batch client that submits a script.
.P
Upon successful completion, the
.IR qsub
utility shall have created a batch job that will execute the submitted
script.
.P
The
.IR qsub
utility shall submit a script by sending a
.IR "Queue Job Request"
to a batch server.
.P
The
.IR qsub
utility shall place the value of the following environment variables in
the
.IR Variable_List
attribute of the batch job:
.IR HOME ,
.IR LANG ,
.IR LOGNAME ,
.IR PATH ,
.IR MAIL ,
.IR SHELL ,
and
.IR TZ .
The name of the environment variable shall be the current name prefixed
with the string PBS_O_.
.TP 10
.BR Note:
If the current value of the
.IR HOME
variable in the environment space of the
.IR qsub
utility is
.BR /aa/bb/cc ,
then
.IR qsub
shall place
.IR PBS_O_HOME =\c
.BR /aa/bb/cc
in the
.IR Variable_List
attribute of the batch job.
.P
.P
In addition to the variables described above, the
.IR qsub
utility shall add the following variables with the indicated values to
the variable list:
.IP "\fIPBS_O_WORKDIR\fP" 14
The absolute path of the current working directory of the
.IR qsub
utility process.
.IP "\fIPBS_O_HOST\fP" 14
The name of the host on which the
.IR qsub
utility is running.
.SH OPTIONS
The
.IR qsub
utility shall conform to the Base Definitions volume of POSIX.1\(hy2017,
.IR "Section 12.2" ", " "Utility Syntax Guidelines".
.P
The following options shall be supported by the implementation:
.IP "\fB\-a\ \fIdate_time\fR" 10
Define the time at which a batch job becomes eligible for execution.
.RS 10
.P
The
.IR qsub
utility shall accept an option-argument that conforms to the syntax of
the
.IR time
operand of the
.IR touch
utility.
.br
.sp
.ce 1
\fBTable 4-19: Environment Variable Values (Utilities)\fR
.TS
center box tab(!);
cB | cB
lI | lI.
Variable Name!Value at qsub Time
_
PBS_O_HOME!HOME
PBS_O_HOST!\fRClient host name\fP
PBS_O_LANG!LANG
PBS_O_LOGNAME!LOGNAME
PBS_O_PATH!PATH
PBS_O_MAIL!MAIL
PBS_O_SHELL!SHELL
PBS_O_TZ!TZ
PBS_O_WORKDIR!\fRCurrent working directory\fP
.TE
.TP 10
.BR Note:
The server that initiates execution of the batch job will add other
variables to the batch job's environment; see
.IR "Section 3.2.2.1" ", " "Batch Job Execution".
.P
.P
The
.IR qsub
utility shall set the
.IR Execution_Time
attribute of the batch job to the number of seconds since the Epoch
that is equivalent to the local time expressed by the value of the
.IR date_time
option-argument. The Epoch is defined in the Base Definitions volume of POSIX.1\(hy2017,
.IR "Section 3.150" ", " "Epoch".
.P
If the
.BR \-a
option is not presented to the
.IR qsub
utility, the utility shall set the
.IR Execution_Time
attribute of the batch job to a time (number of seconds since the
Epoch) that is earlier than the time at which the utility exits.
.RE
.IP "\fB\-A\ \fIaccount_string\fR" 10
.br
Define the account to which the resource consumption of the batch job
should be charged.
.RS 10
.P
The syntax of the
.IR account_string
option-argument is unspecified.
.P
The
.IR qsub
utility shall set the
.IR Account_Name
attribute of the batch job to the value of the
.IR account_string
option-argument.
.P
If the
.BR \-A
option is not presented to the
.IR qsub
utility, the utility shall omit the
.IR Account_Name
attribute from the attributes of the batch job.
.RE
.IP "\fB\-c\ \fIinterval\fR" 10
Define whether the batch job should be checkpointed, and if so, how
often.
.RS 10
.P
The
.IR qsub
utility shall accept a value for the interval option-argument that is
one of the following:
.IP "\fRn\fR" 10
No checkpointing shall be performed on the batch job
(NO_CHECKPOINT).
.IP "\fRs\fR" 10
Checkpointing shall be performed only when the batch server is shut
down (CHECKPOINT_AT_SHUTDOWN).
.IP "\fRc\fR" 10
Automatic periodic checkpointing shall be performed at the
.IR Minimum_Cpu_Interval
attribute of the batch queue, in units of CPU minutes
(CHECKPOINT_AT_MIN_CPU_INTERVAL).
.IP "\fRc\fR=\fIminutes\fR" 10
Automatic periodic checkpointing shall be performed every
.IR minutes
of CPU time, or every
.IR Minimum_Cpu_Interval
minutes, whichever is greater. The
.IR minutes
argument shall conform to the syntax for unsigned integers and shall be
greater than zero.
.P
The
.IR qsub
utility shall set the
.IR Checkpoint
attribute of the batch job to the value of the
.IR interval
option-argument.
.P
If the
.BR \-c
option is not presented to the
.IR qsub
utility, the utility shall set the
.IR Checkpoint
attribute of the batch job to the single character
.BR 'u'
(CHECKPOINT_UNSPECIFIED).
.RE
.IP "\fB\-C\ \fIdirective_prefix\fR" 10
.br
Define the prefix that declares a directive to the
.IR qsub
utility within the script.
.RS 10
.P
The
.IR directive_prefix
is not a batch job attribute; it affects the behavior of the
.IR qsub
utility.
.P
If the
.BR \-C
option is presented to the
.IR qsub
utility, and the value of the
.IR directive_prefix
option-argument is the null string, the utility shall not scan the
script file for directives. If the
.BR \-C
option is not presented to the
.IR qsub
utility, then the value of the
.IR PBS_DPREFIX
environment variable is used. If the environment variable is not
defined, then #PBS encoded in the portable character set is the
default.
.RE
.IP "\fB\-e\ \fIpath_name\fR" 10
.br
Define the path to be used for the standard error stream of the batch
job.
.RS 10
.P
The
.IR qsub
utility shall accept a
.IR path_name
option-argument which can be preceded by a host name element of the
form
.IR hostname :.
.P
If the
.IR path_name
option-argument constitutes an absolute pathname, the
.IR qsub
utility shall set the
.IR Error_Path
attribute of the batch job to the value of the
.IR path_name
option-argument.
.P
If the
.IR path_name
option-argument constitutes a relative pathname and no host name
element is specified, the
.IR qsub
utility shall set the
.IR Error_Path
attribute of the batch job to the value of the absolute pathname
derived by expanding the
.IR path_name
option-argument relative to the current directory of the process
executing
.IR qsub .
.P
If the
.IR path_name
option-argument constitutes a relative pathname and a host name
element is specified, the
.IR qsub
utility shall set the
.IR Error_Path
attribute of the batch job to the value of the
.IR path_name
option-argument without expansion. The host name element shall be
included.
.P
If the
.IR path_name
option-argument does not include a host name element, the
.IR qsub
utility shall prefix the pathname with
.IR hostname :,
where
.IR hostname
is the name of the host upon which the
.IR qsub
utility is being executed.
.P
If the
.BR \-e
option is not presented to the
.IR qsub
utility, the utility shall set the
.IR Error_Path
attribute of the batch job to the host name and path of the current
directory of the submitting process and the default filename.
.P
The default filename for standard error has the following format:
.sp
.RS 4
.nf
\fIjob_name\fR.e\fIsequence_number\fR
.fi
.P
.RE
.RE
.IP "\fB\-h\fR" 10
Specify that a USER hold is applied to the batch job.
.RS 10
.P
The
.IR qsub
utility shall set the value of the
.IR Hold_Types
attribute of the batch job to the value USER.
.P
If the
.BR \-h
option is not presented to the
.IR qsub
utility, the utility shall set the
.IR Hold_Types
attribute of the batch job to the value NO_HOLD.
.RE
.IP "\fB\-j\ \fIjoin_list\fR" 10
Define which streams of the batch job are to be merged. The
.IR qsub
.BR \-j
option shall accept a value for the
.IR join_list
option-argument that is a string of alphanumeric characters in the
portable character set (see the Base Definitions volume of POSIX.1\(hy2017,
.IR "Section 6.1" ", " "Portable Character Set").
.RS 10
.P
The
.IR qsub
utility shall accept a
.IR join_list
option-argument that consists of one or more of the characters
.BR 'e'
and
.BR 'o' ,
or the single character
.BR 'n' .
.P
All of the other batch job output streams specified will be merged into
the output stream represented by the character listed first in the
.IR join_list
option-argument.
.P
For each unique character in the
.IR join_list
option-argument, the
.IR qsub
utility shall add a value to the
.IR Join_Path
attribute of the batch job as follows, each representing a different
batch job stream to join:
.IP "\fRe\fR" 6
The standard error of the batch job (JOIN_STD_ERROR).
.IP "\fRo\fR" 6
The standard output of the batch job (JOIN_STD_OUTPUT).
.P
An existing
.IR Join_Path
attribute can be cleared by the following join type:
.IP "\fRn\fR" 6
NO_JOIN
.P
If
.BR 'n'
is specified, then no files are joined. The
.IR qsub
utility shall consider it an error if any join type other than
.BR 'n'
is combined with join type
.BR 'n' .
.P
Strictly conforming applications shall not repeat any of the characters
.BR 'e' ,
.BR 'o' ,
or
.BR 'n'
within the
.IR join_list
option-argument. The
.IR qsub
utility shall permit the repetition of characters, but shall not assign
additional meaning to the repeated characters.
.P
An implementation may define other join types. The conformance document
for an implementation shall describe any additional batch job streams,
how they are specified, their internal behavior, and how they affect
the behavior of the utility.
.P
If the
.BR \-j
option is not presented to the
.IR qsub
utility, the utility shall set the value of the
.IR Join_Path
attribute of the batch job to NO_JOIN.
.RE
.IP "\fB\-k\ \fIkeep_list\fR" 10
Define which output of the batch job to retain on the execution host.
.RS 10
.P
The
.IR qsub
.BR \-k
option shall accept a value for the
.IR keep_list
option-argument that is a string of alphanumeric characters in the
portable character set (see the Base Definitions volume of POSIX.1\(hy2017,
.IR "Section 6.1" ", " "Portable Character Set").
.P
The
.IR qsub
utility shall accept a
.IR keep_list
option-argument that consists of one or more of the characters
.BR 'e'
and
.BR 'o' ,
or the single character
.BR 'n' .
.P
For each unique character in the
.IR keep_list
option-argument, the
.IR qsub
utility shall add a value to the
.IR Keep_Files
attribute of the batch job as follows, each representing a different
batch job stream to keep:
.IP "\fRe\fR" 6
The standard error of the batch job (KEEP_STD_ERROR).
.IP "\fRo\fR" 6
The standard output of the batch job (KEEP_STD_OUTPUT).
.P
If both
.BR 'e'
and
.BR 'o'
are specified, then both files are retained. An existing
.IR Keep_Files
attribute can be cleared by the following keep type:
.IP "\fRn\fR" 6
NO_KEEP
.P
If
.BR 'n'
is specified, then no files are retained. The
.IR qsub
utility shall consider it an error if any keep type other than
.BR 'n'
is combined with keep type
.BR 'n' .
.P
Strictly conforming applications shall not repeat any of the characters
.BR 'e' ,
.BR 'o' ,
or
.BR 'n'
within the
.IR keep_list
option-argument. The
.IR qsub
utility shall permit the repetition of characters, but shall not assign
additional meaning to the repeated characters.
.P
An implementation may define other keep types. The conformance document
for an implementation shall describe any additional keep types, how
they are specified, their internal behavior, and how they affect the
behavior of the utility. If the
.BR \-k
option is not presented to the
.IR qsub
utility, the utility shall set the
.IR Keep_Files
attribute of the batch job to the value NO_KEEP.
.RE
.IP "\fB\-m\ \fImail_options\fR" 10
.br
Define the points in the execution of the batch job at which the batch
server that manages the batch job shall send mail about a change in the
state of the batch job.
.RS 10
.P
The
.IR qsub
.BR \-m
option shall accept a value for the
.IR mail_options
option-argument that is a string of alphanumeric characters in the
portable character set (see the Base Definitions volume of POSIX.1\(hy2017,
.IR "Section 6.1" ", " "Portable Character Set").
.P
The
.IR qsub
utility shall accept a value for the
.IR mail_options
option-argument that is a string of one or more of the characters
.BR 'e' ,
.BR 'b' ,
and
.BR 'a' ,
or the single character
.BR 'n' .
.P
For each unique character in the
.IR mail_options
option-argument, the
.IR qsub
utility shall add a value to the
.IR Mail_Users
attribute of the batch job as follows, each representing a different
time during the life of a batch job at which to send mail:
.IP "\fRe\fR" 6
MAIL_AT_EXIT
.IP "\fRb\fR" 6
MAIL_AT_BEGINNING
.IP "\fRa\fR" 6
MAIL_AT_ABORT
.P
If any of these characters are duplicated in the
.IR mail_options
option-argument, the duplicates shall be ignored.
.P
An existing
.IR Mail_Points
attribute can be cleared by the following mail type:
.IP "\fRn\fR" 6
NO_MAIL
.P
If
.BR 'n'
is specified, then mail is not sent. The
.IR qsub
utility shall consider it an error if any mail type other than
.BR 'n'
is combined with mail type
.BR 'n' .
.P
Strictly conforming applications shall not repeat any of the characters
.BR 'e' ,
.BR 'b' ,
.BR 'a' ,
or
.BR 'n'
within the
.IR mail_options
option-argument.
.P
The
.IR qsub
utility shall permit the repetition of characters, but shall not assign
additional meaning to the repeated characters. An implementation may
define other mail types. The conformance document for an implementation
shall describe any additional mail types, how they are specified, their
internal behavior, and how they affect the behavior of the utility.
.P
If the
.BR \-m
option is not presented to the
.IR qsub
utility, the utility shall set the
.IR Mail_Points
attribute to the value MAIL_AT_ABORT.
.RE
.IP "\fB\-M\ \fImail_list\fR" 10
Define the list of users to which a batch server that executes the
batch job shall send mail, if the server sends mail about the batch
job.
.RS 10
.P
The syntax of the
.IR mail_list
option-argument is unspecified.
.P
If the implementation of the
.IR qsub
utility uses a name service to locate users, the utility should accept
the syntax used by the name service.
.P
If the implementation of the
.IR qsub
utility does not use a name service to locate users, the implementation
should accept the following syntax for user names:
.sp
.RS 4
.nf
\fImail_address\fB[\fR,,\fImail_address\fR,, ...\fB]\fR
.fi
.P
.RE
.P
The interpretation of
.IR mail_address
is implementation-defined.
.P
The
.IR qsub
utility shall set the
.IR Mail_Users
attribute of the batch job to the value of the
.IR mail_list
option-argument.
.P
If the
.BR \-M
option is not presented to the
.IR qsub
utility, the utility shall place only the user name and host name for
the current process in the
.IR Mail_Users
attribute of the batch job.
.RE
.IP "\fB\-N\ \fIname\fR" 10
Define the name of the batch job.
.RS 10
.P
The
.IR qsub
.BR \-N
option shall accept a value for the
.IR name
option-argument that is a string of up to 15 alphanumeric characters in
the portable character set (see the Base Definitions volume of POSIX.1\(hy2017,
.IR "Section 6.1" ", " "Portable Character Set")
where the first character is alphabetic.
.P
The
.IR qsub
utility shall set the value of the
.IR Job_Name
attribute of the batch job to the value of the
.IR name
option-argument.
.P
If the
.BR \-N
option is not presented to the
.IR qsub
utility, the utility shall set the
.IR Job_Name
attribute of the batch job to the name of the
.IR script
argument from which the directory specification if any, has been
removed.
.P
If the
.BR \-N
option is not presented to the
.IR qsub
utility, and the script is read from standard input, the utility shall
set the
.IR Job_Name
attribute of the batch job to the value STDIN.
.RE
.IP "\fB\-o\ \fIpath_name\fR" 10
.br
Define the path for the standard output of the batch job.
.RS 10
.P
The
.IR qsub
utility shall accept a
.IR path_name
option-argument that conforms to the syntax of the
.IR path_name
element defined in the System Interfaces volume of POSIX.1\(hy2017, which can be preceded by a host name
element of the form
.IR hostname :.
.P
If the
.IR path_name
option-argument constitutes an absolute pathname, the
.IR qsub
utility shall set the
.IR Output_Path
attribute of the batch job to the value of the
.IR path_name
option-argument without expansion.
.P
If the
.IR path_name
option-argument constitutes a relative pathname and no host name
element is specified, the
.IR qsub
utility shall set the
.IR Output_Path
attribute of the batch job to the pathname derived by expanding the
value of the
.IR path_name
option-argument relative to the current directory of the process
executing the
.IR qsub .
.P
If the
.IR path_name
option-argument constitutes a relative pathname and a host name
element is specified, the
.IR qsub
utility shall set the
.IR Output_Path
attribute of the batch job to the value of the
.IR path_name
option-argument without expansion.
.P
If the
.IR path_name
option-argument does not specify a host name element, the
.IR qsub
utility shall prefix the pathname with
.IR hostname :,
where
.IR hostname
is the name of the host upon which the
.IR qsub
utility is executing.
.P
If the
.BR \-o
option is not presented to the
.IR qsub
utility, the utility shall set the
.IR Output_Path
attribute of the batch job to the host name and path of the current
directory of the submitting process and the default filename.
.P
The default filename for standard output has the following format:
.sp
.RS 4
.nf
\fIjob_name\fR.o\fIsequence_number\fR
.fi
.P
.RE
.RE
.IP "\fB\-p\ \fIpriority\fR" 10
Define the priority the batch job should have relative to other batch
jobs owned by the batch server.
.RS 10
.P
The
.IR qsub
utility shall set the
.IR Priority
attribute of the batch job to the value of the
.IR priority
option-argument.
.P
If the
.BR \-p
option is not presented to the
.IR qsub
utility, the value of the
.IR Priority
attribute is implementation-defined.
.P
The
.IR qsub
utility shall accept a value for the
.IR priority
option-argument that conforms to the syntax for signed decimal
integers, and which is not less than \-1\|024 and not greater than
1\|023.
.RE
.IP "\fB\-q\ \fIdestination\fR" 10
.br
Define the destination of the batch job.
.RS 10
.P
The destination is not a batch job attribute; it determines the batch
server, and possibly the batch queue, to which the
.IR qsub
utility batch queues the batch job.
.P
The
.IR qsub
utility shall submit the script to the batch server named by the
.IR destination
option-argument or the server that owns the batch queue named in the
.IR destination
option-argument.
.P
The
.IR qsub
utility shall accept an option-argument for the
.BR \-q
option that conforms to the syntax for a destination (see
.IR "Section 3.3.2" ", " "Destination").
.P
If the
.BR \-q
option is not presented to the
.IR qsub
utility, the
.IR qsub
utility shall submit the batch job to the default destination. The
mechanism for determining the default destination is
implementation-defined.
.RE
.IP "\fB\-r\ \fIy\fR|\fIn\fR" 10
Define whether the batch job is rerunnable.
.RS 10
.P
If the value of the option-argument is
.IR y ,
the
.IR qsub
utility shall set the
.IR Rerunable
attribute of the batch job to TRUE.
.P
If the value of the option-argument is
.IR n ,
the
.IR qsub
utility shall set the
.IR Rerunable
attribute of the batch job to FALSE.
.P
If the
.BR \-r
option is not presented to the
.IR qsub
utility, the utility shall set the
.IR Rerunable
attribute of the batch job to TRUE.
.RE
.IP "\fB\-S\ \fIpath_name_list\fR" 10
.br
Define the pathname to the shell under which the batch job is to
execute.
.RS 10
.P
The
.IR qsub
utility shall accept a
.IR path_name_list
option-argument that conforms to the following syntax:
.sp
.RS 4
.nf
\fIpathname\fB[\fR@\fIhost\fB][\fR,,\fIpathname\fB[\fR@\fIhost\fB]\fR,, ...\fB]\fR
.fi
.P
.RE
.P
The
.IR qsub
utility shall allow only one pathname for a given host name. The
.IR qsub
utility shall allow only one pathname that is missing a corresponding
host name.
.P
The
.IR qsub
utility shall add a value to the
.IR Shell_Path_List
attribute of the batch job for each entry in the
.IR path_name_list
option-argument.
.P
If the
.BR \-S
option is not presented to the
.IR qsub
utility, the utility shall set the
.IR Shell_Path_List
attribute of the batch job to the null string.
.P
The conformance document for an implementation shall describe the
mechanism used to set the default shell and determine the current value
of the default shell. An implementation shall provide a means for the
installation to set the default shell to the login shell of the user
under which the batch job is to execute. See
.IR "Section 3.3.3" ", " "Multiple Keyword-Value Pairs"
for a means of removing
.IR keyword =\c
.IR value
(and
.IR value @\c
.IR keyword )
pairs and other general rules for list-oriented batch job attributes.
.RE
.IP "\fB\-u\ \fIuser_list\fR" 10
Define the user name under which the batch job is to execute.
.RS 10
.P
The
.IR qsub
utility shall accept a
.IR user_list
option-argument that conforms to the following syntax:
.sp
.RS 4
.nf
\fIusername\fB[\fR@\fIhost\fB][\fR,,\fIusername\fB[\fR@\fIhost\fB]\fR,, ...\fB]\fR
.fi
.P
.RE
.P
The
.IR qsub
utility shall accept only one user name that is missing a corresponding
host name. The
.IR qsub
utility shall accept only one user name per named host.
.P
The
.IR qsub
utility shall add a value to the
.IR User_List
attribute of the batch job for each entry in the
.IR user_list
option-argument.
.P
If the
.BR \-u
option is not presented to the
.IR qsub
utility, the utility shall set the
.IR User_List
attribute of the batch job to the user name from which the utility is
executing. See
.IR "Section 3.3.3" ", " "Multiple Keyword-Value Pairs"
for a means of removing
.IR keyword =\c
.IR value
(and
.IR value @\c
.IR keyword )
pairs and other general rules for list-oriented batch job attributes.
.RE
.IP "\fB\-v\ \fIvariable_list\fR" 10
.br
Add to the list of variables that are exported to the session leader of
the batch job.
.RS 10
.P
A
.IR variable_list
is a set of strings of either the form <\c
.IR variable >
or <\c
.IR variable =\c
.IR value >,
delimited by
<comma>
characters.
.P
If the
.BR \-v
option is presented to the
.IR qsub
utility, the utility shall also add, to the environment
.IR Variable_List
attribute of the batch job, every variable named in the environment
.IR variable_list
option-argument and, optionally, values of specified variables.
.P
If a value is not provided on the command line, the
.IR qsub
utility shall set the value of each variable in the environment
.IR Variable_List
attribute of the batch job to the value of the corresponding
environment variable for the process in which the utility is executing;
see
.IR "Table 4-19, Environment Variable Values (Utilities)".
.P
A conforming application shall not repeat a variable in the environment
.IR variable_list
option-argument.
.P
The
.IR qsub
utility shall not repeat a variable in the environment
.IR Variable_List
attribute of the batch job. See
.IR "Section 3.3.3" ", " "Multiple Keyword-Value Pairs"
for a means of removing
.IR keyword =\c
.IR value
(and
.IR value @\c
.IR keyword )
pairs and other general rules for list-oriented batch job attributes.
.RE
.IP "\fB\-V\fR" 10
Specify that all of the environment variables of the process are
exported to the context of the batch job.
.RS 10
.P
The
.IR qsub
utility shall place every environment variable in the process in which
the utility is executing in the list and shall set the value of each
variable in the attribute to the value of that variable in the
process.
.RE
.IP "\fB\-z\fR" 10
Specify that the utility does not write the batch
.IR job_identifier
of the created batch job to standard output.
.RS 10
.P
If the
.BR \-z
option is presented to the
.IR qsub
utility, the utility shall not write the batch
.IR job_identifier
of the created batch job to standard output.
.P
If the
.BR \-z
option is not presented to the
.IR qsub
utility, the utility shall write the identifier of the created batch
job to standard output.
.RE
.SH OPERANDS
The
.IR qsub
utility shall accept a
.IR script
operand that indicates the path to the script of the batch job.
.P
If the
.IR script
operand is not presented to the
.IR qsub
utility, or if the operand is the single-character string
.BR '\-' ,
the utility shall read the script from standard input.
.P
If the script represents a partial path, the
.IR qsub
utility shall expand the path relative to the current directory of the
process executing the utility.
.SH STDIN
The
.IR qsub
utility reads the script of the batch job from standard input if the
script operand is omitted or is the single character
.BR '\-' .
.SH "INPUT FILES"
In addition to binding the file indicated by the
.IR script
operand to the batch job, the
.IR qsub
utility reads the script file and acts on directives in the script.
.SH "ENVIRONMENT VARIABLES"
The following environment variables shall affect the execution of
.IR qsub :
.IP "\fILANG\fP" 10
Provide a default value for the internationalization variables that are
unset or null. (See the Base Definitions volume of POSIX.1\(hy2017,
.IR "Section 8.2" ", " "Internationalization Variables"
the precedence of internationalization variables used to determine the
values of locale categories.)
.IP "\fILC_ALL\fP" 10
If set to a non-empty string value, override the values of all the
other internationalization variables.
.IP "\fILC_CTYPE\fP" 10
Determine the locale for the interpretation of sequences of bytes of
text data as characters (for example, single-byte as opposed to
multi-byte characters in arguments).
.IP "\fILC_MESSAGES\fP" 10
.br
Determine the locale that should be used to affect the format and
contents of diagnostic messages written to standard error.
.IP "\fILOGNAME\fP" 10
Determine the login name of the user.
.IP "\fIPBS_DPREFIX\fP" 10
.br
Determine the default prefix for directives within the script.
.IP "\fISHELL\fP" 10
Determine the pathname of the preferred command language interpreter
of the user.
.IP "\fITZ\fP" 10
Determine the timezone used to interpret the
.IR date-time
option-argument. If
.IR TZ
is unset or null, an unspecified default timezone shall be used.
.SH "ASYNCHRONOUS EVENTS"
Once created, a batch job exists until it exits, aborts, or is
deleted.
.P
After a batch job is created by the
.IR qsub
utility, batch servers might route, execute, modify, or delete the
batch job.
.SH STDOUT
The
.IR qsub
utility writes the batch
.IR job_identifier
assigned to the batch job to standard output, unless the
.BR \-z
option is specified.
.SH STDERR
The standard error shall be used only for diagnostic messages.
.SH "OUTPUT FILES"
None.
.SH "EXTENDED DESCRIPTION"
.SS "Script Preservation"
.P
The
.IR qsub
utility shall make the script available to the server executing the
batch job in such a way that the server executes the script as it
exists at the time of submission.
.P
The
.IR qsub
utility can send a copy of the script to the server with the
.IR "Queue Job Request"
or store a temporary copy of the script in a location specified to the
server.
.SS "Option Specification"
.P
A script can contain directives to the
.IR qsub
utility.
.P
The
.IR qsub
utility shall scan the lines of the script for directives, skipping
blank lines, until the first line that begins with a string other than
the directive string; if directives occur on subsequent lines, the
utility shall ignore those directives.
.P
Lines are separated by a
<newline>.
If the first line of the script begins with
.BR \(dq#!\(dq
or a
<colon>
(\c
.BR ':' ),
then it is skipped. The
.IR qsub
utility shall process a line in the script as a directive if and only
if the string of characters from the first non-white-space character on
the line until the first
<space>
or
<tab>
on the line match the directive prefix. If a line in the script
contains a directive and the final characters of the line are
<backslash>
and
<newline>,
then the next line shall be interpreted as a continuation of that
directive.
.P
The
.IR qsub
utility shall process the options and option-arguments contained on the
directive prefix line using the same syntax as if the options were
input on the
.IR qsub
utility.
.P
The
.IR qsub
utility shall continue to process a directive prefix line until after a
<newline>
is encountered. An implementation may ignore lines which, according to
the syntax of the shell that will interpret the script, are comments.
An implementation shall describe in the conformance document the format
of any shell comments that it will recognize.
.P
If an option is present in both a directive and the arguments to the
.IR qsub
utility, the utility shall ignore the option and the corresponding
option-argument, if any, in the directive.
.P
If an option that is present in the directive is not present in the
arguments to the
.IR qsub
utility, the utility shall process the option and the option-argument,
if any.
.P
In order of preference, the
.IR qsub
utility shall select the directive prefix from one of the following
sources:
.IP " *" 4
If the
.BR \-C
option is presented to the utility, the value of the
.IR directive_prefix
option-argument
.IP " *" 4
If the environment variable
.IR PBS_DPREFIX
is defined, the value of that variable
.IP " *" 4
The four-character string
.BR \(dq#PBS\(dq
encoded in the portable character set
.P
If the
.BR \-C
option is present in the script file it shall be ignored.
.SH "EXIT STATUS"
The following exit values shall be returned:
.IP "\00" 6
Successful completion.
.IP >0 6
An error occurred.
.SH "CONSEQUENCES OF ERRORS"
Default.
.LP
.IR "The following sections are informative."
.SH "APPLICATION USAGE"
None.
.SH EXAMPLES
None.
.SH RATIONALE
The
.IR qsub
utility allows users to create a batch job that will process the script
specified as the operand of the utility.
.P
The options of the
.IR qsub
utility allow users to control many aspects of the queuing and
execution of a batch job.
.P
The
.BR \-a
option allows users to designate the time after which the batch job
will become eligible to run. By specifying an execution time, users can
take advantage of resources at off-peak hours, synchronize jobs with
chronologically predictable events, and perhaps take advantage of
off-peak pricing of computing time. For these reasons and others, a
timing option is existing practice on the part of almost every batch
system, including NQS.
.P
The
.BR \-A
option allows users to specify the account that will be charged for the
batch job. Support for account is not mandatory for conforming batch
servers.
.P
The
.BR \-C
option allows users to prescribe the prefix for directives within the
script file. The default prefix
.BR \(dq#PBS\(dq
may be inappropriate if the script will be interpreted with an
alternate shell, as specified by the
.BR \-S
option.
.P
The
.BR \-c
option allows users to establish the checkpointing interval for their
jobs. A checkpointing system, which is not defined by this volume of POSIX.1\(hy2017, allows
recovery of a batch job at the most recent checkpoint in the event of a
crash. Checkpointing is typically used for jobs that consume expensive
computing time or must meet a critical schedule. Users should be
allowed to make the tradeoff between the overhead of checkpointing and
the risk to the timely completion of the batch job; therefore, this volume of POSIX.1\(hy2017
provides the checkpointing interval option. Support for checkpointing
is optional for batch servers.
.P
The
.BR \-e
option allows users to redirect the standard error streams of their
jobs to a non-default path. For example, if the submitted script
generally produces a great deal of useless error output, a user might
redirect the standard error output to the null device. Or, if the file
system holding the default location (the home directory of the user)
has too little free space, the user might redirect the standard error
stream to a file in another file system.
.P
The
.BR \-h
option allows users to create a batch job that is held until explicitly
released. The ability to create a held job is useful when some external
event must complete before the batch job can execute. For example, the
user might submit a held job and release it when the system load has
dropped.
.P
The
.BR \-j
option allows users to merge the standard error of a batch job into its
standard output stream, which has the advantage of showing the
sequential relationship between output and error messages.
.P
The
.BR \-m
option allows users to designate those points in the execution of a
batch job at which mail will be sent to the submitting user, or to the
account(s) indicated by the
.BR \-M
option. By requesting mail notification at points of interest in the
life of a job, the submitting user, or other designated users, can
track the progress of a batch job.
.P
The
.BR \-N
option allows users to associate a name with the batch job. The job
name in no way affects the processing of the batch job, but rather
serves as a mnemonic handle for users. For example, the batch job name
can help the user distinguish between multiple jobs listed by the
.IR qstat
utility.
.P
The
.BR \-o
option allows users to redirect the standard output stream. A user
might, for example, wish to redirect to the null device the standard
output stream of a job that produces copious yet superfluous output.
.P
The
.BR \-P
option allows users to designate the relative priority of a batch job
for selection from a queue.
.P
The
.BR \-q
option allows users to specify an initial queue for the batch job. If
the user specifies a routing queue, the batch server routes the
batch job to another queue for execution or further routing. If the
user specifies a non-routing queue, the batch server of the queue
eventually executes the batch job.
.P
The
.BR \-r
option allows users to control whether the submitted job will be rerun
if the controlling batch node fails during execution of the batch job.
The
.BR \-r
option likewise allows users to indicate whether or not the batch job
is eligible to be rerun by the
.IR qrerun
utility. Some jobs cannot be correctly rerun because of changes they
make in the state of databases or other aspects of their environment.
This volume of POSIX.1\(hy2017 specifies that the default, if the
.BR \-r
option is not presented to the utility, will be that the batch job
cannot be rerun, since the result of rerunning a non-rerunnable job
might be catastrophic.
.P
The
.BR \-S
option allows users to specify the program (usually a shell) that will
be invoked to process the script of the batch job. This option has been
modified to allow a list of shell names and locations associated with
different hosts.
.P
The
.BR \-u
option is useful when the submitting user is authorized to use more
than one account on a given host, in which case the
.BR \-u
option allows the user to select from among those accounts. The
option-argument is a list of user-host pairs, so that the submitting
user can provide different user identifiers for different nodes in the
event the batch job is routed. The
.BR \-u
option provides a lot of flexibility to accommodate sites with complex
account structures. Users that have the same user identifier on all the
hosts they are authorized to use will not need to use the
.BR \-u
option.
.P
The
.BR \-V
option allows users to export all their current environment variables,
as of the time the batch job is submitted, to the context of the
processes of the batch job.
.P
The
.BR \-v
option allows users to export specific environment variables from their
current process to the processes of the batch job.
.P
The
.BR \-z
option allows users to suppress the writing of the batch job identifier
to standard output. The
.BR \-z
option is an existing NQS practice that has been standardized.
.P
Historically, the
.IR qsub
utility has served the batch job-submission function in the NQS system,
the existing practice on which it is based. Some changes and additions
have been made to the
.IR qsub
utility in this volume of POSIX.1\(hy2017, \fIvis-a-vis\fP NQS, as a result of the growing pool
of experience with distributed batch systems.
.P
The set of features of the
.IR qsub
utility as defined in this volume of POSIX.1\(hy2017 appears to incorporate all the common
existing practice on potentially conforming platforms.
.SH "FUTURE DIRECTIONS"
The
.IR qsub
utility may be removed in a future version.
.SH "SEE ALSO"
.IR "Chapter 3" ", " "Batch Environment Services",
.IR "\fIqrerun\fR\^",
.IR "\fIqstat\fR\^",
.IR "\fItouch\fR\^"
.P
The Base Definitions volume of POSIX.1\(hy2017,
.IR "Section 3.150" ", " "Epoch",
.IR "Section 6.1" ", " "Portable Character Set",
.IR "Chapter 8" ", " "Environment Variables",
.IR "Section 12.2" ", " "Utility Syntax Guidelines"
.\"
.SH COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form
from IEEE Std 1003.1-2017, Standard for Information Technology
-- Portable Operating System Interface (POSIX), The Open Group Base
Specifications Issue 7, 2018 Edition,
Copyright (C) 2018 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group.
In the event of any discrepancy between this version and the original IEEE and
The Open Group Standard, the original IEEE and The Open Group Standard
is the referee document. The original Standard can be obtained online at
http://www.opengroup.org/unix/online.html .
.PP
Any typographical or formatting errors that appear
in this page are most likely
to have been introduced during the conversion of the source files to
man page format. To report such errors, see
https://www.kernel.org/doc/man-pages/reporting_bugs.html .
|