|
From: <sv...@va...> - 2006-03-08 15:26:15
|
Author: sewardj
Date: 2006-03-08 15:26:10 +0000 (Wed, 08 Mar 2006)
New Revision: 5726
Log:
MPI build system refinements: just base everything off mpicc, and don't
try to figure out where mpi.h is.
Modified:
trunk/auxprogs/Makefile.am
trunk/configure.in
Modified: trunk/auxprogs/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/auxprogs/Makefile.am 2006-03-08 13:24:21 UTC (rev 5725)
+++ trunk/auxprogs/Makefile.am 2006-03-08 15:26:10 UTC (rev 5726)
@@ -46,7 +46,7 @@
#libmpiwrap_so_LDFLAGS =3D $(AM_FLAG_M3264_PRI) -g -shared
libmpiwrap.so: mpiwrap.c
$(MPI_CC) -g -O -fno-omit-frame-pointer -Wall -fpic -shared \
- -I../include -I@MPI_PREFIX@/include \
+ -I../include \
$(AM_FLAG_M3264_PRI) \
-o libmpiwrap.so mpiwrap.c
=20
Modified: trunk/configure.in
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/configure.in 2006-03-08 13:24:21 UTC (rev 5725)
+++ trunk/configure.in 2006-03-08 15:26:10 UTC (rev 5726)
@@ -597,59 +597,35 @@
AC_CHECK_FUNCS([floor memchr memset mkdir strchr strdup strpbrk strrchr =
strstr semtimedop])
=20
=20
-# Do we have a useable mpicc (MPI-ised C compiler) ?
+# Do we have a useable MPI setup (mpicc, and suitable MPI2 headers?)
MPI_CC=3D"mpicc"
AC_ARG_WITH(mpicc,
- [ --with-mpicc=3D Specify name of MPI-ised C compiler],
+ [ --with-mpicc=3D Specify name of MPI2-ised C compiler],
MPI_CC=3D$withval
)
-AC_MSG_CHECKING([for usable mpicc])
+AC_MSG_CHECKING([for usable MPI2-compliant mpicc and mpi.h])
saved_CC=3D$CC
CC=3D$MPI_CC
-AC_TRY_COMPILE(, [
-int main ( ) { return 0; }
-],
-[
-ac_have_mpicc=3Dyes
-AC_MSG_RESULT([$MPI_CC])
-], [
-ac_have_mpicc=3Dno
-AC_MSG_RESULT([no])
-])
-CC=3D$saved_CC
-
-
-# First consider --with-mpi=3D..., then check for mpi.h
-saved_CC=3D$CC
-CC=3D$MPI_CC
-MPI_PREFIX=3D"/usr"
-AC_ARG_WITH(mpi,
- [ --with-mpi=3D/path/to/mpi/install Specify location of MPI],
- MPI_PREFIX=3D$withval
-)
-
-AC_MSG_CHECKING([for $MPI_PREFIX/include/mpi.h])
-
-AC_TRY_COMPILE(, [
-#include "$MPI_PREFIX/include/mpi.h"
+AC_TRY_LINK(, [
+#include <mpi.h>
+#include <stdio.h>
int main ( int argc, char** argv )=20
- { int r =3D MPI_Init(&argc,&argv); return 0 ; }
+{=20
+ int r =3D MPI_Init(&argc,&argv);
+ r |=3D MPI_Type_get_contents( MPI_INT, 0,0,0, NULL,NULL,NULL );
+ return r;=20
+}
],
[
-ac_have_mpi_h=3Dyes
-AC_MSG_RESULT([yes])
+ac_have_mpi2=3Dyes
+AC_MSG_RESULT([yes, $MPI_CC])
], [
-ac_have_mpi_h=3Dno
+ac_have_mpi2=3Dno
AC_MSG_RESULT([no])
])
CC=3D$saved_CC
=20
-#if test x$ac_have_mpi_h =3D xyes ; then
-# AC_DEFINE(HAVE_MPI_H, 1, [Define to 1 if mpi.h is available.])
-#fi
-
-AM_CONDITIONAL(BUILD_MPIWRAP, test x$ac_have_mpi_h =3D xyes)
-AC_SUBST(MPI_PREFIX)
+AM_CONDITIONAL(BUILD_MPIWRAP, test x$ac_have_mpi2 =3D xyes)
AC_SUBST(MPI_CC)
=20
=20
|