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
Этот коммит содержится в:
родитель
9b6af19371
Коммит
beb6dd1924
2
NEWS
2
NEWS
@ -29,6 +29,8 @@ version 1.0.
|
|||||||
Trunk (not on release branches yet)
|
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.
|
- Fix problem with optional Fortran types to be correctly initialized.
|
||||||
--> Expected ?1.2.x?
|
--> Expected ?1.2.x?
|
||||||
- Release tarballs now use Autoconf 2.61 and Automake 1.10.
|
- 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_RESULT([$OMPI_WRAPPER_EXTRA_LIBS])
|
||||||
|
|
||||||
AC_MSG_CHECKING([for OMPI extra include dirs])
|
AC_MSG_CHECKING([for OMPI extra include dirs])
|
||||||
if test "$WANT_INSTALL_HEADERS" = "1" ; then
|
OMPI_WRAPPER_EXTRA_INCLUDES="$ORTE_WRAPPER_EXTRA_INCLUDES"
|
||||||
# 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
|
|
||||||
AC_SUBST([OMPI_WRAPPER_EXTRA_INCLUDES])
|
AC_SUBST([OMPI_WRAPPER_EXTRA_INCLUDES])
|
||||||
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_INCLUDES])
|
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_INCLUDES])
|
||||||
|
|
||||||
|
@ -18,10 +18,12 @@
|
|||||||
# $HEADER$
|
# $HEADER$
|
||||||
#
|
#
|
||||||
|
|
||||||
# *_DATA files are not automatically included in the tarball. Need to
|
# Need the first so that we can get the path names correct inside the
|
||||||
# ensure that README.txt is picked up so that people who disable the
|
# MPI C++ library. The second is necessary so that mpi.h doesn't
|
||||||
# C++ MPI bindings can still build properly.
|
# include mpicxx.h through the incorrect pathname in any of the C++
|
||||||
EXTRA_DIST = README.txt
|
# 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
|
if WANT_MPI_CXX_BINDINGS
|
||||||
|
|
||||||
@ -72,10 +74,4 @@ headers = \
|
|||||||
ompidir = $(includedir)/openmpi/ompi/mpi/cxx
|
ompidir = $(includedir)/openmpi/ompi/mpi/cxx
|
||||||
ompi_HEADERS = \
|
ompi_HEADERS = \
|
||||||
$(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
|
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,
|
typedef void User_function(const void* invec, void* inoutvec, int len,
|
||||||
const Datatype& datatype);
|
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/exception.h"
|
||||||
#include "ompi/mpi/cxx/op.h"
|
#include "ompi/mpi/cxx/op.h"
|
||||||
#include "ompi/mpi/cxx/status.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/topology.h" //includes Cartcomm and Graphcomm
|
||||||
#include "ompi/mpi/cxx/intercomm.h"
|
#include "ompi/mpi/cxx/intercomm.h"
|
||||||
#include "ompi/mpi/cxx/info.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;
|
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.
|
// 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/datatype_inln.h"
|
||||||
#include "ompi/mpi/cxx/functions_inln.h"
|
#include "ompi/mpi/cxx/functions_inln.h"
|
||||||
#include "ompi/mpi/cxx/request_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/info_inln.h"
|
||||||
#include "ompi/mpi/cxx/win_inln.h"
|
#include "ompi/mpi/cxx/win_inln.h"
|
||||||
#include "ompi/mpi/cxx/file_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 // #if defined(__cplusplus) || defined(c_plusplus)
|
||||||
#endif // #ifndef MPIPP_H_
|
#endif // #ifndef MPIPP_H_
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user