Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] Open MPI programs with autoconf/automake?
From: Nuno Sucena Almeida (slug_at_[hidden])
Date: 2008-11-07 14:11:40

        see if this macro solves your problem:

        it requires some improvement, but might be a start. Since I only have OpenMPI
I use it in the following way(it's not pretty):
dnl Check for MPI
dnl This check will set the MPICC and MPICXX variables to the MPI compiler
dnl if the library is found, or to the regular compilers if not.
AC_ARG_WITH(mpi, [AC_HELP_STRING([--with-mpi],
                 [enable MPI support [default=yes]])],
                 [case "${withval}" in
                       yes|no) with_mpi=$withval;;
                       AC_MSG_ERROR(bad value ${withval} for --with-mpi);;
if test "x$with_mpi" = "xyes"; then
        ACX_MPI([], [AC_MSG_ERROR(could not find mpi library for --with-mpi)])
        MPI_CXXLIBS=`mpicxx --showme:link`
        MPI_CXXFLAGS=`mpicxx --showme:compile`
AM_CONDITIONAL([WE_HAVE_MPI],[test "x$with_mpi" = "xyes"])
# MPI headers/libraries:

I would start by improving the mentioned macro with specific support for each
MPI implementation...


On Thursday 06 November 2008 06:35:33 am Raymond Wan wrote:
> I'm not sure if this is relevant to this mailing list, but I'm trying to
> get autoconf/automake working with an Open MPI program I am writing (in