1
1

Include the C++ bindings from mpi.h in a way that doesn't require an extra

-I for ${includedir}/openmpi.  Solves many problems, and with just a tad
bit of hackery.  Don't know why I didn't just do this earlier.

Refs trac:542

This commit was SVN r14853.

The following Trac tickets were found above:
  Ticket 542 --> https://svn.open-mpi.org/trac/ompi/ticket/542
Этот коммит содержится в:
Brian Barrett 2007-06-05 01:42:47 +00:00
родитель 9b6af19371
Коммит beb6dd1924
5 изменённых файлов: 46 добавлений и 20 удалений

2
NEWS
Просмотреть файл

@ -29,6 +29,8 @@ version 1.0.
Trunk (not on release branches yet)
-----------------------------------
- No longer require extra include flag for the C++ bindings.
--> Expected 1.2.3
- Fix problem with optional Fortran types to be correctly initialized.
--> Expected ?1.2.x?
- Release tarballs now use Autoconf 2.61 and Automake 1.10.

Просмотреть файл

@ -226,12 +226,7 @@ AC_DEFUN([OMPI_SETUP_WRAPPER_FINAL],[
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_LIBS])
AC_MSG_CHECKING([for OMPI extra include dirs])
if test "$WANT_INSTALL_HEADERS" = "1" ; then
# Always include openmpi in case C++ bindings get installed
OMPI_WRAPPER_EXTRA_INCLUDES="$ORTE_WRAPPER_EXTRA_INCLUDES"
else
OMPI_WRAPPER_EXTRA_INCLUDES="$ORTE_WRAPPER_EXTRA_INCLUDES openmpi"
fi
OMPI_WRAPPER_EXTRA_INCLUDES="$ORTE_WRAPPER_EXTRA_INCLUDES"
AC_SUBST([OMPI_WRAPPER_EXTRA_INCLUDES])
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_INCLUDES])

Просмотреть файл

@ -18,10 +18,12 @@
# $HEADER$
#
# *_DATA files are not automatically included in the tarball. Need to
# ensure that README.txt is picked up so that people who disable the
# C++ MPI bindings can still build properly.
EXTRA_DIST = README.txt
# Need the first so that we can get the path names correct inside the
# MPI C++ library. The second is necessary so that mpi.h doesn't
# include mpicxx.h through the incorrect pathname in any of the C++
# bindings .c files. Just use the define for this purpose from user
# code.
AM_CPPFLAGS = -DOMPI_BUILDING_CXX_BINDINGS_LIBRARY=1 -DOMPI_SKIP_MPICXX=1
if WANT_MPI_CXX_BINDINGS
@ -72,10 +74,4 @@ headers = \
ompidir = $(includedir)/openmpi/ompi/mpi/cxx
ompi_HEADERS = \
$(headers)
else
# If the C++ bindings were disabled, still ensure that this directory
# is created so that the default -I flags in the wrapper compilers
# point to a directory that exists.
ompidir = $(includedir)/openmpi
ompi_DATA = README.txt
endif

Просмотреть файл

@ -1,4 +0,0 @@
This file is here solely as a placeholder so that Open MPI's
Automake-based installer creates the installation directory
$(installdir)/openmpi (you must have disabled the MPI C++ bindings,
because they would normally create this directory automatically).

Просмотреть файл

@ -166,6 +166,10 @@ namespace MPI {
typedef void User_function(const void* invec, void* inoutvec, int len,
const Datatype& datatype);
/* Prevent needing a -I${prefix}/include/openmpi, as it seems to
really annoy peope that don't use the wrapper compilers and is
no longer worth the fight of getting right... */
#ifdef OMPI_BUILDING_CXX_BINDINGS_LIBRARY
#include "ompi/mpi/cxx/exception.h"
#include "ompi/mpi/cxx/op.h"
#include "ompi/mpi/cxx/status.h"
@ -179,6 +183,21 @@ namespace MPI {
#include "ompi/mpi/cxx/topology.h" //includes Cartcomm and Graphcomm
#include "ompi/mpi/cxx/intercomm.h"
#include "ompi/mpi/cxx/info.h"
#else
#include "openmpi/ompi/mpi/cxx/exception.h"
#include "openmpi/ompi/mpi/cxx/op.h"
#include "openmpi/ompi/mpi/cxx/status.h"
#include "openmpi/ompi/mpi/cxx/request.h" //includes class Prequest
#include "openmpi/ompi/mpi/cxx/group.h"
#include "openmpi/ompi/mpi/cxx/comm.h"
#include "openmpi/ompi/mpi/cxx/win.h"
#include "openmpi/ompi/mpi/cxx/file.h"
#include "openmpi/ompi/mpi/cxx/errhandler.h"
#include "openmpi/ompi/mpi/cxx/intracomm.h"
#include "openmpi/ompi/mpi/cxx/topology.h" //includes Cartcomm and Graphcomm
#include "openmpi/ompi/mpi/cxx/intercomm.h"
#include "openmpi/ompi/mpi/cxx/info.h"
#endif
extern opal_mutex_t *mpi_map_mutex;
}
@ -199,6 +218,8 @@ namespace MPI {
// PMPI functions, and this top layer is in the XXX.cc files.
//
/* see note above... */
#ifdef OMPI_BUILDING_CXX_BINDINGS_LIBRARY
#include "ompi/mpi/cxx/datatype_inln.h"
#include "ompi/mpi/cxx/functions_inln.h"
#include "ompi/mpi/cxx/request_inln.h"
@ -213,6 +234,22 @@ namespace MPI {
#include "ompi/mpi/cxx/info_inln.h"
#include "ompi/mpi/cxx/win_inln.h"
#include "ompi/mpi/cxx/file_inln.h"
#else
#include "openmpi/ompi/mpi/cxx/datatype_inln.h"
#include "openmpi/ompi/mpi/cxx/functions_inln.h"
#include "openmpi/ompi/mpi/cxx/request_inln.h"
#include "openmpi/ompi/mpi/cxx/comm_inln.h"
#include "openmpi/ompi/mpi/cxx/intracomm_inln.h"
#include "openmpi/ompi/mpi/cxx/topology_inln.h"
#include "openmpi/ompi/mpi/cxx/intercomm_inln.h"
#include "openmpi/ompi/mpi/cxx/group_inln.h"
#include "openmpi/ompi/mpi/cxx/op_inln.h"
#include "openmpi/ompi/mpi/cxx/errhandler_inln.h"
#include "openmpi/ompi/mpi/cxx/status_inln.h"
#include "openmpi/ompi/mpi/cxx/info_inln.h"
#include "openmpi/ompi/mpi/cxx/win_inln.h"
#include "openmpi/ompi/mpi/cxx/file_inln.h"
#endif
#endif // #if defined(__cplusplus) || defined(c_plusplus)
#endif // #ifndef MPIPP_H_