MAN page from Mandriva 2010 mpicc-188.8.131.52-11mdv2008.1.i586.rpm
Section: MPI Commands (1)
mpicc - Compiles and links MPI programs written in C
This command can be used to compile and link MPI programs written inC. It provides the options and any special libraries that areneeded to compile and link MPI programs.
It is important to use this command (or a Makefileprocessed withmpireconfig) particularly when linking programs, as it providesthe necessary libraries. It can also simplify the use of the MPEprofiling libraries, through the use of the -mpilog, -mpitrace,and -mpianimcommands.
COMMAND LINE ARGUMENTS
- - Build version that generate MPE log files
- - Build version that generates traces
- - Build version that generates real-timeanimation
- - Show the commands that would be used withoutrunnning them
- - Give short help
- - Show exactly what this program is doing.This option should normally not be used.
- - are passed to the compiler or linker. For example, -ccauses files to be compiled, -gselects compilation with debuggingon most systems, and -o namecauses linking with the outputexecutable given the name name.
The environment variables MPICH_CC
may be usedto select different C compiler and linker. Note that sinceMPICH is built with a particular C and Fortran compiler, change thecompilers used can cause problems. Use this only if you could intermixcode compiled with the different compilers.
To compile a single file foo.c
mpicc -c foo.c
To link the output and make an executable, use
mpicc -o foo foo.o
Combining compilation and linking in a single command
mpicc -o foo foo.c
is a convenient way to build simple programs.
- COMMAND LINE ARGUMENTS
- ENVIRONMENT VARIABLES
- SEE ALSO
This document was created byman2html,using the manual pages.