MPD(1)

NAME
mpd - MPD compiler

SYNOPSIS
mpd [-sbcqwegvOTMCFP] [-I dir] [-o file] [-d flags] file.mpd ... otherfiles...

DESCRIPTION

Mpd compiles programs written in the MPD language. In the usual case, one or more .mpd files are compiled to produce .o files, and then the MPD linker, mpdl(1), is called to produce an executable file a.out. The last encountered resource is taken as the main resource.

Compilation and linking takes place in the context of an MPDinter directory used for passing specification and object files between mpd and mpdl runs. Files are created in the MPDinter directory as each resource or global is compiled. The MPDinter directory is needed for compilation and linking, but not execution, and can be deleted after an executable has been produced.

Each source file is read twice. The first pass copies component specifications into the MPDinter directory; the second pass generates object code. If errors are detected in the first pass, the second pass is omitted.

Files not ending in .mpd (such as .o, .a, and -lxx files) are not processed by mpd but are passed along to mpdl.

OPTIONS

Any of the options s, b, c, M, or C inhibits linking.

-I dir
    Use dir/MPDinter as the MPDinter directory instead of ./MPDinter.

-o file
    Use file for the executable instead of a.out.

-s  Create specification files only (first pass only).

-b  Compile bodies only (second pass only), leaving specification files unaltered.

-c  Compile specs and bodies, but do not link .o files to create an executable file.

-q  Suppress the echoing of source file names as they are compiled.

-w  Suppress warning messages.

-O  Omit some runtime error checks and invoke the C optimizer to improve the generated code.

-T  Omit the ``timeslicing'' code that allows context switching at the top of each loop.

-M  Generate dependency information for use by mpdm(1), then exit without compiling anything.

Additional options are useful mainly when debugging the compiler:

-C  Stop after generating .c files, leaving them undeleted.

-F  Inhibit constant folding. This can break programs by rendering certain expressions non-constant.

-P  Inhibit normal optimizations in the MPD compiler.

-d flags
    Write debugging output selected by flags on standard output.

-e  Use experimental versions of mpdl and .h files, and pass -e to mpdl.

-g  Compile for debugging with dbx(1), don't delete .c files, and pass -g to mpdl.

-v  Announce version number, trace other programs invoked by mpd, and pass -v to mpdl.

ENVIRONMENT

MPD_PATH
    When compiling an import statement, mpd searches for a corresponding .spec file by looking first in the current directory, then in the MPDinter directory, and finally in the MPD library. If MPD_PATH is set, any directories named there are checked ahead of the standard search sequence. Directories in MPD_PATH are separated by colons (:).

EXECUTION ENVIRONMENT

These environment variables can be set at execution time to affect the behavior of an MPD program:

MPD_PARALLEL
    Controls the number of processes that can run with true concurrency (as opposed to simulated concurrency) under MultiMPD. MultiMPD is a configuration option available on the SGI Iris, Sun Sparc running Solaris 2.x, and Sequent Symmetry. The default value is 1 (no true concurrency). It makes little sense to set MPD_PARALLEL greater than the number of available processors.

MPD_SPIN_COUNT
    In MultiMPD, the number of times an idle processor will check for a task before relinquishing the CPU to the operating system. Larger values increase the opportunity for processes to quickly resynchronize at the expense of greater CPU usage. The default is 35.

MPD_NAP_INTERVAL
    In MultiMPD, the number of milliseconds an idle processor will nap after trying unsuccessfully to find something to run. The default is 10.

MPD_TRACE
    If not null, MPD_TRACE specifies the name of a file to receive a trace of messages, invocations, and other language-level events. Two special names, stdout and stderr, direct the trace output to standard output and standard error output respectively. The default is no tracing. Traces from remote virtual machines appear only if the trace is directed to stdout or stderr. The mpdprof(1) program can be used to summarize the trace output.

MPD_DEBUG
    A hexadecimal number specifying a bit mask that enables debugging information of various internal runtime events on standard error output. Each bit selects a different message category, and the higher order bits (FFFFFF00) produce the most voluminous output. Details are contained in the source code of the runtime system. The default is no debugging. In contrast with MPD_TRACE, the output from MPD_DEBUG records internal events of interest to maintainers of the runtime system.

MPDXPATH
    Path to the executable of mpdx, which serves as the central controller of a distributed MPD program. The default is configured when the MPD system is built.

MPDMAP
    File to read for the network configuration information used to generate a host-independent ``network path'' of the executable for executing part of an MPD program on a remote host. The default is configured when the MPD system is built.

FILES
file.mpd    MPD source file
a.out    executable program
MPDinter/component.c    C language intermediate file
MPDinter/component.spec    specification file
MPDinter/global.impl    global characteristics
MPDinter/component.o    object file

SEE ALSO
Gregory R. Andrews, Foundations of Multithreaded, Parallel, and Distributed Programming. Addison-Wesley, 2000, ISBN 0-201-35752-6.

mpdl(1), mpdm(1), mpdprof(1), cc(1), dbx(1), mpdmap(5), mpdtrace(5)

The MPD web page, http://www.cs.arizona.edu/mpd/.

DIAGNOSTICS

Messages diagnosing erroneous programs are intended to be self-explanatory.

Messages indicating ``compiler malfunction'', or any error messages generated by the C compiler, indicate bugs in the MPD compiler that should be reported to its implementors.