Contained WithinFind More DocumentationFeatured Support Resources | Scarica il manuale in formato PDF (532 KB)
Chapter 1 Distributed Make (dmake)Synopsisdmake [-c dmake_rcfile] [-g dmake_group] [-j dmake_max_jobs] [-m serial | parallel | distributed] [-o dmake_odir] DescriptionDistributed Make (dmake) parses your makefiles and determines which target can be built concurrently, and distributes the build of those targets over a number of hosts set by you. If you have use the standard make utility on the Solaris Operating System (Solaris OS), the transition to dmake requires little if any alteration to your makefiles. dmake is a superset of the Solaris make utility, which can be used both on Solaris and Linux platforms. With nested makes, if a top-level makefile calls "make", you need to use $(MAKE). You execute dmake on a "dmake host" and distribute "jobs" to "build servers." You can also distribute jobs to the dmake host, in which case the dmake host also becomes a build server. dmake distributes jobs based on makefile targets that dmake determines (based on your makefiles) can be built concurrently. You can use any machine as a build server as long as it meets the following requirements:
The rsh must be "clean", with no additional output.
From the dmake host you can control which build servers are used and how many dmake jobs are allotted to each build server. The number of dmake jobs that can run on a given build server can also be limited on that server. Options-c dmake_rcfileSpecifies an alternate runtime configuration file. The default runtime configuration file is $(HOME)/.dmakerc. -g dmake_groupSpecifies the name of the build server group to which jobs are distributed. You define server groups in the runtime configuration file. The default server group is the first group in the runtime configuration file. -j dmake_max_jobsSpecifies the maximum total number of jobs that are distributed to the specified group of build servers in the runtime configuration file. The default maximum number of jobs is the sum of all the specified jobs in a build server group. The jobs are subtracted from, or added to, hosts by 1 in the order they appear in the runtime configuration file. For example, if all jobs specified in the runtime configuration file total 8:
and dmake_max_jobs is specified as 11, dmake adds three more jobs to the current total maximum number of jobs (which is eight) as follows:
Also, if dmake_max_jobs is specified as 4, dmake subtracts four jobs (from the original eight) as follows:
-m {serial | parallel | distributed}Specify one of the following key words:
-o dmake_odirSpecifies a common physical directory that dmake can write temporary output files to and read temporary output files from. The directory used is $(HOME)/.dmake and this or whichever directory is specified, must be visible to all build servers. Use this option only if the $(HOME) directory on your local host and the $(HOME) directory on all of your remote hosts are not the same physical $(HOME) directory. For example, a root user would use this option. Note – These options and the environment variables and makefile macros described later in this man page modify the same behavior. Their order of precedence is defined as:
UsageSpecial-purpose Targetsdmake allows targets to be built concurrently on a number of build servers. Concurrent processing can greatly reduce the time required to build a large system or project. dmake supplies the special makefile targets for controlling concurrency and timing.
.NO_PARALLELUse this target to indicate which targets are to be processed serially. .PARALLELUse this target to indicate which targets are to be processed in parallel. .LOCALUse this target to indicate which targets are to be processed serially on the local host. .WAITWhen you specify this target in a dependency list, dmake waits until the dependencies that precede it are finished before processing those that follow, even when processing is parallel. Makefiles that you write using these targets remain compatible with the standard version of make distributed with Solaris 1.x and Solaris 2.x. Standard make accepts these targets without error (and without action). Controlling dmake JobsThe distribution of dmake jobs is controlled in two ways:
The dmake HostWhen dmake begins execution it searches for a runtime configuration file to know where to distribute jobs. Generally, this file is located in your home directory on the dmake host and is named dmakerc. dmake searches for the runtime configuration file in the following locations and in the following order:
If a runtime configuration file is not found, dmake switches to parallel mode and distributes two jobs (the default) to the dmake host. You can change this using the -j option, or DMAKE_MAX_JOBS. The runtime configuration file may contain a list of build servers and the number of jobs you want distributed to each build server. The following is a sample of a simple runtime configuration file:
The entries: falcon, hawk, eagle, heron, and avocet are listed as build servers. You can specify the number of jobs you want distributed to each build server. The default number of jobs is two. Any line that begins with the "#" character is interpreted as a comment. Note – This list of build servers includes falcon which is also the dmake host. The dmake host can also be specified as a build server. If you do not include it in the runtime configuration file, no dmake jobs are distributed to it. You can also construct groups of build servers in the runtime configuration file. This provides you with the flexibility of easily switching between different groups of build servers as circumstances warrant. For instance you may define a different group of build servers for builds under different operating systems, or on groups of build servers that have special software installed on them. The build servers must be all the same architecture and have the same SunOS installed. The following runtime configuration file contains groups:
User CommandsFormal groups are specified by the "group" directive and lists of their constituents are delimited by braces ({}). Build servers that are constituents of groups are specified by the optional "host" directive. Groups can be constituents of other groups. Individual build servers can be listed in runtime configuration files that also contain groups of build servers. In this case dmake treats these build servers as constituents of the unnamed group. dmake distributes jobs to a single group of hosts specified by the following list and in precedence from 1 to 4.
The names of groups and hosts specified in the runtime configuration file may be enclosed in double quotes. This is to allow more flexibility with respect to the character sequences that may appear as part of the group and host names. For example, if the name of the group starts with a digit it should be double-quoted:
As mentioned above, the bin directory in which the dmake software is installed must be accessible from the build server. By default, dmake assumes that the logical path to the dmake executables on the build server is the same as the dmake host. This assumption can be overridden by specifying a path name as an attribute of the host entry in the runtime configuration file. For example:
The Build ServerThe /etc/opt/SPROdmake/dmake.conf file is located in the file system of build servers. Use this file to specify the following:
The following is a sample of a dmake.conf file:
This file sets the maximum number of dmake jobs permitted to run on that build server (from all dmake users) to be eight. You can change the priority of the jobs to be run by using the nice_prio command. See nice(1). Note – If the /etc/opt/SPROdmake/dmake.conf file does not exist on a build server, no dmake jobs will be allowed to run on that server. Environment/MacrosThe following can be defined as either environment variables or makefile macros: DMAKE_RCFILEDefines an alternate runtime configuration file. The default runtime configuration file is $(HOME)/.dmakerc . DMAKE_GROUPDefines the name of the build server group to which jobs are distributed. Server groups are defined in the runtime configuration file. The default server group is the first group in the runtime configuration file. DMAKE_MAX_JOBSDefines the maximum total number of jobs that are distributed to the specified group of build servers in the runtime configuration file. The default maximum number of jobs is the sum of all the specified jobs in a build server group. The jobs are subtracted from, or added to, hosts by 1 in the order they appear in the runtime configuration file. See the -j option in this man page for an example. DMAKE_ADJUST_MAX_JOBSMay contain one of the following key words:
DMAKE_MODEMay contain one of the following key words:
DMAKE_ODIRDefines a common physical directory that dmake can write temporary output files to and read temporary output files from. Use this environment variable, or macro, only if the $(HOME) directory on your local host and the $(HOME) directory on all of your remote hosts are not the same physical $(HOME) directory. For example, a root user would use this option. DMAKE_OUTPUT_MODEDefines the format of the log file. May contain one of the following keywords:
This is the dmake default.
Files
See AlsoAccess the complete Sun Studio 12 documentation set by pointing an HTML browser at /opt/SUNWspro/docs/index.html on Solaris platforms or /opt/sun/sunstudio12/docs/index.html on Linux platforms. If the Sun Studio software is not installed in the default /opt directory, ask your system administrator for the equivalent path on your system. Consult the following man pages for additional information.
|
|||||||||||