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: Prentice Bisbal (prentice_at_[hidden])
Date: 2011-02-23 09:41:22


Tim Prince wrote:
> 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.
>> [MPI_STATUS_SIZE]
>> 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.
>> [MPI_STATUS_IGNORE]
>> integer MPI_STATUS_IGNORE(MPI_STATUS_SIZE)
>> --------------^
>> /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.
>> [MPI_STATUS_IGNORE]
>> integer MPI_STATUS_IGNORE(MPI_STATUS_SIZE)
>>
>>
>> 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.

I agree with your logic, but the problem is where the code containing
the error is coming from - it's comping from a header files that's a
part of Open MPI, which makes me think this is a compiler error, since
I'm sure there are plenty of people using the same header file. in their
code.

-- 
Prentice