Commit 791795f4 authored by Darius Buntinas's avatar Darius Buntinas
Browse files

[svn-r7046] removed function nesting macros

parent 07dd702f
......@@ -346,8 +346,6 @@ AC_ARG_ENABLE(g,
memarena - Check for overwrite errors in memory allocation arena
mutex - Enable error checking on pthread mutexes
mutexnesting - Check for non-nesting of mutexes
nesting - Check for proper nesting values
fine-grain-nesting - Perform a fine-grain nesting check on exit
all - All of the above choices],,enable_g=none)
dnl
dnl We may want to force MPI_Aint to be the same size as MPI_Offset,
......@@ -1212,12 +1210,6 @@ for option in $enable_g ; do
perform_memarena=yes
perform_memtracing=yes
;;
nesting)
perform_nesttesting=yes
;;
fine-grain-nesting|fg-nesting)
perform_fg_nesttesting=yes
;;
mem)
perform_memtracing=yes
;;
......@@ -1232,7 +1224,6 @@ for option in $enable_g ; do
;;
all|yes)
perform_memtracing=yes
perform_nesttesting=yes
perform_dbglog=yes
enable_append_g=yes
perform_meminit=yes
......@@ -1273,15 +1264,9 @@ if test -n "$perform_memtracing" ; then
AC_DEFINE(MPICH_DEBUG_MEMARENA,1,[Define if each function exit should confirm memory arena correctness])
fi
fi
if test -n "$perform_nesttesting" ; then
AC_DEFINE(MPICH_DEBUG_NESTING,1,[Define to check nesting level on exit])
fi
if test -n "$perform_mutexnesting" ; then
AC_DEFINE(MPICH_DEBUG_MUTEXNESTING,1,[Define to check nesting in mutexes])
fi
if test -n "$perform_fg_nesttesting" ; then
AC_DEFINE(MPICH_DEBUG_FINE_GRAIN_NESTING,1,[Define to perform a fine-grain nesting level check on exit])
fi
if test -n "$perform_dbglog" ; then
if test "$with_logging" != "none" ; then
AC_MSG_WARN([--with-logging overrides --enable-g=log])
......
# This Makefile supports the TAGS target
HEADERS = mpi.h mpiimpl.h mpiatomic.h mpichtimer.h mpierror.h mpierrs.h \
mpihandlemem.h mpimem.h mpistates.h mpisysstates.h mpitimerimpl.h \
mpitypedefs.h mpiutil.h nmpi.h mpiallstates.h mpiimplthread.h \
mpitypedefs.h mpiutil.h mpiallstates.h mpiimplthread.h \
mpiiov.h mpiu_monitors.h mpichtimer.h mpich_param_vals.h
......@@ -20,12 +20,6 @@
#define MPIDI_INIT_STATE_DECL(a) MPIR_STATE_DECL(a)
#define MPIDI_FINALIZE_STATE_DECL(a) MPIR_STATE_DECL(a)
/* FIXME: it would be nice to have a nesting level for the function call,
and use
MPIU_DBG_MSG_D(ROUTINE_ENTER,TYPICAL,"[%d]Entering "#a,MPIR_DBG_nestlevel++)
and a similar value for the exit (not thread-safe, but useful in the
single threaded case).
*/
/* function enter and exit macros */
#define MPIR_FUNC_ENTER(a) \
MPIU_DBG_MSG(ROUTINE_ENTER,TYPICAL,"Entering "#a )
......
......@@ -18,9 +18,6 @@
/* Include the mpi definitions */
#include "mpi.h"
/* Include nested mpi (NMPI) definitions */
#include "nmpi.h"
/* There are a few definitions that must be made *before* the mpichconf.h
file is included. These include the definitions of the error levels and some
thread granularity constants */
......@@ -1837,20 +1834,13 @@ extern MPICH_PerProcess_t MPIR_Process;
* 1. timing (controlled by macros in mpitimerimpl.h)
* These collect data on when each function began and finished; the
* resulting data can be displayed using special programs
* 2. nesting (selected with --enable-g=nesting)
* Checks that the "NMPI" functions and the Nest_incr/decr calls
* are properly nested at runtime.
* 3. Debug logging (selected with --enable-g=log)
* 2. Debug logging (selected with --enable-g=log)
* Invokes MPIU_DBG_MSG at the entry and exit for each routine
* 4. Additional memory validation of the memory arena (--enable-g=memarena)
* 3. Additional memory validation of the memory arena (--enable-g=memarena)
*/
/* ------------------------------------------------------------------------- */
/* if fine-grain nest testing is enabled then define the function enter/exit
macros to track the nesting level; otherwise, allow the timing module the
opportunity to define the macros */
#if defined(MPICH_DEBUG_FINE_GRAIN_NESTING)
# include "mpiu_func_nesting.h"
#elif defined(MPICH_DEBUG_MEMARENA)
/* allow the timing module the opportunity to define the macros */
#if defined(MPICH_DEBUG_MEMARENA)
# include "mpifuncmem.h"
#elif defined(USE_DBG_LOGGING)
# include "mpifunclog.h"
......@@ -1996,8 +1986,6 @@ void MPIR_Add_finalize( int (*routine)( void * ), void *extra, int priority );
#define MPIR_FINALIZE_CALLBACK_DEFAULT_PRIO 0
#define MPIR_FINALIZE_CALLBACK_MAX_PRIO 10
#include "mpinestimpl.h"
/*int MPIR_Comm_attr_dup(MPID_Comm *, MPID_Attribute **);
int MPIR_Comm_attr_delete(MPID_Comm *, MPID_Attribute *);*/
int MPIR_Comm_copy( MPID_Comm *, int, MPID_Comm ** );
......
......@@ -152,25 +152,6 @@ typedef struct MPID_Stateinfo_t {
void MPID_TimerStateBegin( int, MPID_Time_t * );
void MPID_TimerStateEnd( int, MPID_Time_t * );
#ifdef MPICH_DEBUG_NESTING
#define MPICH_MAX_NESTFILENAME 256
typedef struct MPICH_Nestinfo {
char file[MPICH_MAX_NESTFILENAME];
int line;
} MPICH_Nestinfo_t;
#define MPICH_MAX_NESTINFO 16
#define MPIU_THREAD_LOC_LEN 127
#define MPIU_THREAD_FNAME_LEN 31
typedef struct MPIU_ThreadDebug {
int count;
int line;
char file[MPIU_THREAD_LOC_LEN+1];
char fname[MPIU_THREAD_FNAME_LEN+1];
} MPIU_ThreadDebug_t;
#endif /* MPICH_DEBUG_NESTING */
/* arbitrary, just needed to avoid cleaning up heap allocated memory at thread
* destruction time */
#define MPIU_STRERROR_BUF_SIZE (1024)
......@@ -185,7 +166,6 @@ typedef struct MPIU_ThreadDebug {
* structure must be externally cleaned up.
* */
typedef struct MPICH_PerThread_t {
int nest_count; /* For layered MPI implementation */
int op_errno; /* For errors in predefined MPI_Ops */
/* error string storage for MPIU_Strerror */
......@@ -193,10 +173,6 @@ typedef struct MPICH_PerThread_t {
#if (MPICH_THREAD_LEVEL >= MPI_THREAD_SERIALIZED)
int lock_depth[MPICH_MAX_LOCKS];
#endif
#ifdef MPICH_DEBUG_NESTING
MPICH_Nestinfo_t nestinfo[MPICH_MAX_NESTINFO];
struct MPIU_ThreadDebug nest_debug[MPICH_MAX_NESTINFO];
#endif
/* FIXME: Is this used anywhere? */
#ifdef HAVE_TIMING
......@@ -505,16 +481,6 @@ M*/
#if defined(MPICH_IS_THREADED) && !defined(MPID_DEVICE_DEFINES_THREAD_CS)
#if MPIU_THREAD_GRANULARITY == MPIU_THREAD_GRANULARITY_GLOBAL
/* FIXME what is this really supposed to do? Is it supposed to check against
* the "MPI nesting" or the critical section nesting? */
/* It seems to just be a hook gating actual mutex lock/unlock for usage in
* _GLOBAL mode */
/* should be followed by a {} block that will be conditionally executed */
#define MPIU_THREAD_CHECKNEST(kind_, lockname_) \
MPIU_THREADPRIV_GET; \
MPIU_DBG_MSG_D(THREAD,VERBOSE,"CHECKNEST, MPIR_Nest_value()=%d",MPIR_Nest_value()); \
if (MPIR_Nest_value() == 0)
#define MPIU_THREAD_CHECKDEPTH(kind_, lockname_, value_)
#define MPIU_THREAD_UPDATEDEPTH(kind_, lockname_, value_)
......@@ -561,15 +527,10 @@ M*/
MPIU_Strncpy( nest_ptr_[kind_].file, __FILE__, MPIU_THREAD_LOC_LEN ); \
MPIU_Strncpy( nest_ptr_[kind_].fname, FCNAME, MPIU_THREAD_FNAME_LEN ); \
} while (0)
#define MPIU_THREAD_CHECKNEST(kind_, lockname_)
#else
#define MPIU_THREAD_CHECKDEPTH(kind_, lockname_, value_)
#define MPIU_THREAD_UPDATEDEPTH(kind_, lockname_, value_)
#define MPIU_THREAD_CHECKNEST(kind_, lockname_)
#endif /* MPID_THREAD_DEBUG */
#else
#define MPIU_THREAD_CHECKNEST(kind_, lockname_)
#endif /* test on THREAD_GRANULARITY */
#define MPIU_THREAD_CS_ENTER_LOCKNAME_RECURSIVE(name_) \
......
......@@ -31,12 +31,9 @@ MPIU_Thread_CS_enter_lockname_impl_(enum MPIU_Nest_mutexes kind,
MPIU_THREADPRIV_DECL;
MPIU_THREADPRIV_GET;
MPIU_THREAD_CHECKDEPTH(kind, lockname, 0);
MPIU_THREAD_CHECKNEST(kind, lockname)
{
MPIU_DBG_MSG_S(THREAD,TYPICAL,"locking %s", lockname);
MPID_Thread_mutex_lock(mutex);
MPIU_THREAD_UPDATEDEPTH(kind, lockname, 1);
}
MPIU_DBG_MSG_S(THREAD,TYPICAL,"locking %s", lockname);
MPID_Thread_mutex_lock(mutex);
MPIU_THREAD_UPDATEDEPTH(kind, lockname, 1);
}
#undef FUNCNAME
......@@ -53,12 +50,9 @@ MPIU_Thread_CS_exit_lockname_impl_(enum MPIU_Nest_mutexes kind,
MPIU_THREADPRIV_DECL;
MPIU_THREADPRIV_GET;
MPIU_THREAD_CHECKDEPTH(kind, lockname, 1);
MPIU_THREAD_CHECKNEST(kind, lockname)
{
MPIU_DBG_MSG_S(THREAD,TYPICAL,"unlocking %s", lockname);
MPID_Thread_mutex_unlock(mutex);
MPIU_THREAD_UPDATEDEPTH(kind, lockname, -1);
}
MPIU_DBG_MSG_S(THREAD,TYPICAL,"unlocking %s", lockname);
MPID_Thread_mutex_unlock(mutex);
MPIU_THREAD_UPDATEDEPTH(kind, lockname, -1);
}
#undef FUNCNAME
......@@ -75,7 +69,6 @@ MPIU_Thread_CS_yield_lockname_impl_(enum MPIU_Nest_mutexes kind,
MPIU_THREADPRIV_DECL;
MPIU_THREADPRIV_GET;
MPIU_THREAD_CHECKDEPTH(kind, lockname, 1);
/* don't CHECKNEST here, we want nesting to be >0 */
MPID_Thread_mutex_unlock(mutex);
/* FIXME should we MPID_Thread_yield() here? */
MPID_Thread_mutex_lock(mutex);
......
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
/*
* (C) 2010 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
*/
/* For no error checking, we could define MPIR_Nest_incr/decr as empty */
/* These routines export the nesting controls for use in ROMIO */
void MPIR_Nest_incr_export(void);
void MPIR_Nest_decr_export(void);
#ifdef MPICH_DEBUG_NESTING
/* this nesting is different than the MPIU_THREAD_*DEPTH macros, this is
* MPI/NMPI nesting, the other one is critical section nesting */
/* These two routines export the versions of the nest macros that
provide the file/line where the nest value changes, also for use in ROMIO */
void MPIR_Nest_incr_export_dbg(const char *, int);
void MPIR_Nest_decr_export_dbg(const char *, int);
/* FIXME: We should move the initialization and error reporting into
routines that can be called when necessary */
#define MPIR_Nest_init() \
do { \
int i_; \
MPICH_Nestinfo_t *nestinfo_ = NULL; \
MPIU_THREADPRIV_GET; \
nestinfo_ = MPIU_THREADPRIV_FIELD(nestinfo); \
for (i_ = 0; i_ <MPICH_MAX_NESTINFO; i_++) { \
nestinfo_[i_].file[0] = 0; \
nestinfo_[i_].line = 0; \
} \
} while (0)
#define MPIR_Nest_incr() \
do { \
MPICH_Nestinfo_t *nestinfo_ = NULL; \
MPIU_THREADPRIV_GET; \
nestinfo_ = MPIU_THREADPRIV_FIELD(nestinfo); \
if (MPIU_THREADPRIV_FIELD(nest_count) >= MPICH_MAX_NESTINFO) { \
MPIU_Internal_error_printf("nest stack exceeded at %s:%d\n", \
__FILE__,__LINE__); \
} \
else { \
MPIU_Strncpy(nestinfo_[MPIU_THREADPRIV_FIELD(nest_count)].file, \
__FILE__, MPICH_MAX_NESTFILENAME); \
nestinfo_[MPIU_THREADPRIV_FIELD(nest_count)].line=__LINE__;} \
MPIU_THREADPRIV_FIELD(nest_count)++; \
} while (0)
/* Set the line for the current entry to - the old line - this can help
identify increments that did not set the fields */
#define MPIR_Nest_decr() \
do { \
MPICH_Nestinfo_t *nestinfo_ = NULL; \
MPIU_THREADPRIV_GET; \
nestinfo_ = MPIU_THREADPRIV_FIELD(nestinfo); \
if (MPIU_THREADPRIV_FIELD(nest_count) >= 0) { \
nestinfo_[MPIU_THREADPRIV_FIELD(nest_count)].line=-__LINE__; \
} \
MPIU_THREADPRIV_FIELD(nest_count)--; \
if (MPIU_THREADPRIV_FIELD(nest_count) < MPICH_MAX_NESTINFO && \
strcmp(nestinfo_[MPIU_THREADPRIV_FIELD(nest_count)].file,__FILE__) != 0) { \
MPIU_Msg_printf( "Decremented nest count in file %s:%d but incremented in different file (%s:%d)\n", \
__FILE__,__LINE__, \
nestinfo_[MPIU_THREADPRIV_FIELD(nest_count)].file, \
nestinfo_[MPIU_THREADPRIV_FIELD(nest_count)].line); \
} \
else if (MPIU_THREADPRIV_FIELD(nest_count) < 0){ \
MPIU_Msg_printf("Decremented nest count in file %s:%d is negative\n", \
__FILE__,__LINE__); \
} \
} while (0)
#else
#define MPIR_Nest_init() do { MPIU_THREADPRIV_GET; MPIU_THREADPRIV_FIELD(nest_count) = 0; } while (0)
#define MPIR_Nest_incr() do { MPIU_THREADPRIV_GET; MPIU_THREADPRIV_FIELD(nest_count)++; } while (0)
#define MPIR_Nest_decr() do { MPIU_THREADPRIV_GET; MPIU_THREADPRIV_FIELD(nest_count)--; } while (0)
#endif /* MPICH_DEBUG_NESTING */
#define MPIR_Nest_value() (MPIU_THREADPRIV_FIELD(nest_count))
......@@ -67,9 +67,7 @@
/* Add support for the states and function enter/exit macros */
/* #include "mpitimerimpl.h" */
#if defined(MPICH_DEBUG_FINE_GRAIN_NESTING)
# include "mpiu_func_nesting.h"
#elif defined(MPICH_DEBUG_MEMARENA)
#if defined(MPICH_DEBUG_MEMARENA)
# include "mpifuncmem.h"
#elif defined(USE_DBG_LOGGING)
# include "mpifunclog.h"
......
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/*
* (C) 2001 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
*/
#if !defined(MPIU_FUNC_NESTING_H_INCLUDED)
#define MPIU_FUNC_NESTING_H_INCLUDED
/* state declaration macros */
#define MPIR_STATE_DECL(a) int a##_nest_level_in
#define MPID_MPI_STATE_DECL(a) MPIR_STATE_DECL(a)
#define MPID_MPI_INIT_STATE_DECL(a) MPIR_STATE_DECL(a)
#define MPID_MPI_FINALIZE_STATE_DECL(a) MPIR_STATE_DECL(a)
#define MPIDI_STATE_DECL(a) MPIR_STATE_DECL(a)
#define MPIDI_INIT_STATE_DECL(a) MPIR_STATE_DECL(a)
#define MPIDI_FINALIZE_STATE_DECL(a) MPIR_STATE_DECL(a)
/* function enter and exit macros */
#define MPIR_FUNC_ENTER(a) \
{ \
a##_nest_level_in = MPIR_Nest_value(); \
MPIU_DBG_MSG(ROUTINE_ENTER,TYPICAL,"Entering " ## #a );\
}
#define MPIR_FUNC_EXIT(a) \
{ \
int nest_level_out = MPIR_Nest_value(); \
\
MPIU_DBG_MSG(ROUTINE_EXIT,TYPICAL,"Leaving " ## #a );\
if (a##_nest_level_in != nest_level_out) \
{ \
MPIU_Error_printf("Error in nesting level: file=%s, line=%d, nest_in=%d, nest_out=%d\n", \
__FILE__, __LINE__, a##_nest_level_in, nest_level_out); \
exit(1); \
} \
}
/* Tell the package to define the rest of the enter/exit macros in
terms of these */
#define NEEDS_FUNC_ENTER_EXIT_DEFS 1
#endif /* defined(MPIU_FUNC_NESTING_H_INCLUDED) */
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/*
* (C) 2001 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
*/
#ifndef MPICH_NMPI_H_INCLUDED
#define MPICH_NMPI_H_INCLUDED
/*
* This file provides a flexible way to map MPI routines that are used
* within the MPICH2 implementation to either the MPI or PMPI versions.
* In normal use, it is appropriate to use PMPI, but in some cases,
* using the MPI routines instead is desired.
*/
/*
* When adding names, make sure that you add them to both branches.
* This allows the --enable-nmpi-as-mpi switch in configure to
* cause the internal routines to use the MPI versions; this is good for
* using tools that use the MPI profiling interface to collect data (e.g.,
* for people who what to see what happens when the collective operations
* are implemented over MPI point-to-point.
*/
#ifdef USE_MPI_FOR_NMPI
#define NMPI_Type_get_attr MPI_Type_get_attr
#define NMPI_Type_set_attr MPI_Type_set_attr
#define NMPI_Irecv MPI_Irecv
#define NMPI_Recv MPI_Recv
#define NMPI_Type_lb MPI_Type_lb
#define NMPI_Iprobe MPI_Iprobe
#define NMPI_Probe MPI_Probe
#define NMPI_Wtime MPI_Wtime
#define NMPI_Info_create MPI_Info_create
#define NMPI_Info_set MPI_Info_set
#define NMPI_Comm_call_errhandler MPI_Comm_call_errhandler
#define NMPI_Buffer_detach MPI_Buffer_detach
#define NMPI_Type_hindexed MPI_Type_hindexed
#define NMPIX_Grequest_class_create MPIX_Grequest_class_create
#define NMPIX_Grequest_class_allocate MPIX_Grequest_class_allocate
#define NMPIX_Grequest_start MPIX_Grequest_start
#else
#define NMPI_Type_get_attr PMPI_Type_get_attr
#define NMPI_Type_set_attr PMPI_Type_set_attr
#define NMPI_Irecv PMPI_Irecv
#define NMPI_Recv PMPI_Recv
#define NMPI_Type_lb PMPI_Type_lb
#define NMPI_Iprobe PMPI_Iprobe
#define NMPI_Probe PMPI_Probe
#define NMPI_Wtime PMPI_Wtime
#define NMPI_Info_create PMPI_Info_create
#define NMPI_Info_set PMPI_Info_set
#define NMPI_Comm_call_errhandler PMPI_Comm_call_errhandler
#define NMPI_Buffer_detach PMPI_Buffer_detach
#define NMPI_Type_hindexed PMPI_Type_hindexed
#define NMPIX_Grequest_class_create PMPIX_Grequest_class_create
#define NMPIX_Grequest_class_allocate PMPIX_Grequest_class_allocate
#define NMPIX_Grequest_start PMPIX_Grequest_start
#endif
#endif /* MPICH_NMPI_H_INCLUDED */
......@@ -73,12 +73,6 @@ int MPIR_Call_attr_delete( int handle, MPID_Attribute *attr_p )
int mpi_errno = MPI_SUCCESS;
MPID_Keyval* kv = attr_p->keyval;
MPIU_THREADPRIV_DECL;
MPIU_THREADPRIV_GET;
MPIR_Nest_incr();
if(kv->delfn.user_function == NULL)
goto fn_exit;
......@@ -109,7 +103,6 @@ int MPIR_Call_attr_delete( int handle, MPID_Attribute *attr_p )
/* --END ERROR HANDLING-- */
fn_exit:
MPIR_Nest_decr();
return mpi_errno;
fn_fail:
goto fn_exit;
......@@ -137,12 +130,6 @@ int MPIR_Call_attr_copy( int handle, MPID_Attribute *attr_p, void** value_copy,
int rc;
MPID_Keyval* kv = attr_p->keyval;
MPIU_THREADPRIV_DECL;
MPIU_THREADPRIV_GET;
MPIR_Nest_incr();
if(kv->copyfn.user_function == NULL)
goto fn_exit;
......@@ -168,7 +155,6 @@ int MPIR_Call_attr_copy( int handle, MPID_Attribute *attr_p, void** value_copy,
}
/* --END ERROR HANDLING-- */
fn_exit:
MPIR_Nest_decr();
return mpi_errno;
fn_fail:
goto fn_exit;
......
......@@ -67,7 +67,7 @@
End Algorithm: MPI_Allgather
*/
/* begin:nested */
/* not declared static because a machine-specific function may call this
one in some cases */
#undef FUNCNAME
......@@ -566,13 +566,13 @@ int MPIR_Allgather_intra (
fn_fail:
goto fn_exit;
}
/* end:nested */
#undef FUNCNAME
#define FUNCNAME MPIR_Allgather_inter
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
/* begin:nested */
/* not declared static because a machine-specific function may call this one
in some cases */
int MPIR_Allgather_inter (
......@@ -681,7 +681,7 @@ int MPIR_Allgather_inter (
fn_fail:
goto fn_exit;
}
/* end:nested */
/* MPIR_Allgather performs an allgather using point-to-point messages.
This is intended to be used by device-specific implementations of
......
......@@ -60,7 +60,7 @@
End Algorithm: MPI_Allgatherv
*/
/* begin:nested */
/* not declared static because a machine-specific function may call this one
in some cases */
#undef FUNCNAME
......@@ -669,9 +669,9 @@ int MPIR_Allgatherv_intra (
fn_fail:
goto fn_exit;
}
/* end:nested */
/* begin:nested */
/* not declared static because a machine-specific function may call this one in some cases */
#undef FUNCNAME
#define FUNCNAME MPIR_Allgatherv_inter
......@@ -763,7 +763,7 @@ int MPIR_Allgatherv_inter (
goto fn_exit;
}
/* end:nested */
/* MPIR_Allgatherv performs an allgatherv using point-to-point
messages. This is intended to be used by device-specific
......
......@@ -150,7 +150,6 @@ int MPIR_Allreduce_intra (
comm = comm_ptr->handle;
MPIU_THREADPRIV_GET;
MPIR_Nest_incr();
#if defined(USE_SMP_COLLECTIVES)
/* is the op commutative? We do SMP optimizations only if it is. */
......@@ -549,7 +548,6 @@ int MPIR_Allreduce_intra (
MPIDU_ERR_CHECK_MULTIPLE_THREADS_EXIT( comm_ptr );
MPIU_CHKLMEM_FREEALL();
MPIR_Nest_decr();
return (mpi_errno);
fn_fail:
......
......@@ -69,7 +69,7 @@
End Algorithm: MPI_Alltoall
*/
/* begin:nested */
/* not declared static because a machine-specific function may call this one in some cases */
#undef FUNCNAME
#define FUNCNAME MPIR_Alltoall_intra
......@@ -96,7 +96,6 @@ int MPIR_Alltoall_intra(
MPI_Request *reqarray;
MPI_Status *starray;
MPIU_CHKLMEM_DECL(6);
MPIU_THREADPRIV_DECL;
#ifdef MPIR_OLD_SHORT_ALLTOALL_ALG
MPI_Aint sendtype_true_extent, sendbuf_extent, sendtype_true_lb;
int k, p, curr_cnt, dst_tree_root, my_tree_root;
......@@ -105,9 +104,6 @@ int MPIR_Alltoall_intra(
if (recvcount == 0) return MPI_SUCCESS;
MPIU_THREADPRIV_GET;
MPIR_Nest_incr();
comm = comm_ptr->handle;
comm_size = comm_ptr->local_size;
rank = comm_ptr->rank;
......@@ -514,16 +510,15 @@ int MPIR_Alltoall_intra(
MPIU_CHKLMEM_FREEALL();
/* check if multiple threads are calling this collective function */
MPIDU_ERR_CHECK_MULTIPLE_THREADS_EXIT( comm_ptr );
MPIR_Nest_decr();
return (mpi_errno);
fn_fail:
if (newtype != MPI_DATATYPE_NULL)
MPIR_Type_free_impl(&newtype);
goto fn_exit;
}
/* end:nested */
/* begin:nested */
/* not declared static because a machine-specific function may call this one in some cases */
#undef FUNCNAME
#define FUNCNAME MPIR_Alltoall_inter
......@@ -605,7 +600,7 @@ int MPIR_Alltoall_inter(
fn_fail:
goto fn_exit;
}
/* end:nested */
#undef FUNCNAME
#define FUNCNAME MPIR_Alltoall
......
......@@ -49,7 +49,7 @@
End Algorithm: MPI_Alltoallv
*/
/* begin:nested */
/* not declared static because a machine-specific function may call this one in some cases */
#undef FUNCNAME
#define FUNCNAME MPIR_Alltoallv_intra
......@@ -76,13 +76,9 @@ int MPIR_Alltoallv_intra (
MPI_Comm comm;
int ii, ss, bblock;
int type_size;
MPIU_THREADPRIV_DECL;
MPIU_CHKLMEM_DECL(2);
MPIU_THREADPRIV_GET;
MPIR_Nest_incr();
comm = comm_ptr->handle;
comm_size = comm_ptr->local_size;
rank = comm_ptr->rank;
......@@ -195,15 +191,14 @@ fn_exit:
/* check if multiple threads are calling this collective function */
MPIDU_ERR_CHECK_MULTIPLE_THREADS_EXIT( comm_ptr );
MPIU_CHKLMEM_FREEALL();
MPIR_Nest_decr();
return (mpi_errno);
fn_fail:
goto fn_exit;
}
/* end:nested */
/* begin:nested */
/* not declared static because a machine-specific function may call this one in some cases */
#undef FUNCNAME
#define FUNCNAME MPIR_Alltoallv_inter
......@@ -294,7 +289,7 @@ int MPIR_Alltoallv_inter (
fn_fail: