autoconf
[Top][All Lists]
Advanced

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

MPI recognition


From: Olaf Lenz
Subject: MPI recognition
Date: Tue, 21 Dec 2010 15:16:10 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7

Hello everybody!

For our scientific software ESPResSo[1], I am trying to get configure to
be able to handle MPI compilers correctly. MPI is a parallelization
library and it often brings its own compiler, i.e. actually it only
brings a wrapper to your compiler, which is usually called mpicc. In our
case, the whole software is supposed to be compiled using the MPI
compiler. If none is available, it is still possible to compile it using
a standard compiler.

The idea is, that I first check whether the user wants to use MPI at all
("--with-mpi"), and if he wants, I first try to find the possible MPI
compilers using AC_PROG_CC([mpicc ...]). If he doesn't want it, or if no
MPI compiler was found, then the standard compiler using AC_PROG_CC
should be used.

I have attached my simplified attempt do this. When I run autoconf, I
get the warning

  configure.ac:4: warning: AC_REQUIRE: `AC_PROG_CC' was expanded before
it was required

and configure doesn't seem to be looking for mpicc, but always finds gcc
first.
The problem seems to be that AC_PROG_CC doesn't work when using it in a
conditional, is that right? Is there any simple way to do what I want?

The autoconf macro archive contains the macro AX_MPI[2] which is
intended to recognize MPI compilers, however, I find it has a few
shortcomings and doesn't really solve the problem, as it always first
uses AC_PROG_CC and like that recognizes the standard compiler and
determines the various compiler characteristics and only afterwards
finds the MPI compiler. If the MPI compiler understands completely
different options than the standard compiler, this leads to massive
problems.

Best regards

        Olaf Lenz


References:
[1] http://espressomd.org
[2] http://www.gnu.org/software/autoconf-archive/ax_mpi.html

-- 
Dr. rer. nat. Olaf Lenz
Institut für Computerphysik, Pfaffenwaldring 27, D-70569 Stuttgart
Phone: +49-711-685-63607

Attachment: configure.ac
Description: Text document

Attachment: olenz.vcf
Description: Vcard


reply via email to

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