[cig-commits] r6851 - in mc/3D/CitcomS/trunk: . CitcomS bin module
module/Exchanger
leif at geodynamics.org
leif at geodynamics.org
Thu May 10 19:02:01 PDT 2007
Author: leif
Date: 2007-05-10 19:02:00 -0700 (Thu, 10 May 2007)
New Revision: 6851
Added:
mc/3D/CitcomS/trunk/bin/coupledcitcoms.in
mc/3D/CitcomS/trunk/bin/dummy.cc
Modified:
mc/3D/CitcomS/trunk/CitcomS/CoupledApp.py
mc/3D/CitcomS/trunk/bin/Makefile.am
mc/3D/CitcomS/trunk/bin/pycitcoms.c
mc/3D/CitcomS/trunk/configure.ac
mc/3D/CitcomS/trunk/module/Exchanger/AreaWeightedNormal.cc
mc/3D/CitcomS/trunk/module/Exchanger/Boundary.cc
mc/3D/CitcomS/trunk/module/Exchanger/BoundaryVTInlet.cc
mc/3D/CitcomS/trunk/module/Exchanger/CitcomInterpolator.cc
mc/3D/CitcomS/trunk/module/Exchanger/CitcomSource.cc
mc/3D/CitcomS/trunk/module/Exchanger/Convertor.cc
mc/3D/CitcomS/trunk/module/Exchanger/Exchangermodule.cc
mc/3D/CitcomS/trunk/module/Exchanger/Exchangermodule.h
mc/3D/CitcomS/trunk/module/Exchanger/Interior.cc
mc/3D/CitcomS/trunk/module/Exchanger/Makefile.am
mc/3D/CitcomS/trunk/module/Exchanger/SIUnit.cc
mc/3D/CitcomS/trunk/module/Exchanger/SInlet.cc
mc/3D/CitcomS/trunk/module/Exchanger/SVTInlet.cc
mc/3D/CitcomS/trunk/module/Exchanger/SVTOutlet.cc
mc/3D/CitcomS/trunk/module/Exchanger/TInlet.cc
mc/3D/CitcomS/trunk/module/Exchanger/TOutlet.cc
mc/3D/CitcomS/trunk/module/Exchanger/VOutlet.cc
mc/3D/CitcomS/trunk/module/Exchanger/VTInlet.cc
mc/3D/CitcomS/trunk/module/Exchanger/VTOutlet.cc
mc/3D/CitcomS/trunk/module/Exchanger/bindings.cc
mc/3D/CitcomS/trunk/module/Exchanger/exceptions.cc
mc/3D/CitcomS/trunk/module/Exchanger/exchangers.cc
mc/3D/CitcomS/trunk/module/Exchanger/global_bbox.cc
mc/3D/CitcomS/trunk/module/Exchanger/initTemperature.cc
mc/3D/CitcomS/trunk/module/Exchanger/inlets_outlets.cc
mc/3D/CitcomS/trunk/module/Exchanger/misc.cc
mc/3D/CitcomS/trunk/module/Makefile.am
mc/3D/CitcomS/trunk/setup.py
Log:
Build with Exchanger, if available. The Exchanger package will be
automatically detected if it is installed on your PYTHONPATH. The
preprocessor & link flags for compiling/linking with Exchanger are
handled automatically.
To my chagrin, this change increases the CitcomS language count back
up to 3 again (C, C++, Python). Even with the aid of the 'cproto'
tool, it would take many hours of work to make the C code in 'lib'
compile using a C++ compiler.
Modified: mc/3D/CitcomS/trunk/CitcomS/CoupledApp.py
===================================================================
--- mc/3D/CitcomS/trunk/CitcomS/CoupledApp.py 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/CitcomS/CoupledApp.py 2007-05-11 02:02:00 UTC (rev 6851)
@@ -33,7 +33,7 @@
class CoupledApp(BaseApplication):
- def __init__(self, name="CitcomS"):
+ def __init__(self, name="CoupledCitcomS"):
BaseApplication.__init__(self, name)
self.solver = None
Modified: mc/3D/CitcomS/trunk/bin/Makefile.am
===================================================================
--- mc/3D/CitcomS/trunk/bin/Makefile.am 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/bin/Makefile.am 2007-05-11 02:02:00 UTC (rev 6851)
@@ -34,13 +34,26 @@
bin_PROGRAMS = CitcomSFull CitcomSRegional
if COND_PYRE
+ bin_SCRIPTS = citcoms
if COND_EMBEDDING
bin_PROGRAMS += pycitcoms mpipycitcoms
endif
+if COND_EXCHANGER
+ LINK = $(CXXLINK)
+ bin_SCRIPTS += coupledcitcoms
+ MAYBE_WITH_EXCHANGER = -DWITH_EXCHANGER
+if COND_EMBEDDING
+ MAYBE_EXCHANGER_MODULE = $(top_builddir)/module/Exchanger/libExchangerLibmodule.a
+else
+ MAYBE_EXCHANGER_MODULE = $(top_builddir)/module/Exchanger/ExchangerLibmodule.la
+endif
+else
+ MAYBE_WITH_EXCHANGER =
+ MAYBE_EXCHANGER_MODULE =
+endif
+else
- bin_SCRIPTS = citcoms
-else
bin_SCRIPTS =
endif
@@ -77,6 +90,7 @@
if COND_PYRE
INCLUDES += \
-I$(top_srcdir)/module \
+ -I$(top_srcdir)/module/Exchanger \
$(PYTHON_EGG_CPPFLAGS) \
-I$(PYTHON_INCDIR)
endif
@@ -88,6 +102,9 @@
citcoms: $(srcdir)/citcoms.in Makefile
$(do_build) < $(srcdir)/citcoms.in > $@ || (rm -f $@ && exit 1)
chmod +x $@
+coupledcitcoms: $(srcdir)/coupledcitcoms.in Makefile
+ $(do_build) < $(srcdir)/coupledcitcoms.in > $@ || (rm -f $@ && exit 1)
+ chmod +x $@
install-binSCRIPTS: $(bin_SCRIPTS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
@@ -101,14 +118,16 @@
chmod +x "$(DESTDIR)$(bindir)/$$f"; \
else :; fi; \
done
-EXTRA_DIST = citcoms.in
+EXTRA_DIST = citcoms.in coupledcitcoms.in
CLEANFILES = $(bin_SCRIPTS)
# pycitcoms (libCitcomS + CitcomSLibmodule + embedded Python interpreter)
-pycitcoms_SOURCES = pycitcoms.c
+pycitcoms_SOURCES = pycitcoms.c dummy.cc
+pycitcoms_CFLAGS = $(MAYBE_WITH_EXCHANGER)
pycitcoms_LDADD = \
$(top_builddir)/module/libCitcomSLibmodule.a \
+ $(MAYBE_EXCHANGER_MODULE) \
$(libCitcomS)
pycitcoms$(EXEEXT): $(pycitcoms_OBJECTS) $(pycitcoms_DEPENDENCIES)
@rm -f pycitcoms$(EXEEXT)
@@ -122,10 +141,11 @@
# pycitcoms (libCitcomS + CitcomSLibmodule + embedded Python interpreter)
-mpipycitcoms_SOURCES = pycitcoms.c
-mpipycitcoms_CFLAGS = -DUSE_MPI
+mpipycitcoms_SOURCES = pycitcoms.c dummy.cc
+mpipycitcoms_CFLAGS = -DUSE_MPI $(MAYBE_WITH_EXCHANGER)
mpipycitcoms_LDADD = \
$(top_builddir)/module/libCitcomSLibmodule.a \
+ $(MAYBE_EXCHANGER_MODULE) \
$(libCitcomS)
mpipycitcoms$(EXEEXT): $(mpipycitcoms_OBJECTS) $(mpipycitcoms_DEPENDENCIES)
@rm -f mpipycitcoms$(EXEEXT)
Copied: mc/3D/CitcomS/trunk/bin/coupledcitcoms.in (from rev 6846, mc/3D/CitcomS/trunk/bin/citcoms.in)
===================================================================
--- mc/3D/CitcomS/trunk/bin/citcoms.in 2007-05-10 23:30:11 UTC (rev 6846)
+++ mc/3D/CitcomS/trunk/bin/coupledcitcoms.in 2007-05-11 02:02:00 UTC (rev 6851)
@@ -0,0 +1,46 @@
+#!@INTERPRETER@
+# -*- Python -*-
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#<LicenseText>
+#
+# CitcomS.py by Eh Tan, Eun-seo Choi, and Pururav Thoutireddy.
+# Copyright (C) 2002-2005, California Institute of Technology.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+#</LicenseText>
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+
+__requires__ = "CitcomS"
+
+# re-create the PYTHONPATH at 'configure' time
+import os.path, sys, site
+path = '@PYTHONPATH@'.split(':')
+path.reverse()
+for directory in path:
+ if directory:
+ directory = os.path.abspath(directory)
+ sys.path.insert(1, directory)
+ site.addsitedir(directory)
+
+from CitcomS.CoupledApp import CoupledApp
+from pyre.applications import start
+start(applicationClass=CoupledApp)
+
+# end of file
Added: mc/3D/CitcomS/trunk/bin/dummy.cc
===================================================================
Modified: mc/3D/CitcomS/trunk/bin/pycitcoms.c
===================================================================
--- mc/3D/CitcomS/trunk/bin/pycitcoms.c 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/bin/pycitcoms.c 2007-05-11 02:02:00 UTC (rev 6851)
@@ -32,6 +32,9 @@
#include <string.h>
#include <mpi.h>
#include "CitcomSmodule.h"
+#ifdef WITH_EXCHANGER
+#include "Exchangermodule.h"
+#endif
#define COMMAND \
"import sys; " \
@@ -51,6 +54,9 @@
struct _inittab inittab[] = {
{ "_mpi", init_mpi },
{ "CitcomSLib", initCitcomSLib },
+#ifdef WITH_EXCHANGER
+ { "ExchangerLib", initExchangerLib },
+#endif
{ 0, 0 }
};
Modified: mc/3D/CitcomS/trunk/configure.ac
===================================================================
--- mc/3D/CitcomS/trunk/configure.ac 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/configure.ac 2007-05-11 02:02:00 UTC (rev 6851)
@@ -48,6 +48,11 @@
[want_embedding=yes])
AM_CONDITIONAL([COND_EMBEDDING], [test "$want_embedding" = yes])
CIT_ARG_HDF5([auto])
+AC_ARG_WITH([exchanger],
+ [AC_HELP_STRING([--with-exchanger],
+ [use Exchanger @<:@default=auto@:>@])],
+ [want_exchanger="$withval"],
+ [want_exchanger=auto])
if test "$want_pyre" = yes; then
# Check for Python.
@@ -56,13 +61,22 @@
# Check for Python modules and packages.
CIT_PYTHON_EGG_SETUP
+else
+ if test "$want_exchanger" = yes; then
+ AC_MSG_ERROR([Exchanger requires Pyre])
+ fi
+ want_exchanger=no
fi
# Checks for programs.
AC_PROG_CC([mpicc hcc mpcc mpcc_r mpxlc cmpicc gcc cc cl icc ecc pgcc xlc xlc_r])
+AC_PROG_CXX([mpicxx mpic++ mpiCC hcp mpCC mpxlC mpxlC_r cmpic++ g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlc++_r xlC_r xlC icpc ecpc pgCC])
if test "$want_pyre" = yes; then
CIT_PROG_PYCONFIG
AC_SUBST([pkgsysconfdir], [\${sysconfdir}/$PACKAGE])
+ # Compile C as C++.
+ dnl CC="$CXX"
+ dnl CFLAGS="$CXXFLAGS"
fi
# We don't need Fortran.
AC_PROVIDE([AC_PROG_F77])
@@ -71,19 +85,63 @@
# Checks for libraries.
AC_SEARCH_LIBS([MPI_Init], [mpi mpich], [], [AC_MSG_ERROR([MPI library not found])])
AC_SEARCH_LIBS([sqrt], [m])
+
CIT_CHECK_LIB_HDF5
CIT_CHECK_LIB_HDF5_PARALLEL
+if test "$want_exchanger" != no; then
+ save_CC="$CC"
+ save_CFLAGS="$CFLAGS"
+ save_LIBS="$LIBS"
+ CC="$CXX"
+ CFLAGS="$CXXFLAGS"
+ LIBS="$PYTHON_EGG_LDFLAGS $PYTHON_BLDLIBRARY $PYTHON_LIBS $PYTHON_MODLIBS $PYTHON_SYSLIBS $LIBS"
+ AC_CHECK_FUNC([PyExchanger_exchangeBoundedBox], [], [
+ if test "$want_exchanger" = auto; then
+ want_exchanger=no
+ AC_MSG_WARN([Exchanger library not found; disabling Exchanger support])
+ else
+ AC_MSG_ERROR([Exchanger library not found])
+ fi
+ ])
+ CC="$save_CC"
+ CFLAGS="$save_CFLAGS"
+ LIBS="$save_LIBS"
+fi
+
# Checks for header files.
AC_CHECK_HEADER([mpi.h], [], [AC_MSG_ERROR([header 'mpi.h' not found])])
AC_CHECK_HEADERS([malloc.h])
CIT_CHECK_HEADER_HDF5
+AC_LANG_PUSH(C++)
+if test "$want_exchanger" != no; then
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$PYTHON_EGG_CPPFLAGS $CPPFLAGS"
+ AC_CHECK_HEADERS([Exchanger/DIM.h], [], [
+ if test "$want_exchanger" = auto; then
+ want_exchanger=no
+ AC_MSG_WARN([header 'Exchanger/DIM.h' not found; disabling Exchanger support])
+ else
+ AC_MSG_ERROR([header 'Exchanger/DIM.h' not found])
+ fi
+ ])
+ CPPFLAGS="$save_CPPFLAGS"
+fi
+AC_LANG_POP()
+
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
-AM_CONDITIONAL([COND_HDF5], [test "$want_hdf5" != no])
+if test "$want_hdf5" != no; then
+ want_hdf5=yes
+fi
+if test "$want_exchanger" != no; then
+ want_exchanger=yes
+fi
+AM_CONDITIONAL([COND_HDF5], [test "$want_hdf5" = yes])
+AM_CONDITIONAL([COND_EXCHANGER], [test "$want_exchanger" = yes])
AC_CONFIG_FILES([Makefile
bin/Makefile
@@ -92,6 +150,7 @@
examples/Makefile
lib/Makefile
module/Makefile
+ module/Exchanger/Makefile
tests/Makefile
visual/Makefile
visual/OpenDXMacro/Makefile])
@@ -108,6 +167,7 @@
echo -e "\t CPPFLAGS: " $CPPFLAGS
echo -e "\t LDFLAGS: " $LDFLAGS
echo -e "\t with-pyre: " $want_pyre
+echo -e "\t with-exchanger: " $want_exchanger
echo -e "\t with-hdf5: " $want_hdf5
echo
Modified: mc/3D/CitcomS/trunk/module/Exchanger/AreaWeightedNormal.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/AreaWeightedNormal.cc 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/module/Exchanger/AreaWeightedNormal.cc 2007-05-11 02:02:00 UTC (rev 6851)
@@ -26,7 +26,7 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-#include <portinfo>
+#include "config.h"
#include <cmath>
#include <iostream>
#include "global_defs.h"
Modified: mc/3D/CitcomS/trunk/module/Exchanger/Boundary.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/Boundary.cc 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/module/Exchanger/Boundary.cc 2007-05-11 02:02:00 UTC (rev 6851)
@@ -26,7 +26,7 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-#include <portinfo>
+#include "config.h"
#include <vector>
#include "global_defs.h"
#include "journal/diagnostics.h"
Modified: mc/3D/CitcomS/trunk/module/Exchanger/BoundaryVTInlet.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/BoundaryVTInlet.cc 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/module/Exchanger/BoundaryVTInlet.cc 2007-05-11 02:02:00 UTC (rev 6851)
@@ -26,7 +26,7 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-#include <portinfo>
+#include "config.h"
#include "journal/journal.h"
#include "AreaWeightedNormal.h"
#include "Boundary.h"
Modified: mc/3D/CitcomS/trunk/module/Exchanger/CitcomInterpolator.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/CitcomInterpolator.cc 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/module/Exchanger/CitcomInterpolator.cc 2007-05-11 02:02:00 UTC (rev 6851)
@@ -26,7 +26,7 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-#include <portinfo>
+#include "config.h"
#include <algorithm>
#include <stdexcept>
#include <cmath>
Modified: mc/3D/CitcomS/trunk/module/Exchanger/CitcomSource.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/CitcomSource.cc 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/module/Exchanger/CitcomSource.cc 2007-05-11 02:02:00 UTC (rev 6851)
@@ -26,7 +26,7 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-#include <portinfo>
+#include "config.h"
#include "global_defs.h"
#include "journal/diagnostics.h"
#include "Exchanger/BoundedMesh.h"
Modified: mc/3D/CitcomS/trunk/module/Exchanger/Convertor.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/Convertor.cc 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/module/Exchanger/Convertor.cc 2007-05-11 02:02:00 UTC (rev 6851)
@@ -26,7 +26,7 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-#include <portinfo>
+#include "config.h"
#include "Exchanger/Spherical2Cartesian.h"
#include "SIUnit.h"
#include "Convertor.h"
Modified: mc/3D/CitcomS/trunk/module/Exchanger/Exchangermodule.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/Exchangermodule.cc 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/module/Exchanger/Exchangermodule.cc 2007-05-11 02:02:00 UTC (rev 6851)
@@ -26,7 +26,7 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-#include <portinfo>
+#include "config.h"
#include <Python.h>
Modified: mc/3D/CitcomS/trunk/module/Exchanger/Exchangermodule.h
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/Exchangermodule.h 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/module/Exchanger/Exchangermodule.h 2007-05-11 02:02:00 UTC (rev 6851)
@@ -29,7 +29,9 @@
#ifndef pyCitcom_Exchangermodule_h
#define pyCitcom_Exchangermodule_h
+#ifdef __cplusplus
extern "C"
+#endif
void
initExchangerLib();
Modified: mc/3D/CitcomS/trunk/module/Exchanger/Interior.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/Interior.cc 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/module/Exchanger/Interior.cc 2007-05-11 02:02:00 UTC (rev 6851)
@@ -26,7 +26,7 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-#include <portinfo>
+#include "config.h"
#include <algorithm>
#include <limits>
#include <vector>
Modified: mc/3D/CitcomS/trunk/module/Exchanger/Makefile.am
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/Makefile.am 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/module/Exchanger/Makefile.am 2007-05-11 02:02:00 UTC (rev 6851)
@@ -45,8 +45,6 @@
$(PYTHON_EGG_LDFLAGS)
ExchangerLibmodule_la_SOURCES = $(sources)
-CXX = $(MPICXX)
-CXXLD = @CXX@
INCLUDES = \
-I$(top_srcdir)/lib \
$(PYTHON_EGG_CPPFLAGS) \
Modified: mc/3D/CitcomS/trunk/module/Exchanger/SIUnit.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/SIUnit.cc 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/module/Exchanger/SIUnit.cc 2007-05-11 02:02:00 UTC (rev 6851)
@@ -26,7 +26,7 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-#include <portinfo>
+#include "config.h"
#include "global_defs.h"
#include "SIUnit.h"
Modified: mc/3D/CitcomS/trunk/module/Exchanger/SInlet.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/SInlet.cc 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/module/Exchanger/SInlet.cc 2007-05-11 02:02:00 UTC (rev 6851)
@@ -26,7 +26,7 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-#include <portinfo>
+#include "config.h"
#include "journal/diagnostics.h"
#include "global_defs.h"
#include "Boundary.h"
Modified: mc/3D/CitcomS/trunk/module/Exchanger/SVTInlet.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/SVTInlet.cc 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/module/Exchanger/SVTInlet.cc 2007-05-11 02:02:00 UTC (rev 6851)
@@ -26,7 +26,7 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-#include <portinfo>
+#include "config.h"
#include "journal/diagnostics.h"
#include "global_defs.h"
#include "Boundary.h"
Modified: mc/3D/CitcomS/trunk/module/Exchanger/SVTOutlet.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/SVTOutlet.cc 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/module/Exchanger/SVTOutlet.cc 2007-05-11 02:02:00 UTC (rev 6851)
@@ -26,7 +26,7 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-#include <portinfo>
+#include "config.h"
#include "journal/diagnostics.h"
#include "Convertor.h"
#include "CitcomSource.h"
Modified: mc/3D/CitcomS/trunk/module/Exchanger/TInlet.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/TInlet.cc 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/module/Exchanger/TInlet.cc 2007-05-11 02:02:00 UTC (rev 6851)
@@ -30,7 +30,7 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-#include <portinfo>
+#include "config.h"
#include "journal/diagnostics.h"
#include "global_defs.h"
#include "Convertor.h"
Modified: mc/3D/CitcomS/trunk/module/Exchanger/TOutlet.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/TOutlet.cc 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/module/Exchanger/TOutlet.cc 2007-05-11 02:02:00 UTC (rev 6851)
@@ -26,7 +26,7 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-#include <portinfo>
+#include "config.h"
#include "global_defs.h"
#include "journal/diagnostics.h"
#include "CitcomSource.h"
Modified: mc/3D/CitcomS/trunk/module/Exchanger/VOutlet.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/VOutlet.cc 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/module/Exchanger/VOutlet.cc 2007-05-11 02:02:00 UTC (rev 6851)
@@ -26,7 +26,7 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-#include <portinfo>
+#include "config.h"
#include "global_defs.h"
#include "journal/diagnostics.h"
#include "CitcomSource.h"
Modified: mc/3D/CitcomS/trunk/module/Exchanger/VTInlet.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/VTInlet.cc 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/module/Exchanger/VTInlet.cc 2007-05-11 02:02:00 UTC (rev 6851)
@@ -26,7 +26,7 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-#include <portinfo>
+#include "config.h"
#include "journal/diagnostics.h"
#include "global_defs.h"
#include "Convertor.h"
Modified: mc/3D/CitcomS/trunk/module/Exchanger/VTOutlet.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/VTOutlet.cc 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/module/Exchanger/VTOutlet.cc 2007-05-11 02:02:00 UTC (rev 6851)
@@ -26,7 +26,7 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-#include <portinfo>
+#include "config.h"
#include "global_defs.h"
#include "journal/diagnostics.h"
#include "CitcomSource.h"
Modified: mc/3D/CitcomS/trunk/module/Exchanger/bindings.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/bindings.cc 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/module/Exchanger/bindings.cc 2007-05-11 02:02:00 UTC (rev 6851)
@@ -26,7 +26,7 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-#include <portinfo>
+#include "config.h"
#include <Python.h>
#include "Exchanger/exchangers.h"
Modified: mc/3D/CitcomS/trunk/module/Exchanger/exceptions.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/exceptions.cc 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/module/Exchanger/exceptions.cc 2007-05-11 02:02:00 UTC (rev 6851)
@@ -26,7 +26,7 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-#include <portinfo>
+#include "config.h"
#include <Python.h>
PyObject *pyExchanger_runtimeError = 0;
Modified: mc/3D/CitcomS/trunk/module/Exchanger/exchangers.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/exchangers.cc 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/module/Exchanger/exchangers.cc 2007-05-11 02:02:00 UTC (rev 6851)
@@ -26,10 +26,10 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-#include <portinfo>
+#include "config.h"
#include <Python.h>
#include "mpi.h"
-#include "mpi/Communicator.h"
+#include "mpi/pympi.h"
#include "global_bbox.h"
#include "global_defs.h"
#include "initTemperature.h"
@@ -223,9 +223,9 @@
&obj2, &obj3, &obj4))
return NULL;
- mpi::Communicator* temp = static_cast<mpi::Communicator*>
- (PyCObject_AsVoidPtr(obj1));
- MPI_Comm comm = temp->handle();
+ PyMPICommObject* temp = static_cast<PyMPICommObject*>
+ (PyCObject_AsVoidPtr(obj1));
+ MPI_Comm comm = temp->comm;
BoundedMesh* b = static_cast<BoundedMesh*>(PyCObject_AsVoidPtr(obj2));
BoundedBox* bbox = static_cast<BoundedBox*>(PyCObject_AsVoidPtr(obj3));
Modified: mc/3D/CitcomS/trunk/module/Exchanger/global_bbox.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/global_bbox.cc 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/module/Exchanger/global_bbox.cc 2007-05-11 02:02:00 UTC (rev 6851)
@@ -24,7 +24,7 @@
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
-#include <portinfo>
+#include "config.h"
#include <cmath>
#include "global_defs.h"
#include "global_bbox.h"
Modified: mc/3D/CitcomS/trunk/module/Exchanger/initTemperature.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/initTemperature.cc 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/module/Exchanger/initTemperature.cc 2007-05-11 02:02:00 UTC (rev 6851)
@@ -26,7 +26,7 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-#include <portinfo>
+#include "config.h"
#include <algorithm>
#include <cmath>
#include <string>
Modified: mc/3D/CitcomS/trunk/module/Exchanger/inlets_outlets.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/inlets_outlets.cc 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/module/Exchanger/inlets_outlets.cc 2007-05-11 02:02:00 UTC (rev 6851)
@@ -26,10 +26,9 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-#include <portinfo>
+#include "config.h"
#include <Python.h>
#include "mpi.h"
-#include "mpi/Communicator.h"
#include "inlets_outlets.h"
///////////////////////////////////////////////////////////////////////////////
Modified: mc/3D/CitcomS/trunk/module/Exchanger/misc.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/misc.cc 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/module/Exchanger/misc.cc 2007-05-11 02:02:00 UTC (rev 6851)
@@ -26,12 +26,12 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-#include <portinfo>
+#include "config.h"
#include <Python.h>
//#include <iostream>
//#include <fstream>
#include "mpi.h"
-#include "mpi/Communicator.h"
+#include "mpi/pympi.h"
#include "misc.h"
extern "C" {
@@ -70,8 +70,8 @@
if (!PyArg_ParseTuple(args, "O:FinereturnE", &Obj))
return NULL;
- mpi::Communicator * comm = (mpi::Communicator *) PyCObject_AsVoidPtr(Obj);
- MPI_Comm world = comm->handle();
+ PyMPICommObject* comm = (PyMPICommObject *) PyCObject_AsVoidPtr(Obj);
+ MPI_Comm world = comm->comm;
All_variables *E = citcom_init(&world);
@@ -103,8 +103,8 @@
if (!PyArg_ParseTuple(args, "O:CoarsereturnE", &Obj))
return NULL;
- mpi::Communicator * comm = (mpi::Communicator *) PyCObject_AsVoidPtr(Obj);
- MPI_Comm world = comm->handle();
+ PyMPICommObject* comm = (PyMPICommObject *) PyCObject_AsVoidPtr(Obj);
+ MPI_Comm world = comm->comm;
All_variables *E = citcom_init(&world);
Modified: mc/3D/CitcomS/trunk/module/Makefile.am
===================================================================
--- mc/3D/CitcomS/trunk/module/Makefile.am 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/module/Makefile.am 2007-05-11 02:02:00 UTC (rev 6851)
@@ -23,6 +23,12 @@
# $Id$
+if COND_EXCHANGER
+ MAYBE_EXCHANGER = Exchanger
+endif
+
+SUBDIRS = $(MAYBE_EXCHANGER)
+
noinst_LIBRARIES =
pyexec_LTLIBRARIES =
Modified: mc/3D/CitcomS/trunk/setup.py
===================================================================
--- mc/3D/CitcomS/trunk/setup.py 2007-05-11 01:47:59 UTC (rev 6850)
+++ mc/3D/CitcomS/trunk/setup.py 2007-05-11 02:02:00 UTC (rev 6851)
@@ -2,8 +2,19 @@
from archimedes import use_merlin
use_merlin()
-from merlin import setup, find_packages
+from merlin import setup, find_packages, require
+install_requires = ['pythia[mpi] >= 0.8.1.0, < 0.8.2a']
+
+# Use Exchanger if it's available.
+exchanger = "Exchanger >= 1, < 2a"
+try:
+ require(exchanger)
+except Exception, e:
+ pass
+else:
+ install_requires.append(exchanger)
+
setup(
name = 'CitcomS',
@@ -12,9 +23,7 @@
zip_safe = False,
packages = find_packages(),
- install_requires = [
- 'pythia[mpi] >= 0.8.1.0, < 0.8.2a',
- ],
+ install_requires = install_requires,
author = 'Louis Moresi, et al.',
author_email = 'cig-mc at geodynamics.org',
More information about the cig-commits
mailing list