I tried some really simple code like:

use mpi
integer ierr
call mpi_init(ierr)

The problem still exists.

However, I am running the code from some make file and call
the compiler mpif90. Perhaps some special library should be included?

Could the problem be from the hybrid parallelization?

And something else which I am thinking of: Can extra flags for compiler make this happen?

The last question came to my mind because when I try this simple example with mpif90 alone (without make file), it works good.

$(MPIFC) -c $(FFLAGS) $(PFLAGS) $< -o $@

From: Jeff Squyres <>
To: Mohamad Ali Rostami <>; Open MPI Users <>
Sent: Monday, June 25, 2012 3:39 PM
Subject: Re: [OMPI users] MPI Problem

On Jun 25, 2012, at 4:07 AM, Mohamad Ali Rostami wrote:

> I have an error since a week ago which it makes me crazy. :P
> I have a OpenMP parallelized fortran (f90) program which I am going to parallelize some part of it, using MPI (OpenMPI).
> When I want to compile the code with my new MPI code, I get this problem:
> "Error: There is no specific subroutine for the generic 'mpi_init'", while the compilation has no problem
> with the header "use mpi" and even it seems that it does not have any problems with the variables and parameters from
> MPI and the problem is just with subroutines.

This *usually* means that you are calling the subroutine incorrectly (MPI_Init, in this case).  The prototype for MPI_Init is:

subroutine MPI_Init(ierr)
  integer, intent(out) :: ierr
end subroutine MPI_Init

Are you passing a writable integer parameter?

Jeff Squyres
For corporate legal information go to: