~ubuntu-branches/ubuntu/utopic/gridengine/utopic

« back to all changes in this revision

Viewing changes to doc/man/man1/qmake.1

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2008-06-25 22:36:13 UTC
  • Revision ID: james.westby@ubuntu.com-20080625223613-tvd9xlhuoct9kyhm
Tags: upstream-6.2~beta2
ImportĀ upstreamĀ versionĀ 6.2~beta2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
'\" t
 
2
.\"___INFO__MARK_BEGIN__
 
3
.\"
 
4
.\" Copyright: 2004 by Sun Microsystems, Inc.
 
5
.\"
 
6
.\"___INFO__MARK_END__
 
7
.\"
 
8
.\" $RCSfile$     Last Update: $Date$     Revision: $Revision$
 
9
.\"
 
10
.\"
 
11
.\" Some handy macro definitions [from Tom Christensen's man(1) manual page].
 
12
.\"
 
13
.de SB          \" small and bold
 
14
.if !"\\$1"" \\s-2\\fB\&\\$1\\s0\\fR\\$2 \\$3 \\$4 \\$5
 
15
..
 
16
.\"
 
17
.de T           \" switch to typewriter font
 
18
.ft CW          \" probably want CW if you don't have TA font
 
19
..
 
20
.\"
 
21
.de TY          \" put $1 in typewriter font
 
22
.if t .T
 
23
.if n ``\c
 
24
\\$1\c
 
25
.if t .ft P
 
26
.if n \&''\c
 
27
\\$2
 
28
..
 
29
.\"
 
30
.de M           \" man page reference
 
31
\\fI\\$1\\fR\\|(\\$2)\\$3
 
32
..
 
33
.TH QMAKE 1 "$Date$" "xxRELxx" "xxQS_NAMExx User Commands"
 
34
.SH NAME
 
35
qmake \- distributed parallel make, scheduling by xxQS_NAMExx.
 
36
.PP
 
37
.SH SYNTAX
 
38
.B qmake
 
39
[
 
40
.B options
 
41
] -- [
 
42
.B gmake options
 
43
]
 
44
.PP
 
45
.SH DESCRIPTION
 
46
.I Qmake
 
47
is a parallel, distributed
 
48
.M make 1
 
49
utility. Scheduling of the parallel
 
50
.I make
 
51
tasks is done by xxQS_NAMExx. It is based on
 
52
.I gmake
 
53
(GNU make), version 3.78.1. Both xxQS_NAMExx and
 
54
.I gmake
 
55
command line options can be specified. They are separated by "--".
 
56
.PP
 
57
All xxQS_NAMExx options valid with
 
58
.M qsub 1
 
59
or
 
60
.M qrsh 1
 
61
can be specified with
 
62
.I qmake
 
63
- see
 
64
.M submit 1
 
65
for a description of all xxQS_NAMExx command line options.
 
66
The
 
67
.M make 1
 
68
manual page describes the
 
69
.I gmake
 
70
command line syntax.
 
71
.PP
 
72
The syntax of
 
73
.I qmake
 
74
makefiles corresponds to
 
75
.I gmake
 
76
and is described in the "GNU Make Manual".
 
77
.PP
 
78
A typical qmake call will use the xxQS_NAMExx command line options 
 
79
-cwd to have a scheduled make started in the current working directory on 
 
80
the execution host, -v PATH if the xxQS_NAMExx environment is not setup
 
81
in the users .cshrc or .profile shell resource file and request slots in a  
 
82
parallel environment (see 
 
83
.M sge_pe 5
 
84
).
 
85
.PP
 
86
If no resource request (xxQS_NAMExx command line option -l) is specified, 
 
87
qmake will use the environment variable SGE_ARCH to request the same architecture 
 
88
for task execution as has the submit host.
 
89
If SGE_ARCH is set, the architecture specified in SGE_ARCH will be requested by 
 
90
inserting the option -l arch=$SGE_ARCH into the command line options.
 
91
If SGE_ARCH is not set, the make tasks can be executed on any available architecture.
 
92
As this is critical for typical make (compile) jobs, a warning will be output.
 
93
.PP
 
94
.I qmake 
 
95
has two different modes for allocating xxQS_NAMExx resources for the parallel 
 
