The mpich implementation provides four commands for compiling and linking C (mpicc), Fortran 77 (mpif77), C++ (mpiCC), and Fortran 90 (mpif90) programs.
You may use these commands instead of the Makefile.in versions, particularly for programs contained in a small number of files. In addition, they have a simple interface to the profiling and visualization libraries described in [14]. In addition, the following special options are supported:
mpicc -c foo.c mpif77 -c foo.f mpiCC -c foo.C mpif90 -c foo.fand
mpicc -o foo foo.o mpif77 -o foo foo.o mpiCC -o foo foo.o mpif90 -o foo foo.oCommands for the linker may include additional libraries. For example, to use routines from the C math library library, use
mpicc -o foo foo.o -lmCombining compilation and linking in a single command, as shown here,
mpicc -o foo foo.c mpif77 -o foo foo.f mpiCC -o foo foo.C mpif90 -o foo foo.fmay also be used.
Note that while the suffixes .c for C programs and .f for Fortran-77 programs are standard, there is no consensus for the suffixes for C++ and Fortran-90 programs. The ones shown here are accepted by many but not all systems.
When mpich was configured, the installation process normally looks for a Fortran 90 compiler, and if it finds one, builds two different versions of an MPI module. One module includes only the MPI routines that do not take ``choice'' arguments; the other includes all MPI routines. A choice argument is an argument that can take any datatype; typically, these are the buffers in MPI communication routines such as MPI_Send and MPI_Recv. The two different modules can be accessed with the -nochoice and -choice option to mpif90 respectively. The choice version of the module supports a limited set of datatypes (numeric scalars and numeric one- and two-dimensional arrays). This is an experimental feature; please send mail to mpi-bugs@mcs.anl.gov if you have any trouble. Neither of these modules offer full ``extended Fortran support'' as defined in the MPI-2 standard.