Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] What's wrong with this code?
From: Tim Prince (n8tm_at_[hidden])
Date: 2011-02-22 17:22:29

On 2/22/2011 1:41 PM, Prentice Bisbal wrote:
> One of the researchers I support is writing some Fortran code that uses
> Open MPI. The code is being compiled with the Intel Fortran compiler.
> This one line of code:
> integer ierr,istatus(MPI_STATUS_SIZE)
> leads to these errors:
> $ mpif90 -o simplex simplexmain579m.for simplexsubs579
> /usr/local/openmpi-1.2.8/intel-11/x86_64/include/mpif-config.h(88):
> error #6406: Conflicting attributes or multiple declaration of name.
> parameter (MPI_STATUS_SIZE=5)
> -----------------^
> simplexmain579m.for(147): error #6591: An automatic object is invalid in
> a main program. [ISTATUS]
> integer ierr,istatus(MPI_STATUS_SIZE)
> ---------------------^
> simplexmain579m.for(147): error #6219: A specification expression object
> must be a dummy argument, a COMMON block object, or an object accessible
> through host or use association [MPI_STATUS_SIZE]
> integer ierr,istatus(MPI_STATUS_SIZE)
> -----------------------------^
> /usr/local/openmpi-1.2.8/intel-11/x86_64/include/mpif-common.h(211):
> error #6756: A COMMON block data object must not be an automatic object.
> --------------^
> /usr/local/openmpi-1.2.8/intel-11/x86_64/include/mpif-common.h(211):
> error #6591: An automatic object is invalid in a main program.
> Any idea how to fix this? Is this a bug in the Intel compiler, or the code?

I can't see the code from here. The first failure to recognize the
PARAMETER definition apparently gives rise to the others. According to
the message, you already used the name MPI_STATUS_SIZE in mpif-config.h
and now you are trying to give it another usage (not case sensitive) in
the same scope. If so, it seems good that the compiler catches it.

Tim Prince