96
execution of tasks:
 
97
.PP
 
98
1. Allocation of resources using a parallel environment. If the -pe option is
 
99
used on the qmake command line, a parallel job is scheduled by xxQS_NAMExx.
 
100
The make rules are executed as tasks within this parallel job.
 
101
.PP
 
102
2. Dynamic allocation of resources. If no parallel environment is requested 
 
103
when submitting a qmake job, each make rule will generate an individual 
 
104
xxQS_NAMExx qrsh job.
 
105
All resource requests given to qmake will be inherited by the jobs processing 
 
106
the make rules.
 
107
.PP
 
108
In dynamic allocation mode, additional resource requests for individual rules
 
109
can be specified by preceding the rule by the definition of an environment
 
110
variable SGE_RREQ. The rule then takes the form
 
111
SGE_RREQ="<request>" <rule>, e.g.
 
112
SGE_RREQ="-l lic=1" cc -c ...
 
113
If such makefile rules are executed in a make utility other than qmake, the environment variable SGE_RREQ will be set in the environment established for the rule's execution - without any effect.
 
114
.SH EXAMPLES
 
115
.sp 1
 
116
.nf
 
117
.RS
 
118
qmake -cwd -v PATH -pe compiling 1-10 --
 
119
.RE
 
120
.fi
 
121
.sp 1
 
122
will request between 1 and 10 slots in parallel environment "compiling".
 
123
If the SGE_ARCH environment variable is set to the machines architecture, a 
 
124
resource request will be inserted into the qmake command line to start the 
 
125
qmake job on the same architecture as the submit host. The
 
126
.I make
 
127
tasks will
 
128
inherit the complete environment of the calling shell. It will execute
 
129
as many parallel tasks as slots have been granted by xxQS_NAMExx.
 
130
.sp 1
 
131
.nf
 
132
.RS
 
133
qmake -l arch=sol-sparc -cwd -v PATH -- -j 4
 
134
.RE
 
135
.fi
 
136
.sp 1
 
137
will submit each make rule as an individual qrsh job. A maximum of 4 tasks will be processed in parallel.
 
138
The qmake job will be started on a machine of architecture sol-sparc, this 
 
139
resource request will also be inherited by the make tasks, i.e. all jobs 
 
140
created for the execution of make tasks will request the architecture sol-sparc.
 
141
.sp 1
 
142
If the following Makefile is submitted with the above command line, additional
 
143
resource requests will be made for individual rules:
 
144
For the compile and link rules, compiler licenses (comp) and linker licenses (link) will be requested, in
 
145
addition to the resource request made for the whole job (-l arch=sol-sparc) on the command line.
 
146
.sp 1
 
147
.nf
 
148
.RS
 
149
all: test
 
150
 
 
151
clean:
 
152
        rm -f test main.o functions.o
 
153
 
 
154
test: main.o functions.o
 
155
        SGE_RREQ="-l link=1" ld -o test main.o functions.o
 
156
 
 
157
main.o: main.c
 
158
        SGE_RREQ="-l comp=1" cc -c -DALIASPATH=\"/usr/local/share/locale:.\" -o main.o main.c
 
159
 
 
160
functions.o: functions.c
 
161
        SGE_RREQ="-l comp=1" cc -c -DALIASPATH=\"/usr/local/share/locale:.\" -o functions.o functions.c
 
162
.RE
 
163
.fi
 
164
.sp 2
 
165
The command line
 
166
.nf
 
167
.RS
 
168
qmake -cwd -v PATH -l arch=sol-sparc64 -pe make 3 --
 
169
.RE
 
170
.fi
 
171
.sp 1
 
172
will request 3 parallel
 
173
.I make
 
174
tasks to be executed on hosts of
 
175
architecture "sol-sparc64". The submit may be done on a host of any
 
176
architecture.
 
177
.sp 1
 
178
The shell script
 
179
.sp 1
 
180
.nf
 
181
.RS
 
182
#!/bin/sh
 
183
qmake -inherit -- 
 
184
.RE
 
185
.fi
 
186
.sp 1
 
187
can be submitted by 
 
188
.sp 1
 
189
.nf
 
190
.RS
 
