1QMAKE(1) Grid Engine User Commands QMAKE(1)
2
3
4
6 qmake - distributed parallel make, scheduling by Grid Engine.
7
9 qmake [ options ] -- [ gmake options ]
10
12 qmake is a parallel, distributed make(1) utility. Scheduling of the
13 parallel make tasks is done by Grid Engine. It is based on gmake (GNU
14 make), version 3.78.1. Both Grid Engine and gmake command line options
15 can be specified. They are separated by "--".
16
17 All Grid Engine options valid with qsub(1) or qrsh(1) can be specified
18 with qmake - see submit(1) for a description of all Grid Engine command
19 line options. The make(1) manual page describes the gmake command line
20 syntax.
21
22 The syntax of qmake makefiles corresponds to gmake and is described in
23 the "GNU Make Manual".
24
25 A typical qmake call will use the Grid Engine command line options -cwd
26 to have a scheduled make started in the current working directory on
27 the execution host, -v PATH if the Grid Engine environment is not setup
28 in the users .cshrc or .profile shell resource file and request slots
29 in a parallel environment (see sge_pe(5) ).
30
31 If no resource request (Grid Engine command line option -l) is speci‐
32 fied, qmake will use the environment variable SGE_ARCH to request the
33 same architecture for task execution as has the submit host. If
34 SGE_ARCH is set, the architecture specified in SGE_ARCH will be
35 requested by inserting the option -l arch=$SGE_ARCH into the command
36 line options. If SGE_ARCH is not set, the make tasks can be executed
37 on any available architecture. As this is critical for typical make
38 (compile) jobs, a warning will be output.
39
40 qmake has two different modes for allocating Grid Engine resources for
41 the parallel execution of tasks:
42
43 1. Allocation of resources using a parallel environment. If the -pe
44 option is used on the qmake command line, a parallel job is scheduled
45 by Grid Engine. The make rules are executed as tasks within this par‐
46 allel job.
47
48 2. Dynamic allocation of resources. If no parallel environment is
49 requested when submitting a qmake job, each make rule will generate an
50 individual Grid Engine qrsh job. All resource requests given to qmake
51 will be inherited by the jobs processing the make rules.
52
53 In dynamic allocation mode, additional resource requests for individual
54 rules can be specified by preceding the rule by the definition of an
55 environment variable SGE_RREQ. The rule then takes the form
56 SGE_RREQ="<request>" <rule>, e.g. SGE_RREQ="-l lic=1" cc -c ... If
57 such makefile rules are executed in a make utility other than qmake,
58 the environment variable SGE_RREQ will be set in the environment estab‐
59 lished for the rule's execution - without any effect.
60
62 qmake -cwd -v PATH -pe compiling 1-10 --
63
64 will request between 1 and 10 slots in parallel environment "compil‐
65 ing". If the SGE_ARCH environment variable is set to the machines
66 architecture, a resource request will be inserted into the qmake com‐
67 mand line to start the qmake job on the same architecture as the submit
68 host. The make tasks will inherit the complete environment of the call‐
69 ing shell. It will execute as many parallel tasks as slots have been
70 granted by Grid Engine.
71
72 qmake -l arch=sol-sparc -cwd -v PATH -- -j 4
73
74 will submit each make rule as an individual qrsh job. A maximum of 4
75 tasks will be processed in parallel. The qmake job will be started on
76 a machine of architecture sol-sparc, this resource request will also be
77 inherited by the make tasks, i.e. all jobs created for the execution of
78 make tasks will request the architecture sol-sparc.
79
80 If the following Makefile is submitted with the above command line,
81 additional resource requests will be made for individual rules: For the
82 compile and link rules, compiler licenses (comp) and linker licenses
83 (link) will be requested, in addition to the resource request made for
84 the whole job (-l arch=sol-sparc) on the command line.
85
86 all: test
87
88 clean:
89 rm -f test main.o functions.o
90
91 test: main.o functions.o
92 SGE_RREQ="-l link=1" ld -o test main.o functions.o
93
94 main.o: main.c
95 SGE_RREQ="-l comp=1" cc -c -DALIASPATH=
96
97 functions.o: functions.c
98 SGE_RREQ="-l comp=1" cc -c -DALIASPATH=
99
100
101 The command line
102 qmake -cwd -v PATH -l arch=sol-sparc64 -pe make 3 --
103
104 will request 3 parallel make tasks to be executed on hosts of architec‐
105 ture "sol-sparc64". The submit may be done on a host of any architec‐
106 ture.
107
108 The shell script
109
110 #!/bin/sh
111 qmake -inherit --
112
113 can be submitted by
114
115 qsub -cwd -v PATH -pe make 1-10 [further sge options] <script>
116
117 qmake will inherit the resources granted for the job submitted above
118 under parallel environment "make".
119
121 SGE_ROOT Specifies the location of the Grid Engine standard con‐
122 figuration files.
123
124 SGE_CELL If set, specifies the default Grid Engine cell. To
125 address a Grid Engine cell qmake uses (in the order of
126 precedence):
127
128 The name of the cell specified in the environment
129 variable SGE_CELL, if it is set.
130
131 The name of the default cell, i.e. default.
132
133
134 SGE_DEBUG_LEVEL
135 If set, specifies that debug information should be writ‐
136 ten to stderr. In addition the level of detail in which
137 debug information is generated is defined.
138
139 SGE_ARCH The architecture of the submit host. If this variable is
140 set in the submission environment, qmake will request
141 the given architecture for job execution (see DESCRIP‐
142 TION above).
143
145 Slow NFS server
146 Very low file server performance may lead to problems on dependent
147 files.
148
149 Example: Host a compiles a.c to a.o, host b compiles b.c to b.o, host c
150 shall link program c from a.o and b.o. In case of very bad NFS perfor‐
151 mance, host c might not yet see files a.o and b.o.
152
153 Multiple commands in one rule
154 If multiple commands are executed in one rule, the makefile has to
155 ensure that they are handled as one command line.
156
157 Example:
158
159 libx.a:
160 cd x
161 ar ru libx.a x.o
162
163 Building libx.a will fail, if the commands are executed in parallel
164 (and possibly on different hosts). Write the following instead:
165
166 libx.a:
167 cd x ; ar ru libx.a x.o
168
169 or
170
171 libx.a:
172 cd x ; \
173 ar ru libx.a x.o
174
176 submit(1) , sge_pe(5) as well as make(1) (GNU make manpage) and The GNU
177 Make Manual in <SGE_ROOT>/3rd_party/qmake.
178
180 qmake contains portions of Gnu Make (gmake), which is the copyright of
181 the Free Software Foundation, Inc., Boston, MA, and is protected by the
182 Gnu General Public License.
183 See sge_intro(1) and the information provided in
184 <SGE_ROOT>/3rd_party/qmake for a statement of further rights and per‐
185 missions.
186
187
188
189GE 6.1 $Date: 2007/07/19 08:17:15 $ QMAKE(1)