[cig-commits] r5751 - in short/3D/PyLith/branches/pylith-0.8: . pylith3d pylith3d/libpylith3d pylith3d/module

leif at geodynamics.org leif at geodynamics.org
Tue Jan 9 19:19:31 PST 2007


Author: leif
Date: 2007-01-09 19:19:31 -0800 (Tue, 09 Jan 2007)
New Revision: 5751

Modified:
   short/3D/PyLith/branches/pylith-0.8/configure.ac
   short/3D/PyLith/branches/pylith-0.8/pylith3d/Makefile.am
   short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d/Makefile.am
   short/3D/PyLith/branches/pylith-0.8/pylith3d/module/Makefile.am
   short/3D/PyLith/branches/pylith-0.8/pylith3d/pypylith3d.cc
Log:
Tied PyLith's configuration even more closely to PETSc's: use
'petscconf' to determine both CXX and the MPI flags.

I'm not sure why this 'configure' script didn't grab MPI configuration
from PETSc.  But, I remember why it didn't grab CXX from PETSc:
Lithomop didn't require PETSc to be configured with C++, so it
couldn't assume that 'petscconf' defined CXX.  Now, with the addition
of the Sieve dependency, it can be assumed that 'petscconf' defines
CXX.

It is almost certainly an error to configure PyLith with a C++
compiler different from the one used to configure PETSc; this change
avoids that potential mistake.  This change also avoids confusing
'configure' error messages about MPIINCLUDES and MPILIBS, which aren't
relevant to PyLith -- PyLith should simply be configured with the MPI
library defined by the PETSc configuration.


Modified: short/3D/PyLith/branches/pylith-0.8/configure.ac
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/configure.ac	2007-01-10 03:08:39 UTC (rev 5750)
+++ short/3D/PyLith/branches/pylith-0.8/configure.ac	2007-01-10 03:19:31 UTC (rev 5751)
@@ -67,19 +67,27 @@
 AC_SUBST(PYTHON_EGG_CPPFLAGS)
 AC_SUBST(PYTHON_EGG_LDFLAGS)
 
-# Checks for programs.
+# Check for PETSc.
 CIT_PATH_PETSC([2.3])
-CIT_PROG_MPICXX
-# this is not portable
-CXX=$MPICXX
+if test -z "$CXX"; then
+    AC_PATH_PROG(CXX, $PETSC_CXX, $PETSC_CXX)
+    test -z "$CXX" && AC_MSG_FAILURE([C++ compiler $PETSC_CXX (used to configure PETSc) not found in \$PATH])
+else
+    want_CXX=$CXX; unset CXX
+    AC_PATH_PROG(CXX, $want_CXX, $want_CXX)
+    test -z "$CXX" && AC_MSG_FAILURE([C++ compiler $want_CXX not found in \$PATH])
+fi
 if test -z "$FC"; then
-    AC_CHECK_PROG(FC, $PETSC_FC, $PETSC_FC)
+    AC_PATH_PROG(FC, $PETSC_FC, $PETSC_FC)
     test -z "$FC" && AC_MSG_FAILURE([Fortran compiler $PETSC_FC (used to configure PETSc) not found in \$PATH])
 else
     want_FC=$FC; unset FC
-    AC_CHECK_PROG(FC, $want_FC, $want_FC)
+    AC_PATH_PROG(FC, $want_FC, $want_FC)
     test -z "$FC" && AC_MSG_FAILURE([Fortran compiler $want_FC not found in \$PATH])
 fi
+
+# Checks for programs.
+AC_PROG_CXX
 AC_PROG_FC
 F77=$FC
 FFLAGS=$FCFLAGS
@@ -87,16 +95,19 @@
 AC_FC_WRAPPERS
 AC_PROG_LIBTOOL
 
-# Set the language for MPI tests.
+# Check for MPI.
 AC_LANG(C++)
+CIT_MPI_CHECK_CXX_LINK(PETSC_INCLUDE, [$PETSC_LIB],
+                       _CIT_TRIVIAL_MPI_PROGRAM,
+                       [whether we can link a trivial C++ MPI program],
+                       [],
+                       AC_MSG_FAILURE([cannot link a trivial C++ MPI program]))
 
 # Checks for libraries.
