Jeff Squyres wrote:
> I thought the error was this:
> 
> $ 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)
> ---------------------^
> 
> which seems to only show the definition in mpif-config.h (which is an 
> internal OMPI file).  I could be mis-interpreting those compiler messages, 
> though...
> 
> Off-the-wall guess here: is the program doing both "use mpi" *and* "include 
> mpif.h" in the same subroutine...?

Jeff,

I suspected that and checked for it earlier. I just double-checked, and
that is not the problem. Out of the two source files, 'include mpif.h'
appears once, and 'use mpi' does not appear at all. I'm beginning to
suspect it is the compiler that is the problem. I'm using ifort 11.1.
It's not the latest version, but it's only about 1 year old.

$ ifort --version
ifort (IFORT) 11.1 20100203
Copyright (C) 1985-2010 Intel Corporation.  All rights reserved.

--
Prentice



> 
> 
> On Feb 23, 2011, at 11:51 AM, Tim Prince wrote:
> 
>> On 2/23/2011 8:27 AM, Prentice Bisbal wrote:
>>> Jeff Squyres wrote:
>>>> On Feb 23, 2011, at 9:48 AM, Tim Prince wrote:
>>>>
>>>>>> 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 cmpiler error, since
>>>>>> I'm sure there are plenty of people using the same header file. in their
>>>>>> code.
>>>>>>
>>>>> Are you certain that they all find it necessary to re-define identifiers 
>>>>> from that header file, rather than picking parameter names which don't 
>>>>> conflict?
>>>> Without seeing the code, it sounds like Tim might be right: someone is 
>>>> trying to re-define the MPI_STATUS_SIZE parameter that is being defined by 
>>>> OMPI's mpif-config.h header file.  Regardless of include 
>>>> file/initialization ordering (i.e., regardless of whether mpif-config.h is 
>>>> the first or Nth entity to try to set this parameter), user code should 
>>>> never set this parameter value.
>>>>
>>>> Or any symbol that begins with MPI_, for that matter.  The entire "MPI_" 
>>>> namespace is reserved for MPI.
>>>>
>>> I understand that, and I checked the code to make sure the programmer
>>> didn't do anything stupid like that.
>>>
>>> The entire code is only a few hundred lines in two different files. In
>>> the entire program, there is only 1 include statement:
>>>
>>> include 'mpif.h'
>>>
>>> and MPI_STATUS_SIZE appears only once:
>>>
>>> integer ierr,istatus(MPI_STATUS_SIZE)
>>>
>>> I have limited knowledge of Fortran programming, but based on this, I
>>> don't see how MPI_STATUS_SIZE could be getting overwritten.
>>>
>>>
>> Earlier, you showed a preceding PARAMETER declaration setting a new value 
>> for that name, which would be required to make use of it in this context.  
>> Apparently, you intend to support only compilers which violate the Fortran 
>> standard by supporting a separate name space for PARAMETER identifiers, so 
>> that you can violate the MPI standard by using MPI_ identifiers in a manner 
>> which I believe is called shadowing in C.
>>
>> -- 
>> Tim Prince
>> _______________________________________________
>> users mailing list
>> us...@open-mpi.org
>> http://www.open-mpi.org/mailman/listinfo.cgi/users
> 
> 

Reply via email to