It seems that the problem is solved.
Actually, when I replaced "use mpi" by "include "mipf.h".
And adding -lmpi -lmpi90, everything works.
I think you need these two "-lmpi -lmpi90" when you have Blas or LAPACK libraries.
From: Jeff Squyres <jsquyres_at_[hidden]>
To: Mohamad Ali Rostami <ma.rostami_at_[hidden]>
Cc: Open MPI Users <users_at_[hidden]>
Sent: Wednesday, June 27, 2012 6:45 PM
Subject: Re: [OMPI users] MPI Problem
Did you verify that the exact same mpif77 / mpif90 is being invoked from within your Makefile as is invoked when you do it manually at a shell prompt?
On Jun 27, 2012, at 3:36 AM, Mohamad Ali Rostami wrote:
> Something strange,
> By adding all the libraries which I found from mpif90/mpif77 --showme,
> Fortran 77 version worked finally,
> but Fortran 90 version still has the problem.
> Error: There is no specific subroutine for the generic 'mpi_init' at (1)
> any idea??
> From: Jeff Squyres <jsquyres_at_[hidden]>
> To: Mohamad Ali Rostami <ma.rostami_at_[hidden]>
> Cc: Open MPI Users <users_at_[hidden]>
> Sent: Monday, June 25, 2012 10:22 PM
> Subject: Re: [OMPI users] MPI Problem
> On Jun 25, 2012, at 3:59 PM, Mohamad Ali Rostami wrote:
> > > mpif90 my_application.f90 -o my_application
> > Yes, as I told you out of make file, it works.
> > The problem is something strange in the make file.
> I'm sorry; I must have mis-parsed your issue, then. So just to make sure I understand:
> shell$ mpif90 my_application.f90 -o my_application
> Works fine, but:
> shell$ make
> ...something that eventually invokes "mpif90 my_application.f90 -o my_application"
> doesn't work. Right?
> If you're invoking the exact same command in both cases (interactive shell and makefile), the *usual* cause of this kind of problem is that the "mpif90" in your Makefile is picking up a different mpif90 than the one that is picked up by your shell. Meaning: your PATH has been reset in the sub-process where "make" is executed, and so when make forks off "mpif90", it finds a different one than the one you execute interactively in the shell.
> Check what your path is and/or exactly which mpif90 is getting invoked by your Makefile.
> Jeff Squyres
> For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/