Next: , Previous: ppwshmemcc, Up: Command Reference

B.8 ppwmpicc

ppwmpicc is a simple wrapper that takes care of invoking your underlying C/MPI compiler with all options and flags needed by the PPW tool. ppwmpicc is meant to be used in place of your usual mpicc invocation such that you can instrument your program for use with PPW with as little effort as possible.

ppwmpicc’ will pass any options it does not understand to your underlying C compiler.

B.8.1 Invoking ppwmpicc

To invoke ppwmpicc, use the following syntax:

     ppwmpicc [--inst|--inst-functions|--noinst]

B.8.2 ppwmpicc Command Options

ppwmpicc gives special meaning to the following options:

Instrument any source files given to the compiler for recording performance data. This option is on by default unless the --noinst option is given.
Track all function entry and exits. This allows PPW to record information about how much time was spent in each function, which allows you to localize performance bottlenecks to individual functions. If you make a large number of function calls in a short period of time in your application, be sure to read the PPW manual section `Managing Measurement Overhead'.

Note that this flag will not work with all C compilers. If PPW cannot record per-function performance data with your chosen C compiler and this flag is passed in, ppwmpicc will print a warning message.

Do not instrument the source files to record performance data. Conflicts with any of the --inst options.
Print version information to stdout before before invoking the underlying C compiler.
Print all commands to stdout prefixed by a `+' before invoking them. This option is not passed along to the backend C compiler. Not useful for most users.
Print all commands out as in --ppw-verbose, except do not run them. Useful for debugging the PPW wrapper script or for poking into the internals of PPW. This option is not passed along to the backend C compiler. Not useful for most users.
Same as --version --ppw-verbose.

B.8.3 ppwmpicc Notes

If you decide to compile parts of your application using a regular compiler such as gcc, you may experience warnings like this:

     $ gcc -c file.c
     $ ppwcc -o myapp file.o file2.c
     PPW warning: Can't find file.o.ppw.compopts
     PPW warning: missing some compilation info
     PPW warning: Can't find file.o.ppw.src
     PPW warning: missing some source info

In short, you may ignore this warning but read the rest of this section for caveats.

PPW keeps metadata about each file that you compile, including compilation arguments and a snapshot of the source code that was compiled. This metadata is stored in files with extensions matching .ppw.*, such as .ppw.compopts and .ppw.src.

During the linking phase, PPW's wrapper scripts assemble all compilation metadata information (along with other data) into a single .ppw.sar file. If you pass in a .o object file that does not have appropriate .ppw.* files, you will get warnings similar to those mentioned above. You may safely ignore such warnings, although when you view performance data for your application later this metadata will not be available.

If you have a complicated build process that moves object files around from the location in which they were originally compiled, remember to keep the .ppw.* files in the same directory if you wish to preserve this metadata.

Please be sure to use either ppwupcc, ppwshmemcc, or ppwcc when linking your application, as these scripts will pass in the necessary arguments to link your application against all libraries that PPW requires.