OpenMPI for dummies!

OpenMPI tidbits for those who don't have too much time to read all about it but who want to run their codes
with this library:

  1. First, read the page configure of this wiki for configuring and installing openMPI for your own settings.
  2. After correct configuration, build openMPI with the usual "make" and "sudo make install" commands.
  3. [From the openMPI manual] Once correctly installed, in order to run your openMPI code, you need to compile it
with the proper Open MPI "wrapper" compilers (that in reality are NOT real compilers, but they simply
add certain command line flags and invoke a back-end compiler) :

C programs: mpicc your-code.c
C++ programs: mpiCC or mpic++ (for case-insensitive filesystems)
F77 programs: mpif77 your-code.f
F90 programs: mpif90 your-code.f90

  • Profiling:

  • 1) compile with -pg flag
  • 2) execute the program with just a few time teps
  • 3) verify that the file gmon.out was generated
  • 4) >> gprof ./you_EXECUTABLE