QMAKE(1)
π QMAKE(1) π
okay bestie, sit down, hydrate, and let me tell you about qmake β that's the distributed parallel make from the Grid Engine User Commands family. she's a whole icon and she's about to carry your entire build. π«Ά
β¨ NAME β¨
qmake β distributed parallel make, scheduling by Grid Engine. no cap. π₯
πΈ SYNTAX πΈ
qmake [options] -- [gmake options]
π DESCRIPTION π
Qmake is a parallel, distributed make(1) utility. The scheduling of the parallel make tasks is done by Grid Engine. It's based on GNU make, version 3.82 (aka "gmake"). So you can throw both Grid Engine command line options and GNU make command line options at her β and you separate them with --. that's the divider, periodt. π
Every single Grid Engine option that works with qsub(1) or qrsh(1) can be specified with qmake. Go look at submit(1) for the full description of all Grid Engine command line options. And the GNU Make manual (via info) or the make(1) manual page describes the gmake command line syntax. iykyk. π
The syntax of qmake makefiles corresponds to gmake and is described in the "GNU Make Manual".
A typical qmake call will use the Grid Engine command line option -cwd so a scheduled make starts in the current working directory on the execution host, plus -v PATH if the Grid Engine environment isn't set up in your .cshrc Or .profile shell resource file, and it'll also request slots in a parallel environment (see sge_pe(5)). β¨
If no resource request (Grid Engine command line option -l) is specified, qmake will use the environment variable SGE_ARCH to request the same architecture as the submit host for task execution. If SGE_ARCH is set, the architecture specified in SGE_ARCH will be requested by inserting the option -l arch=$SGE_ARCH into the command line options. If SGE_ARCH is not set, the make tasks can be executed on any available architecture. And because that's critical for typical make (compile) jobs, a warning will be output. β οΈ bestie, watch for it.
So qmake has two different modes for allocating Grid Engine resources for parallel execution of tasks:
- Allocation of resources using a parallel environment. If the
-peoption is used on theqmakecommand line, a parallel job is scheduled by Grid Engine. The make rules are executed as tasks within this parallel job. π - Dynamic allocation of resources. If no parallel environment is requested when submitting a
qmakejob, each make rule will generate an individual Grid Engineqrshjob. All resource requests given toqmakewill be inherited by the jobs processing the make rules. π«
In dynamic allocation mode, additional resource requests for individual rules can be specified by preceding the rule with the definition of an environment variable SGE_RREQ. The rule then takes the form
SGE_RREQ="request" rule
e.g.
SGE_RREQ="-l lic=1" cc -c ...
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 β presumably without any effect. π
π EXAMPLES π
qmake -cwd -v PATH -pe compiling 1-10 --
This will request between 1 and 10 slots in parallel environment "compiling". If the SGE_ARCH environment variable is set to the machine architecture, a resource request will be inserted into the qmake command line to start the qmake job on the same architecture as the submit host. The make tasks will inherit the complete environment of the calling shell, and as as many parallel tasks will execute as slots have been granted by Grid Engine. π₯
qmake -l arch=sol-sparc -cwd -v PATH -- -j 4
This will submit each make rule as an individual qrsh job. A maximum of 4 tasks will be processed in parallel. The qmake job will be started on a machine of architecture sol-sparc. This resource request will also be inherited by the make tasks, i.e. all jobs created for the execution of make tasks will request the architecture sol-sparc. π
If the following Makefile is submitted with the above command line, additional resource requests will be made for individual rules: For the compile and link rules, compiler licenses (comp) and linker licenses (link) will be requested, in addition to the resource request made for the whole job (-l arch=sol-sparc) on the command line.
all: test
clean:
rm -f test main.o functions.o
test: main.o functions.o
SGE_RREQ="-l link=1" ld -o test main.o functions.o
main.o: main.c
SGE_RREQ="-l comp=1" cc -c -DALIASPATH=
functions.o: functions.c
SGE_RREQ="-l comp=1" cc -c -DALIASPATH=
The command line
qmake -cwd -v PATH -l arch=sol-sparc64 -pe make 3 --
will request 3 parallel make tasks to be executed on hosts of architecture "sol-sparc64". The submit may be done on a host of any architecture. β¨
The shell script
#!/bin/sh
qmake -inherit --
can be submitted by
qsub -cwd -v PATH -pe make 1-10 [further sge options] <script>
Qmake will inherit the resources granted for the job submitted above under parallel environment "make". π
π¦ ENVIRONMENT VARIABLES π¦
SGE_ROOTβ Specifies the location of the Grid Engine standard configuration files. πSGE_CELLβ If set, specifies the default Grid Engine cell. To address a Grid Engine cellqmakeuses (in the order of precedence):- The name of the cell specified in the environment variable
SGE_CELL, if it is set. - The name of the default cell, i.e.
default.
- The name of the cell specified in the environment variable
SGE_DEBUG_LEVELβ If set, specifies that debug information should be written tostderr. In addition the level of detail in which debug information is generated is defined. πSGE_ARCHβ The architecture of the submit host. If this variable is set in the submission environment,qmakewill request the given architecture for job execution (see DESCRIPTION above).
π KNOWN PROBLEMS π
Slow NFS server
Very low file server performance may lead to problems on dependent files. π
Example: Host a compiles a.c to a.o, host b compiles b.c to b.o, host c shall link program c from a.o and b.o. In case of very bad NFS performance, host c might not yet see files a.o and b.o.
Multiple commands in one rule
If multiple commands are executed in one rule, the makefile has to ensure that they are handled as one command line. π
Example:
libx.a:
cc -c x.c
ar ru libx.a x.o
Building libx.a will fail if the commands are executed in parallel (and possibly on different hosts). Write the following instead:
libx.a:
cc -c x.c ; ar ru libx.a x.o
or
libx.a:
cc -c x.c ; \
ar ru libx.a x.o
π SEE ALSO π
submit(1), sge_pe(5), as well as make(1) (GNU make manpage) and TheGNUMakeManual via info(1).
π COPYRIGHT π
Qmake Is based on GNU Make (gmake), which is copyright by the Free Software Foundation, Inc., Boston, MA, and is protected by the GNU General Public License.
See sge_intro(1) and the information provided in <sge_root>/doc/LICENCES for a statement of further rights and permissions.
and that's the whole page bestie!! π this one shipped with SGE 8.1.3pre, dated 2011-05-20 β yes she's an elder icon and she still ate. go build something gorgeous. πβ¨π¦
π¦ where this page comes from
- debian bookworm: gridengine-client 8.1.9+dfsg-10+b1 Β· SISSL
- debian trixie: gridengine-client 8.1.9+dfsg-13.1 Β· SISSL
- ubuntu jammy: gridengine-client 8.1.9+dfsg-10build1 Β· SISSL
- ubuntu noble: gridengine-client 8.1.9+dfsg-11build3 Β· SISSL
- ubuntu questing: gridengine-client 8.1.9+dfsg-13.1
- ubuntu resolute: gridengine-client 8.1.9+dfsg-13.2 Β· SISSL
- ubuntu stonking: gridengine-client 8.1.9+dfsg-13.2ubuntu1 Β· SISSL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms