QMAKE(1)                   Grid Engine User Commands                  QMAKE(1)



[1mNAME[0m
       qmake - distributed parallel make, scheduling by Grid Engine.


[1mSYNTAX[0m
       [1mqmake [22m[ [1moptions [22m] -- [ [1mgmake options [22m]


[1mDESCRIPTION[0m
       [4mQmake[24m  is  a  parallel,  distributed [4mmake[24m(1) utility. Scheduling of the
       parallel [4mmake[24m tasks is done by Grid Engine. It is based on  [4mgmake[24m  (GNU
       make),  version 3.78.1. Both Grid Engine and [4mgmake[24m command line options
       can be specified. They are separated by "--".

       All Grid Engine options valid with [4mqsub[24m(1) or [4mqrsh[24m(1) can be  specified
       with [4mqmake[24m - see [4msubmit[24m(1) for a description of all Grid Engine command
       line options.  The [4mmake[24m(1) manual page describes the [4mgmake[24m command line
       syntax.

       The  syntax of [4mqmake[24m makefiles corresponds to [4mgmake[24m and is described in
       the "GNU Make Manual".

       A typical qmake call will use the Grid Engine command line options -cwd
       to  have  a  scheduled make started in the current working directory on
       the execution host, -v PATH if the Grid Engine environment is not setup
       in  the  users .cshrc or .profile shell resource file and request slots
       in a parallel environment (see [4msge_pe[24m(5) ).

       If no resource request (Grid Engine command line option -l)  is  speci-
       fied,  qmake  will use the environment variable SGE_ARCH to request the
       same architecture for task  execution  as  has  the  submit  host.   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.

       [4mqmake[24m  has two different modes for allocating Grid Engine 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 Grid Engine.  The make rules are executed as tasks within this  par-
       allel job.

       2.  Dynamic  allocation  of  resources.  If  no parallel environment is
       requested when submitting a qmake job, each make rule will generate  an
       individual  Grid Engine 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 estab-
       lished for the rule's execution - without any effect.

[1mEXAMPLES[0m
              qmake -cwd -v PATH -pe compiling 1-10 --

       will request between 1 and 10 slots in  parallel  environment  "compil-
       ing".   If  the  SGE_ARCH  environment  variable is set to the machines
       architecture, a resource request will be inserted into the  qmake  com-
       mand line to start the qmake job on the same architecture as the submit
       host. The [4mmake[24m tasks will inherit the complete environment of the call-
       ing  shell.  It  will execute as many parallel tasks as slots have been
       granted by Grid Engine.

              qmake -l arch=sol-sparc -cwd -v PATH -- -j 4

       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 [4mmake[24m tasks to be executed on hosts of architec-
       ture  "sol-sparc64".  The submit may be done on a host of any architec-
       ture.

       The shell script

              #!/bin/sh
              qmake -inherit --

       can be submitted by

              qsub -cwd -v PATH -pe make 1-10 [further sge options] <script>

       [4mQmake[24m will inherit the resources granted for the  job  sumbitted  above
       under parallel environment "make".

[1mENVIRONMENTAL VARIABLES[0m
       [1mSGE_ROOT       [22mSpecifies  the location of the Grid Engine standard con-
                      figuration files.

       [1mSGE_CELL       [22mIf set, specifies  the  default  Grid  Engine  cell.  To
                      address  a  Grid Engine cell [4mqmake[24m uses (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. [1mdefault[22m.


       [1mSGE_DEBUG_LEVEL[0m
                      If set, specifies that debug information should be writ-
                      ten to stderr. In addition the level of detail in  which
                      debug information is generated is defined.

       [1mSGE_ARCH       [22mThe architecture of the submit host. If this variable is
                      set in the submission environment,  qmake  will  request
                      the  given  architecture for job execution (see DESCRIP-
                      TION above).

[1mKNOWN PROBLEMS[0m
   [1mSlow NFS server[0m
       Very low file server performance may  lead  to  problems  on  depending
       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  perfor-
       mance, host c might not yet see files a.o and b.o.

   [1mMultiple commands in one rule[0m
       If  multiple  commands  are  executed  in one rule, the makefile has to
       ensure that they are handled as one command line.

       Example:

              libx.a:
                     cd x
                     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:
                     cd x ; ar ru libx.a x.o

       or

              libx.a:
                     cd x ; \
                     ar ru libx.a x.o

[1mSEE ALSO[0m
       [4msubmit[24m(1) , [4msge_pe[24m(5) as well as [4mmake[24m(1) (GNU make manpage) and [4mThe[24m [4mGNU[0m
       [4mMake[24m [4mManual[24m in <sge_root>/3rd_party/qmake.

[1mCOPYRIGHT[0m
       [4mQmake[24m contains portions of Gnu Make ([4mgmake[24m), which is the copyright  of
       the Free Software Foundation, Inc., Boston, MA, and is protected by the
       Gnu General Public License.
       See    [4msge_intro[24m(1)     and     the     information     provided     in
       <sge_root>/3rd_party/qmake  for  a statement of further rights and per-
       missions.



GE 6.0                   $Date: 2004/11/12 15:40:02 $                 QMAKE(1)