-CIT_CHECK_LIB_MPI
 CIT_CHECK_LIB_PETSC
 CIT_CHECK_LIB_PETSC_SIEVE
 
 # Checks for header files.
-CIT_HEADER_MPI
 CIT_HEADER_PETSC
 
 # Checks for typedefs, structures, and compiler characteristics.

Modified: short/3D/PyLith/branches/pylith-0.8/pylith3d/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/Makefile.am	2007-01-10 03:08:39 UTC (rev 5750)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/Makefile.am	2007-01-10 03:19:31 UTC (rev 5751)
@@ -38,7 +38,7 @@
 	pylith3d/PetscUtil.py
 
 # pypylith3d (libpylith3d + pylith3dmodule + embedded Python interpreter)
-INCLUDES = -I$(top_srcdir)/pylith3d/module $(PYTHON_EGG_CPPFLAGS) -I$(PYTHON_INCDIR)
+INCLUDES = -I$(top_srcdir)/pylith3d/module $(PYTHON_EGG_CPPFLAGS) -I$(PYTHON_INCDIR) $(PETSC_INCLUDE)
 pypylith3d_SOURCES = pypylith3d.cc
 pypylith3d_LDADD = \
 	$(top_builddir)/pylith3d/module/libpylith3dmodule.a \
@@ -50,7 +50,6 @@
 		$(PYTHON_BLDLIBRARY) \
 		$(PYTHON_EGG_LDFLAGS) \
 		$(PETSC_FORTRAN_LIB) $(PETSC_LIB) \
-		$(MPILIBS) \
 		$(FCLIBS) \
 		$(PYTHON_LIBS) $(PYTHON_MODLIBS) $(PYTHON_SYSLIBS) \
 		$(LIBS) \
@@ -67,7 +66,6 @@
 		$(PYTHON_BLDLIBRARY) \
 		$(PYTHON_EGG_LDFLAGS) \
 		$(PETSC_FORTRAN_LIB) $(PETSC_LIB) \
-		$(MPILIBS) \
 		$(FCLIBS) \
 		$(PYTHON_LIBS) $(PYTHON_MODLIBS) $(PYTHON_SYSLIBS) \
 		$(LIBS) \

Modified: short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d/Makefile.am	2007-01-10 03:08:39 UTC (rev 5750)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d/Makefile.am	2007-01-10 03:19:31 UTC (rev 5751)
@@ -25,8 +25,7 @@
 AM_FFLAGS = \
 	$(FCFLAGS) \
 	-I$(top_srcdir)/pylith3d/libpylith3d/includes \
-	$(PETSC_INCLUDE) \
-	$(MPIINCLUDES)
+	$(PETSC_INCLUDE)
 sources = \
 	addfor.f \
 	addsn.f \

Modified: short/3D/PyLith/branches/pylith-0.8/pylith3d/module/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/module/Makefile.am	2007-01-10 03:08:39 UTC (rev 5750)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/module/Makefile.am	2007-01-10 03:19:31 UTC (rev 5751)
@@ -25,9 +25,7 @@
 	$(PETSC_LIB) \
 	$(FCLIBS)
 
-CXX = $(MPICXX)
-CXXLD = @CXX@
-INCLUDES = $(PETSC_INCLUDE) -I$(PYTHON_INCDIR) $(MPIINCLUDES)
+INCLUDES = $(PETSC_INCLUDE) -I$(PYTHON_INCDIR)
 AM_CPPFLAGS = $(PYTHON_EGG_CPPFLAGS) $(PETSC_SIEVE_FLAGS)
 sources = \
 	array.cc \

Modified: short/3D/PyLith/branches/pylith-0.8/pylith3d/pypylith3d.cc
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/pypylith3d.cc	2007-01-10 03:08:39 UTC (rev 5750)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/pypylith3d.cc	2007-01-10 03:19:31 UTC (rev 5751)
@@ -32,8 +32,6 @@
 #include <stdio.h>
 #include "pylith3dmodule.h"
 
-#define MPICH_IGNORE_CXX_SEEK
-
 #define COMMAND \
 "import sys; " \
 "path = sys.argv[1]; " \



More information about the cig-commits mailing list