Open MPI logo

Open MPI User's Mailing List Archives

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

From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2007-06-05 16:27:30

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

> 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
> Ben
> _______________________________________________
> users mailing list
> users_at_[hidden]

Jeff Squyres
Cisco Systems