On Jun 5, 2007, at 6:46 PM, Jeff Squyres wrote:
> On Jun 5, 2007, at 4:51 PM, Lie-Quan Lee wrote:
>
>> Using the OPEN_MPI #define is probably the safest bet to identify the
>> MPI as Open MPI, which then opens the door to using mpi<compiler> --
>> showme to find the proper linker flags. I would *NOT* recommend
>> hard-
>> coding specific flags just because you know that you're linking
>> against Open MPI (because we can/have changed the flags behind the
>> scenes).
>>
>> I think one of the possible solutions would be, in the next MPI
>> standard (will it come very soon?, or not?),
>
> I would like to hope that MPI 2.1 comes out someday in the not-
> distant future, but I'm guessing that it'll take quite a while.
>
>> specify the library (libraries) for mixed language linking.
>
> MPI has traditionally shied away from specifying this kind of thing,
> instead leaving it to be an implementation-specific detail.
it is a quite of headache for each compiler/platform to deal with
mixed language
issues. I have to compile my application on IBM visual age compiler,
Pathscale, Cray X1E compiler,
intel/openmpi, intel/mpich, PGI compiler ...
And of course, openmpi 1.1 is different on this comparing with
openmpi 1.2.2 (-lmpi_f77 is new to 1.2.2 version). :-)
You are right. MPI forum most like will not take care of this. I just
made a wish ... :-)
> What, exactly, do you need to do? Do you need to link an application
> that uses all 4 of the MPI language bindings?
>
Anthony Chan's macro works fine to identify the openmpi (Thanks a
lot!). After that I use mpif90 -showme:link to find out the flags and
put them into LDFLAGS in my application. -- That is all I needed.
Thanks.
best,
Rich Lee
Stanford Linear Accelerator Center
|