Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] Fortran - MPI_WORLD_COMM
From: Anthony Chan (chan_at_[hidden])
Date: 2010-06-22 18:57:54

I don't think you can declare a function with a fortran parameter:

subroutine testsubr(MPI_COMM_WORLD,ireadok)

1) If you've already included mpif.h with in testsubr(),
   you don't need the 1st argument above.
2) If you don't have mpif.h in testsubr(), the 1st argument
   could be MPI_comm. In that case, replace MPI_COMM_WORLD
   in MPI_Bcast by MPI_comm.

This is basic fortran programming issue, you may want to consult
some fortran programming book.


----- "Mihaly Mezei" <Mihaly.Mezei_at_[hidden]> wrote:

> Hi,
> The previous example I posted shows that using a different integer
> does not work, Attached is a case where I tired to pass the
> MPI_COMM_WORLD to the subroutine as one of it arguments, resulting in
> an invalid datatype error.
> Mihaly Mezei
> Department of Structural and Chemical Biology, Mount Sinai School of
> Medicine
> Voice: (212) 659-5475 Fax: (212) 849-2456
> WWW (MSSM home):
> WWW (Lab home - software, publications):
> WWW (Department):