1
1

Make several global symbol names be "safe" by putting proper ompi_

prefixes on them

This commit was SVN r2813.
Этот коммит содержится в:
Jeff Squyres 2004-09-23 08:41:20 +00:00
родитель b7c8e307af
Коммит 5d0a2034c3
6 изменённых файлов: 23 добавлений и 21 удалений

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

@ -74,7 +74,8 @@ MPI::Comm::Create_keyval(MPI::Comm::_MPI2CPP_COPYATTRFN_* comm_copy_attr_fn,
void* extra_state)
{
int keyval;
(void)MPI_Keyval_create(copy_attr_intercept, delete_attr_intercept,
(void)MPI_Keyval_create(ompi_mpi_cxx_copy_attr_intercept,
ompi_mpi_cxx_delete_attr_intercept,
&keyval, extra_state);
key_pair_t* copy_and_delete =
new key_pair_t(comm_copy_attr_fn, comm_delete_attr_fn);

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

@ -362,7 +362,7 @@ MPI::Comm::Create_errhandler(MPI::Comm::_MPI2CPP_ERRHANDLERFN_* function)
{
MPI_Errhandler errhandler;
// $%%@#%# AIX/POE 2.3.0.0 makes us put in this cast here
(void)MPI_Errhandler_create((MPI_Handler_function*) errhandler_intercept,
(void)MPI_Errhandler_create((MPI_Handler_function*) ompi_mpi_cxx_errhandler_intercept,
&errhandler);
MPI::Errhandler temp(errhandler);
temp.handler_fn = (void(*)(MPI::Comm&, int*, ...))function;

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

@ -109,7 +109,7 @@ public:
inline void init() const {
#if ! 0 /* OMPI_ENABLE_MPI_PROFILING */
// $%%@#%# AIX/POE 2.3.0.0 makes us put in this cast here
(void)MPI_Errhandler_create((MPI_Handler_function*) &throw_excptn_fctn,
(void)MPI_Errhandler_create((MPI_Handler_function*) &ompi_mpi_cxx_throw_excptn_fctn,
(MPI_Errhandler *) &mpi_errhandler);
#else
pmpi_errhandler.init();

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

@ -8,7 +8,7 @@
#include <stdio.h>
extern "C"
void throw_excptn_fctn(MPI_Comm *, int *errcode, ...)
void ompi_mpi_cxx_throw_excptn_fctn(MPI_Comm *, int *errcode, ...)
{
#if OMPI_HAVE_CXX_EXCEPTION_SUPPORT
throw(MPI::Exception(*errcode));
@ -31,8 +31,7 @@ ompi_mutex_t *MPI::Comm::mpi_err_map_mutex = NULL;
ompi_mutex_t *MPI::Comm::key_fn_map_mutex = NULL;
extern "C"
void
errhandler_intercept(MPI_Comm *mpi_comm, int *err, ...)
void ompi_mpi_cxx_errhandler_intercept(MPI_Comm *mpi_comm, int *err, ...)
{
MPI::Comm* comm = MPI::Comm::mpi_err_map[*mpi_comm];
if (comm && comm->my_errhandler) {
@ -46,7 +45,8 @@ errhandler_intercept(MPI_Comm *mpi_comm, int *err, ...)
MPI::Op* MPI::Intracomm::current_op;
extern "C" void
op_intercept(void *invec, void *outvec, int *len, MPI_Datatype *datatype)
ompi_mpi_cxx_op_intercept(void *invec, void *outvec, int *len,
MPI_Datatype *datatype)
{
MPI::Op* op = MPI::Intracomm::current_op;
MPI::Datatype thedata = *datatype;
@ -62,9 +62,9 @@ op_intercept(void *invec, void *outvec, int *len, MPI_Datatype *datatype)
}
extern "C" int
copy_attr_intercept(MPI_Comm oldcomm, int keyval,
void *extra_state, void *attribute_val_in,
void *attribute_val_out, int *flag)
ompi_mpi_cxx_copy_attr_intercept(MPI_Comm oldcomm, int keyval,
void *extra_state, void *attribute_val_in,
void *attribute_val_out, int *flag)
{
int ret = 0;
MPI::Comm::key_pair_t* copy_and_delete =
@ -116,8 +116,8 @@ copy_attr_intercept(MPI_Comm oldcomm, int keyval,
}
extern "C" int
delete_attr_intercept(MPI_Comm comm, int keyval,
void *attribute_val, void *extra_state)
ompi_mpi_cxx_delete_attr_intercept(MPI_Comm comm, int keyval,
void *attribute_val, void *extra_state)
{
int ret = 0;

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

@ -27,28 +27,29 @@ struct ompi_mutex_t;
//JGS: this is used for implementing user functions for MPI::Op
extern "C" void
op_intercept(void *invec, void *outvec, int *len, MPI_Datatype *datatype);
ompi_mpi_cxx_op_intercept(void *invec, void *outvec, int *len,
MPI_Datatype *datatype);
//JGS: this is used as the MPI_Handler_function for
// the mpi_errhandler in ERRORS_THROW_EXCEPTIONS
extern "C" void
throw_excptn_fctn(MPI_Comm* comm, int* errcode, ...);
ompi_mpi_cxx_throw_excptn_fctn(MPI_Comm* comm, int* errcode, ...);
extern "C" void
errhandler_intercept(MPI_Comm * mpi_comm, int * err, ...);
ompi_mpi_cxx_errhandler_intercept(MPI_Comm * mpi_comm, int * err, ...);
//used for attr intercept functions
enum CommType { eIntracomm, eIntercomm, eCartcomm, eGraphcomm};
extern "C" int
copy_attr_intercept(MPI_Comm oldcomm, int keyval,
void *extra_state, void *attribute_val_in,
void *attribute_val_out, int *flag);
ompi_mpi_cxx_copy_attr_intercept(MPI_Comm oldcomm, int keyval,
void *extra_state, void *attribute_val_in,
void *attribute_val_out, int *flag);
extern "C" int
delete_attr_intercept(MPI_Comm comm, int keyval,
void *attribute_val, void *extra_state);
ompi_mpi_cxx_delete_attr_intercept(MPI_Comm comm, int keyval,
void *attribute_val, void *extra_state);
#if 0 /* OMPI_ENABLE_MPI_PROFILING */

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

@ -95,7 +95,7 @@ MPI::Op::operator MPI_Op () const { return mpi_op; }
inline void
MPI::Op::Init(MPI::User_function *func, bool commute)
{
(void)MPI_Op_create(op_intercept , (int) commute, &mpi_op);
(void)MPI_Op_create(ompi_mpi_cxx_op_intercept , (int) commute, &mpi_op);
op_user_function = (User_function*)func;
}