Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] Equivalent .h files
From: Eugene Loh (Eugene.Loh_at_[hidden])
Date: 2008-10-30 10:49:58

Benjamin Lamptey wrote:

> Hello,
> I am new at using open-mpi and will like to know something basic.
> What is the equivalent of the "mpif.h" in open-mpi which is normally
> "included" at
> the beginning of mpi codes (fortran in this case).
> I shall appreciate that for cpp as well.

For Fortran:

      INCLUDE "mpif.h"

For C:

#include <mpi.h>

If you use the compiler wrappers (mpif90, mpicc, etc.), they should be
able to find the include files.

MPI source codes are *supposed* to run unchanged as you move them from
one MPI to another, even if the procedures for compiling and launching
those codes vary.

P.S. It's "Open<space>MPI" rather than "open-mpi". :^)