Cal Poly Logo
ITS/Grid Computing 
C a l i f o r n i a   P o l y t e c h n i c   S t a t e   U n i v e r s i t y  
Grid Computing Home > Compiler



:: Grid Computing ::


Compilers GNU Compilers
C cc or gcc
C++ g++
Fortran 77 g77
Profiler gprof

MPI Compilers MPI programs are compiled using "wrapper scripts", which one you use depends on the language being compiled.
  C Wrapper C++ Wrapper Fortran 77
Wrapper
GNU
Compiler
mpicc mpicxx or
mpiCC
mpif77

Compiling linking and running MPI programs The MPICH implementation provides those commands for compiling and linking programs:

$ mpicc -c foo.c
$ mpif77 -c foo.f
$ mpiCC -c foo.cc
and

$ mpicc -o foo foo.o
$ mpif77 -o foo foo.o
$ mpiCC -o foo foo.o

Commands for the linker may include additional libraries. For example, to use routines from the C math library, use:

$ mpicc -o foo foo.o -lm

Combining compilation and linking in a single command, as shown here:

$ mpicc -o foo foo.c
$ mpif77 -o foo foo.f
$ mpiCC -o foo foo.cc

To run a MPI program, use the "mpirun" command:

$ mpirun -np 4 a.out

To run the program 'a.out' on four processors. The command "mpirun -help" gives you a complete list of options.

For more details on MPICH go to:
http://www-unix.mcs.anl.gov/mpi/mpich1/docs/mpichman-globus2.pdf

 

 

Cal Poly Home | Cal Poly Find It
 
Home | Application Form | Compilers | Quick Start | Submitting Parallel Jobs | Benchmark Tests | Accessing the Cluster | Commercial Softwares | Research



ITS/Grid Computing
California Polytechnic State University
San Luis Obispo, Ca 93407
jburdett@calpoly.edu