Description
The Solaris Grid Compiler (SGC) is a locally or remotely hosted
compilation resource management system. It provides the
accelerated, networked, cross-platform processing of Makefiles
and compilation commands on the Solaris Operating System.
Processing may proceed in parallel across multiple
strands/processors of a CMT/SMP system, or dynamically
distributed across a cluster of TCP/IP interconnected systems.
This processing is controlled by a resource-monitoring,
load-balanced client-server architecture. Distributed processing
operates on data which is resident on NFS-connected file-systems.
SGC also supports the hosting of specialized
compilation services, that involve multiple processing of the same
sources for the production of optimally compiled binaries.
Note: SGC uses the Sun Studio compilers for its
grid equivalent commands.
If you don't already have them, you
can download and install
the Sun Studio 12 compilers from here.
Using SGC
SGC is
a client-server application. All the executable binaries are
installed by default into the /opt/SUNWsgc/bin directory. This
directory may be added to the user PATH environment. The server component, grids,
should be installed on any system that may be used as a
compilation or build resource. SGC assumes its group of
collaborating systems are trusted interconnected systems.
The client executables, gridmake, gridcc, gridCC, gridf90, gridc and gridmon,
are also installed into /opt/SUNWsgc/bin, but are stand-alone
applications that can be copied to shared file-systems or
wherever they need to be accessed.
Server Commands
The server is typically started with the command:
% grids-start { [-trust <sever>[,<server>,... ]] , [ -trustall ] }
The -trust option specifies that the server can accept and send jobs
to the named (or all) systems on its network
And stopped with the command:
% grids -stop
Servers can off-load the processing from another server, by
joining the dispatch groupof that other server
(control-server-hostname). This will cause the server to
receive any waiting compilation jobs, if it is the least busy
system in the dispatch group of that controlling server. For a
server to join another server's dispatch group it must be a trusted
server in that group (see above and below).
A server joins a dispatch group with the command
% grids-j <control-server-hostname>
A server leaves all or a specific server dispatch group with the command:
% grids -leave [<control-server-hostname>]
The systems that the server trusts to receive jobs from or to
form a dispatch group can be changed at any time:
% grids -trust <sever>[,<server>,...]
% grids -trustall
% grids -distrust <sever>[,<server>,... ]
% grids -distrustall
The currently running jobs on the server are listed with:
% grids -jobs
A status report of the CPU, swap and job load of the server
and all the systems in its dispatch group is printed with:
% grids -status
A listing of all the systems in the server's dispatch group is given by:
% grids -group
A listing of all the systems which can dispatch jobs to this server is given by:
% grids -managers
Remove all the jobs of a user:
% grids -ku <userid>
Remove a specific job (use jobid reported in -jobs command):
% grids -kj <jobid>
Client Commands
In all the client commands, the option, --s
<server-hostname>, specifies the targeted server host.
If this is not specified, the hostname is obtained from the value
of the GRID_SERVER environment variable.
If this is not set, the local system on which the client is running, is used.
Target Specific Compilation Commands
SGC-equivalent compilation commands are named by pre-pending
the prefix “grid” to the command.
These commands exist for the cc, CC, f90, f95, f77 compilers
and the make utility. The commands take the form of:
<grid_command> [ -<grid_option> -<grid_option>... [--] ] <command_arguments>
Note: Always place the grid client options first in the list of options.
In the event that a grid compiler client option has the same name
as an option of the target command, distinguish them by terminating the grid
client options with the 2-dash option: “--”
The commands are as follows:
% gridmake [-gnu] -host <server-hostname> Makefile
- a parallel Makefile processor that potentially distributing Make command jobs across multiple systems
- To use the -gnu option, you need to also download and install the SUNWsgmake
add-on. You may need to do this if your Makefiles use GNU make (gmake) specific features.
% gridcc -host < server-hostname > foo.c
- a launcher to the server's C compiler. It will invoke
the Sun Studio compilers, in /opt/SUNWspro/bin by default
% gridCC -host < server-hostname > foo.c+
- a launcher to the server's C++ compiler. It will invoke the Sun Studio compilers,
in /opt/SUNWspro/bin by default
% gridf90 -host < server-hostname > foo.f90
- a launcher to the server's Fortran compiler. It will invoke the
Sun Studio compilers, in /opt/SUNWspro/bin by default.
The same applies for gridf77 and gridf95
% gridjavac -host < server-hostname >foo.java
-a launcher to the Java bytecode compiler
Generic Client Command
Generic commands provide a way to launch a named compiler,
makefile processor or even a build script.
% gridx -host < server-hostname > <compiler_path> <compiler_arguments>
% gridx -host <server-hostname> <make_path> <make_arguments>
% gridx -host <server-hostname> build_tools.sh
Note: gridx does not correctly execute commands that read from stdin,
eg. gridx build_tools.sh < input.txt). To do this, place this command
into and another shell script file and execute that file with gridx.
Targeting Options
The commands above can also be modified with targeting options
to find the suitable server to execute the command on. These are:
Nodispatch (-nodispatch)
- Instructs that the job be executed on the immediately addressed
server and not dispatched to another in its dispatch group.
% gridx -nodispatch ...
Processor (-proc)
- instructs the server to dispatch only to a server of the
specified processor type (as output by `uname -p`). This allows a
dispatch group to be heterogeneous, having both SPARC and x64 systems.
% gridx -proc i386 ...
Instruction Set Architecture (-isa)
- instructs the server to dispatch only to a server with the
specified ISA (as output by /bin/isalist)
% gridx -isa sparcv9 ...
Operating System Release (-osr)
- instructs the server to dispatch only to a server with the
specified O/S release (as output by `uname -r`)
% gridx -osr 5.10 sparcv9 ...
Monitoring Commands
%gridmon<server-hostname>
- A GUI to show what is running where.

