autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MPI recognition


From: Ralf Wildenhues
Subject: Re: MPI recognition
Date: Wed, 22 Dec 2010 07:44:39 +0100
User-agent: Mutt/1.5.20 (2010-08-04)

Hi Olaf, and sorry for the delay in replying, Eric,

* Eric Blake wrote on Tue, Dec 21, 2010 at 04:57:04PM CET:
> On 12/21/2010 07:16 AM, Olaf Lenz wrote:
> 
> > After some trial and error I have found a solution for my problem that
> > is very simple. Now I wonder whether this is actually the correct way to
> > do it, or are there some hidden pitfalls?
> > 
> > AC_ARG_WITH(mpi,,, [with_mpi=guess])
> > if test x"$with_mpi" != xno; then
> >   COMPILERS="mpicc hcc mpxlc_r mpxlc mpcc cmpicc gcc cc"
> > else
> >   COMPILERS="gcc cc"
> > fi
> > AC_PROG_CC($COMPILERS)
> 
> Yes, this is actually a quite decent solution, although you may be
> artificially limiting the set of $COMPILERS to something less than what
> AC_PROG_CC() would support by default.

One problem with the above is that the settings 'gcc' and 'cc' will fail
to be correct MPI compilers, as they likely won't link in the MPI
library.  Nowadays this doesn't happen so often any more but on some
systems it is good to have that possibility (also to override the
library name with $MPILIBS).  See the respective code in AX_MPI which
tries to get that stuff right also.

I still intend to come up with a AX_MPI_ONLY macro, to be added to
ax_mpi.m4, that fixes this and also works for the other languages.
(I don't mind being beaten to it though ;-)

These macros need to be kept close together so they can remain in sync.

Thanks,
Ralf



reply via email to

[Prev in Thread] Current Thread [Next in Thread]