191
qsub -cwd -v PATH -pe make 1-10 [further xxqs_name_sxx options] <script>
 
192
.RE
 
193
.fi
 
194
.sp 1
 
195
.I Qmake
 
196
will inherit the resources granted for the job submitted above under
 
197
parallel environment "make".
 
198
.\"
 
199
.\"
 
200
.SH "ENVIRONMENTAL VARIABLES"
 
201
.\" 
 
202
.IP "\fBxxQS_NAME_Sxx_ROOT\fP" 1.5i
 
203
Specifies the location of the xxQS_NAMExx standard configuration
 
204
files.
 
205
.\"
 
206
.IP "\fBxxQS_NAME_Sxx_CELL\fP" 1.5i
 
207
If set, specifies the default xxQS_NAMExx cell. To address a xxQS_NAMExx
 
208
cell
 
209
.I qmake
 
210
uses (in the order of precedence):
 
211
.sp 1
 
212
.RS
 
213
.RS
 
214
The name of the cell specified in the environment 
 
215
variable xxQS_NAME_Sxx_CELL, if it is set.
 
216
.sp 1
 
217
The name of the default cell, i.e. \fBdefault\fP.
 
218
.sp 1
 
219
.RE
 
220
.RE
 
221
.\"
 
222
.IP "\fBxxQS_NAME_Sxx_DEBUG_LEVEL\fP" 1.5i
 
223
If set, specifies that debug information
 
224
should be written to stderr. In addition the level of
 
225
detail in which debug information is generated is defined.
 
226
.\"
 
227
.IP "\fBSGE_ARCH\fP" 1.5i
 
228
The architecture of the submit host. If this variable is set in 
 
229
the submission environment, qmake 
 
230
will request the given architecture for job execution (see DESCRIPTION above).
 
231
.\"
 
232
.\"
 
233
.SH KNOWN PROBLEMS
 
234
.PP
 
235
.SS Slow NFS server
 
236
Very low file server performance may lead to problems on depending files.
 
237
.sp 1
 
238
Example: Host a compiles a.c to a.o, host b compiles b.c to b.o, host c
 
239
shall link program c from a.o and b.o. In case of very bad NFS
 
240
performance, host c might not yet see files a.o and b.o.
 
241
.\"
 
242
.SS Multiple commands in one rule
 
243
If multiple commands are executed in one rule, the makefile has to
 
244
ensure that they are handled as one command line.
 
245
.sp 1
 
246
Example:
 
247
.sp 1
 
248
.nf
 
249
.RS
 
250
libx.a:
 
251
.RS
 
252
cd x
 
253
ar ru libx.a x.o
 
254
.RE
 
255
.RE
 
256
.fi
 
257
.sp 1
 
258
Building libx.a will fail, if the commands are executed in parallel
 
259
(and possibly on different hosts). Write the following instead:
 
260
.sp 1
 
261
.nf
 
262
.RS
 
263
libx.a:
 
264
.RS
 
265
cd x ; ar ru libx.a x.o
 
266
.RE
 
267
.RE
 
268
.fi
 
269
.sp 1
 
270
or
 
271
.sp 1
 
272
.nf
 
273
.RS
 
274
libx.a:
 
275
.RS
 
276
cd x ; \\
 
277
ar ru libx.a x.o
 
278
.RE
 
279
.RE
 
280
.fi
 
281
.\"
 
282
.\"
 
283
.SH SEE ALSO
 
284
.M submit 1
 
285
 
286
.M sge_pe 5
 
287
as well as
 
288
.M make 1
 
289
(GNU make manpage) and
 
290
.I The GNU Make Manual
 
291
in <xxqs_name_sxx_root>/3rd_party/qmake.
 
292
.\"
 
293
.\"
 
294
.SH "COPYRIGHT"
 
295
.I Qmake
 
296
contains portions of Gnu Make (\fIgmake\fP), which
 
297
is the copyright of the Free Software Foundation,
 
298
Inc., Boston, MA, and is protected by the Gnu General Public License.
 
299
.br
 
300
See
 
301
.M xxqs_name_sxx_intro 1
 
302
and the information provided in <xxqs_name_sxx_root>/3rd_party/qmake
 
303
for a statement of further rights and permissions.