qmake (1) Linux Manual Page
qmake – distributed parallel make, scheduling by xxQS_NAMExx.
Syntax
qmake [options] — [gmake options]Description
Qmake is a parallel, distributed make(1) utility. Scheduling of the parallel make tasks is done by xxQS_NAMExx. It is based on GNU make, version 3.82 ( gmake ). Both xxQS_NAMExx and GNU make command line options can be specified. They are separated by "–".All xxQS_NAMExx options valid with or can be specified with qmake. See for a description of all xxQS_NAMExx command line options. The GNU Make manual (via info) or the make(1) manual page describes the gmake command line syntax.
The syntax of qmake makefiles corresponds to gmake and is described in the "GNU Make Manual".
A typical qmake call will use the xxQS_NAMExx command line options -cwd to have a scheduled make started in the current working directory on the execution host, -v PATH if the xxQS_NAMExx environment is not set up in the user’s .cshrc Or .profile shell resource file, and also request slots in a parallel environment (see
If no resource request (xxQS_NAMExx 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. As this is critical for typical make (compile) jobs, a warning will be output.
qmake has two different modes for allocating xxQS_NAMExx resources for the parallel execution of tasks:
- 1.
- Allocation of resources using a parallel environment. If the -pe option is used on the qmake command line, a parallel job is scheduled by xxQS_NAMExx. The make rules are executed as tasks within this parallel job.
- 2.
- Dynamic allocation of resources. If no parallel environment is requested when submitting a qmake job, each make rule will generate an individual xxQS_NAMExx qrsh job. All resource requests given to qmake will 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 by 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 —
- qmake -l arch=sol-sparc -cwd -v PATH — -j 4
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=
- qmake -cwd -v PATH -l arch=sol-sparc64 -pe make 3 —
The shell script
- #!/bin/sh
qmake -inherit —
- qsub -cwd -v PATH -pe make 1-10 [further xxqs_name_sxx options] <script>
Environment Variables
- xxQS_NAME_Sxx_ROOT
- Specifies the location of the xxQS_NAMExx standard configuration files.
- xxQS_NAME_Sxx_CELL
- If set, specifies the default xxQS_NAMExx cell. To address a xxQS_NAMExx cell qmake uses (in the order of precedence):
- The name of the cell specified in the environment variable xxQS_NAME_Sxx_CELL, if it is set.
The name of the default cell, i.e. default.
- The name of the cell specified in the environment variable xxQS_NAME_Sxx_CELL, if it is set.
- xxQS_NAME_Sxx_DEBUG_LEVEL
- If set, specifies that debug information should be written to stderr. 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, qmake will 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
- cc -c x.c
- libx.a:
- cc -c x.c ; ar ru libx.a x.o
- cc -c x.c ; ar ru libx.a x.o
- libx.a:
- cc -c x.c ; \
ar ru libx.a x.o
- cc -c x.c ; \
See Also
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 and the information provided in <xxqs_name_sxx_root>/doc/LICENCES for a statement of further rights and permissions.
