On Jun 25, 2012, at 11:47 AM, Mohamad Ali Rostami wrote:

> I tried some really simple code like:
> 
> use mpi
> integer ierr
> call mpi_init(ierr)

Good -- nice, simple test code.

> 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?

That should be correct.

Can you try it just on the compile line to make sure nothing extra wonky is 
going on?  E.g., something as simple as:

    mpif90 my_application.f90 -o my_application

You can also see what mpif90 is doing under the covers by adding --showme to 
the command line:

    mpif90 my_application.f90 -o my_application --showme

Also make sure of two things:

1. The mpif90 is the one you think it is (e.g., run "which mpif90" and ensure 
that you're getting the "right" mpif90)

2. Ensure that your Open MPI has f90 support compiled in.  Run "ompi_info | 
grep -i fort" and look at the output to ensure that your OMPI installation has 
F90 support compiled in.


> 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 <jsquy...@cisco.com>
> To: Mohamad Ali Rostami <ma.rost...@yahoo.com>; Open MPI Users 
> <us...@open-mpi.org> 
> 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
> jsquy...@cisco.com
> For corporate legal information go to: 
> http://www.cisco.com/web/about/doing_business/legal/cri/
> 
> 
> 


-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to: 
http://www.cisco.com/web/about/doing_business/legal/cri/


Reply via email to