Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] OMPI link error with petsc 2.3.3
From: Terry Dontje (Terry.Dontje_at_[hidden])
Date: 2008-10-08 11:33:12


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 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 is made the size of mpi_fortran_status_ignore is assumed to be 5 integers (ie 0x14) but has it defined as a pointer to an integer in your case 8 bytes. Since 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 :-).


> Date: Wed, 08 Oct 2008 15:58:11 +0200
> From: "Yann JOBIC" <jobic_at_[hidden]>
> Subject: Re: [OMPI users] OMPI link error with petsc 2.3.3
> To: Open MPI Users <users_at_[hidden]>
> Message-ID: <48ECBC73.2020003_at_[hidden]>
> 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