mpicc man page on Scientific

Man page or keyword search:  
man Server   26626 pages
apropos Keyword Search (all sections)
Output format
Scientific logo
[printable version]

mpicc(1)			      MPI			      mpicc(1)

NAME
       mpicc -	Compiles and links MPI programs written in C

DESCRIPTION
       This command can be used to compile and link MPI programs written in C.
       It provides the options and any special libraries that  are  needed  to
       compile and link MPI programs.

       It  is  important  to  use this command, particularly when linking pro‐
       grams, as it provides the necessary libraries.

COMMAND LINE ARGUMENTS
       -show  - Show the commands that would be used without runnning them
       -help  - Give short help
       -cc=name
	      - Use compiler name instead of the  default  choice.   Use  this
	      only  if	the compiler is compatible with the MPICH library (see
	      below)
       -config=name
	      - Load a configuration file for  a  particular  compiler.	  This
	      allows  a	 single mpicc command to be used with multiple compil‐
	      ers.
       -compile_info
	      - Show the steps for compiling a program.	 This  option  can  be
	      used to see what options and include paths are used by mpicc.
       -link_info
	      - Show the steps for linking a program.  This optoin can be used
	      to see what options and libraries are used by mpicc.
       -profile=name
	      - Use the MPI profiling given by name.  See below for details
       -mpe=name
	      - Use an MPE profiling library.	The  behavior  is  similar  to
	      using -profile=mpe_name.conf .

       -echo  -	 Show  exactly what this program is doing.  This option should
	      normally not be used.
       others - are passed to the compiler or linker.  For example, -c	causes
	      files  to	 be compiled, -g selects compilation with debugging on
	      most systems, and -o name causes linking with  the  output  exe‐
	      cutable given the name name .

ENVIRONMENT VARIABLES
       The  environment	 variable  MPICH_CC  may be used to select different C
       compiler and linker.  Note that since MPICH is built with a  particular
       C and Fortran compiler, changing the compilers used can cause problems.
       Use this only if you could intermix code compiled  with	the  different
       compilers.

       The  environment variable MPICC_PROFILE specifies a profile library and
       has the same effect as if -profile=$MPICC_PROFILE were used as an argu‐
       ment to mpicc .	See the discussion of -profile below for more details.

COMPATIBLE COMPILERS
       The  MPI	 library  may  be  used	 with  any compiler that uses the same
       lengths for basic data objects (such as long double  )  and  that  uses
       compatible  run-time libraries.	On many systems, the various compilers
       are compatible and may be used interchangably.  There  are  exceptions;
       if  you	use the MPICH_CC environment variable or the -cc=name command-
       line argument to override the choice of compiler	 and  encounter	 prob‐
       lems,  try  reconfiguring  MPICH2  with the new compiler and installing
       MPICH2 in a separate location.  See the installation  manual  for  more
       details.

EXAMPLES
       To compile a single file foo.c , use
       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.

SELECTING A PROFILING LIBRARY
       The  -profile=name  argument  allows  you  to  specify an MPI profiling
       library to be used.  name can have two forms:

       A library in the same directory as the MPI library
       The name of a profile configuration file

       If name is a library, then this library	is  included  before  the  MPI
       library.	  This allows the simple use of libraries that make use of the
       MPI profiling interface and that are installed in the same directory as
       the MPI library.

       If  name.conf  is  the name of a file in the sysconfdir directory, then
       this is read and may define the following variables:
       PROFILE_PRELIB
	      - Libraries (and paths) to include before the MPI library
       PROFILE_POSTLIB
	      - Libraries to include after the MPI library
       PROFILE_INCPATHS
	      - C preprocessor arguments for any include files For example, to
	      add  /usr/local/myprof/include  to  the  include	path  and  the
	      library libmyprof.a in /usr/local/myprof/lib to the  link	 step,
	      you could create the file myprof.conf with the lines

	      PROFILE_PRELIB="-L/usr/local/myprof/lib -lmyprof"
	      PROFILE_INCPATHS="-I/usr/local/myprof/include"

	      and  place it in the sysconfdir directory (this directory is set
	      at configure time when MPICH is built).  Then using the command-
	      line argument -profile=myprof will cause these definitions to be
	      added to the relevant compile commands.

SEE ALSO
       mpif77, mpicxx, mpif90, mpiexec

LOCATION
       mpicc.txt

				   3/24/2011			      mpicc(1)
[top]

List of man pages available for Scientific

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net