% gridx -host <server-hostname> -jobs
- will list the currently active jobs on the server
% gridx-s <server-hostname> -status
- will print a status report of the CPU, swap and job load of the
server and all the systems in its dispatch group
A listing of all the systems in the server's dispatch group is given by:
% gridx -host <server-hostname> -group
A listing of all the systems which can dispatch jobs to this server
is given by:
% gridx -host <server-hostname> -managers
A listing of all the systems trusted by this server is given by:
% gridx-host <server-hostname> -trusted
Compilation Services
Fault-Tolerant Compilation
- Automatic re-compilation at the next best optimization levels, in the event
of compiler failure
Beta Release: Invoke with the -ftol
switch, e.g.
% gridmake -ftol
% gridf90 -ftol foo.c
Note: Currently this is compile-time error detection service. A runtime
(generated code) error detection is planned in a future release.
Auto-Tuning Compilation
- Automatic iterative compilation with compiler heuristics
tuned by previous execution profile
Beta Pre-release version: Create build as a make file and invoke with gridmake as follows:
%gridmake -autotune -run <run_command> [-clean <clean_command>]
The SGC autotuning service will perform build-run-test-clean cycles
to generate an optimal binary measured by runtime
Exhaustively Optimized Compilation
Iterative recompile with increasingly aggressive optimizations,
automatically verifying each build cylce with a supplied
verification test suite.
Scheduled for a future release
Keep checking subsequent updates for more services.
Download and Install
Download the package
This package (SUNWsgc) may be obtained from the Sun Download Center (x86-x64 and/or SPARC) Once the gzipped tar file containing
the package has been downloaded, the package may be extracted using the gzip
command. Assuming that the file has been downloaded to the directory
<my_download_dir>, the following commands can be used to extract the package:
cd <my_download_dir>
/bin/gzip -dc SUNWsgc.{SPARCV9,i386}.tar.gz | tar xvf –
GNU make compatibility
To process makefiles which require GNU compatibility, please
download and install the
SPARC GNU make plugin
and/or the x86 GNU make plugin
Installing the package
Once the package has been extracted, install it using the pkgadd
command. The pkgadd command must be executed as root. The following
instructions assume that the package has been downloaded and extracted
into the directory <my_download_dir>.
To install the SUNWsgc package, execute the following command:
pkgadd -d <my_download_dir> SUNWsgc
This will install the SCS in /opt/SUNWsgc/.
The man pages for the tools can be found in /opt/SUNWsgc/man.
Add the directory /opt/SUNWsgc/bin to the PATH environment variable
and /opt/SUNWsgc/man to the MANPATH environment variable, to access the
executables and manpages without full pathnames
Removing the package
The package can be removed via the pkgrm command,
which must be executed as root.
To remove the SUNWsgc package from the root directory, execute the following command:
% pkgrm SUNWsgc
This will remove the tools in the SUNWsgc package from the directory /opt/SUNWsgc/
NOTE: Be sure to remove any existing installation of this package prior to installing newer versions.
Documentation
Please see the man pages supplied with the download package for a description of supported features.
Support
SGC is provided without support. However, a CoolTools Forum is available
where questions and discussions about installing, using, or improving SGC
can be posted. Posting in the forums does not guarantee a response. Please send your feedback to:
|