On Jun 5, 2007, at 4:22 PM, Ben Allan wrote:

What you really want, after configure has confirmed openmpi with the
macro check, is to extract the libraries listed in the output of
mpif90 -v test.f
that are needed.
Ideally someone could update ompi_config to output the link flags for 3 cases:
C++ linking without using mpicxx
F90 linking without using mpif90
F90 linking without f90
but that's a nontrivial bit of work.

Or you could run

        mpiCC --showme:link
        mpif90 --showme:link

The objection to that was that --showme is OMPI-specific. But then again, so is running ompi_info.

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).

The fortran lib extraction process can be rather hairy if done portably-- the
babel team at llnl has largely solved it in
babel-$VERSION/runtime/m4/llnl_confirm_babel_f90_support.m4
and related files obtainable from
http://www.llnl.gov/CASC/components/docs/babel-1.1.0.tar.gz

Ben


_______________________________________________
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users


--
Jeff Squyres
Cisco Systems

Reply via email to