Yann,

Well, when you use f90 to link it passed the linker the -t option which is 
described in the manpage with the following:

       Turns off the warning for multiply-defined symbols  that
        have different sizes or different alignments.

That's why :-)

To your original question should you worry about this?  Answer is no.

The reason why follows, after digging in the OMPI code no you should not.  The 
reason being is what is happening is in the Fortran library we define 
MPI_STATUS_IGNORE to be a size of 5 integers so when you pass it to an MPI call 
you don't get an error from the compiler complaining that the argument doesn't 
match the parameter type it was expecting.  However, we also define 
MPI_STATUS_IGNORE in a common block to overlap the libmpi.so variable 
mpi_fortran_status_ignore which is a pointer to an integer.  This is done so 
when you pass MPI_STATUS_IGNORE to an MPI call it can recognize this as a 
special MPI_STATUS_IGNORE value and operate appropriately (ie don't return 
values back via the status structure.

The problem is that when libmpi_f90.so is made the size of 
mpi_fortran_status_ignore is assumed to be 5 integers (ie 0x14) but libmpi.so 
has it defined as a pointer to an integer in your case 8 bytes.  Since 
libmpi.so is actually doing nothing except looking at the address of the common 
block you do not run the risk of having issues with the size being off so 
ignoring the size differences of the symbol is ok.


Sorry it took so long for me to piece all of this together.  I actually mucked 
with this before about 9 months ago.  I guess it was such a traumatic 
experience that I blanked out the workings :-).

--td

Date: Wed, 08 Oct 2008 15:58:11 +0200
From: "Yann JOBIC" <jo...@polytech.univ-mrs.fr>
Subject: Re: [OMPI users] OMPI link error with petsc 2.3.3
To: Open MPI Users <us...@open-mpi.org>
Message-ID: <48ecbc73.2020...@polytech.univ-mrs.fr>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hello,

I just tried to link with mpif90. And that's working! I don't have the warning.
(the small change from your command : PIC, not fPIC)

I'm trying to compile PETSC with the new linker.

How come we don't have the warning ?

Thanks,

Yann


Reply via email to