/usr/share/doc/mpich-doc/www1/mpicxx.html is in mpich-doc 3.2-7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>mpicxx</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<A NAME="mpicxx"><H1>mpicxx</H1></A>
Compiles and links MPI programs written in C++
<H2>Description</H2>
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.
<P>
It is important to use this command, particularly when linking programs,
as it provides the necessary libraries.
<P>
<H2>Command line arguments</H2>
<DL>
<DT><B>-show </B><DD>Show the commands that would be used without
running them
<DT><B>-help </B><DD>Give short help
<DT><B>-cxx=name </B><DD>Use compiler <tt>name</tt> instead of the default choice. Use
this only if the compiler is compatible with the MPICH
library (see below)
<DT><B>-config=name </B><DD>Load a configuration file for a particular compiler.
This allows a single <tt>mpicxx</tt> command to be used with
multiple compilers.
<DT><B>-compile_info </B><DD>Show the steps for compiling a program. This option
can be used to see what options and include paths are
used by mpicxx.
<DT><B>-link_info </B><DD>Show the steps for linking a program. This option
can be used to see what options and libraries are used by
mpicxx.
<DT><B>-profile=name </B><DD>Use the MPI profiling given by name. See below for
details
<DT><B>-echo </B><DD>Show exactly what this program is doing.
This option should normally not be used.
<DT><B>others </B><DD>are passed to the compiler or linker. For example, <tt>\-c
</tt>causes files to be compiled, <tt>\-g</tt> selects compilation with
debugging on most systems, and <tt>\-o name</tt> causes linking
with the output executable given the name <tt>name</tt>.
</DL>
<P>
<H2>Environment Variables</H2>
The environment variables <tt>MPICH_CXX</tt> 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.
<P>
The environment variable <tt>MPICC_PROFILE</tt> specifies a profile library
and has the same effect as if <tt>\-profile=$MPICC_PROFILE</tt> were used as
an argument to <tt>mpicc</tt>. See the discussion of <tt>\-profile</tt> below for more
details.
<P>
<H2>Compatible Compilers</H2>
The MPI library may be used with any compiler that uses the same
lengths for basic data objects (such as <tt>long double</tt>) 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 <tt>MPICH_CXX</tt> environment variable or the
<tt>\-cxx=name</tt> command-line argument to override the choice of compiler
and encounter problems, try reconfiguring MPICH with the new compiler,
and installing MPICH in a separate location. See the installation manual
for more details.
<P>
<H2>Examples</H2>
To compile a single file <tt>foo.c</tt>, use
<PRE>
mpicxx -c foo.cxx
</PRE>
<P>
To link the output and make an executable, use
<PRE>
mpicxx -o foo foo.o
</PRE>
Combining compilation and linking in a single command
<PRE>
mpicxx -o foo foo.cxx
</PRE>
is a convenient way to build simple programs.
<P>
<H2>Selecting a Profiling Library</H2>
The <tt>\-profile=name</tt> argument allows you to specify an MPI profiling
library to be used. <tt>name</tt> can have two forms:
<P>
<br>A library in the same directory as the MPI library
<br>The name of a profile configuration file
<br>
<P>
If <tt>name</tt> 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.
<P>
If <tt>name.conf</tt> is the name of a file in the sysconfdir directory, then this
is read and may define the following variables:
<DL>
<DT><B>PROFILE_PRELIB </B><DD>Libraries (and paths) to include before the MPI library
<DT><B>PROFILE_POSTLIB </B><DD>Libraries to include after the MPI library
<DT><B>PROFILE_INCPATHS </B><DD>C preprocessor arguments for any include files
For example, to add <tt>/usr/local/myprof/include</tt> to the include path and
the library <tt>libmyprof.a</tt> in <tt>/usr/local/myprof/lib</tt> to the link step,
you could create the file <tt>myprof.conf</tt> with the lines
</DL>
<P>
<PRE>
PROFILE_PRELIB="-L/usr/local/myprof/lib -lmyprof"
PROFILE_INCPATHS="-I/usr/local/myprof/include"
</PRE>
and place it in the sysconfdir directory (this directory is set at
configure time when MPICH is built). Then using the command-line
argument <tt>\-profile=myprof</tt> will cause these
definitions to be added to the relevant compile commands.
<P>
<H0>See Also</H0>
mpicc, mpifort, mpiexec
<br>
</BODY></HTML>
|