Next: ppwmpicc, Previous: ppwcc, Up: Command Reference
ppwshmemcc is a simple wrapper that takes care of invoking your underlying C compiler with all options and flags needed by the PPW performance tool. ppwshmemcc is meant to be used in place of your regular C compiler (such as cc) such that you can instrument your program for use with PPW with as little effort as possible.
To match the behavior of cc, ppwshmemcc does not automatically append the SHMEM library when linking your application. If your regular compiler requires you to specify -lshmem at the end of your link command, you will also need to specify -lshmem to ppwshmemcc when you link your application.
‘ppwshmemcc’ will pass any options it does not understand to your underlying C compiler.
To invoke ppwshmemcc, use the following syntax:
ppwshmemcc [--inst|--inst-functions|--noinst] [-v|-V|--version|--ppw-verbose|--ppw-showcommand] file.c...
ppwshmemcc gives special meaning to the following options:
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, ppwshmemcc will print a warning
message.
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.