Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Rob Latham
MPICH-BlueGene
Commits
84ef4e85
Commit
84ef4e85
authored
Nov 15, 2013
by
Junchao Zhang
Browse files
Add MPIR_ERRTEST_* macros for MPI_T
Signed-off-by:
Antonio J. Pena
<
apenya@mcs.anl.gov
>
parent
02da81ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/include/mpierrs.h
View file @
84ef4e85
...
...
@@ -500,6 +500,97 @@
} \
}
#ifdef HAVE_ERROR_CHECKING
#define MPIR_ERRTEST_MPIT_INITIALIZED(err_) \
do { \
if (!MPIR_T_is_initialized()) { \
MPIU_ERR_SETANDSTMT(err_, MPI_T_ERR_NOT_INITIALIZED, goto fn_fail, "**mpitinit"); \
} \
} while (0)
#else
#define MPIR_ERRTEST_MPIT_INITIALIZED(err_)
#endif
#define MPIR_ERRTEST_CAT_INDEX(index_,err_) \
do { \
if ((index_) < 0 || (index_) >= utarray_len(cat_table)) \
{ \
MPIU_ERR_SETANDSTMT(err_, MPI_T_ERR_INVALID_INDEX, goto fn_fail, "**catindex"); \
} \
} while (0)
#define MPIR_ERRTEST_ENUM_HANDLE(handle_, err_) \
do { \
if ((handle_) == MPI_T_ENUM_NULL) \
{ \
MPIU_ERR_SETANDSTMT(err_, MPI_T_ERR_INVALID_HANDLE, goto fn_fail, "**enumhandlenull"); \
} \
else if ((handle_)->kind != MPIR_T_ENUM_HANDLE) \
{ \
MPIU_ERR_SETANDSTMT(err_, MPI_T_ERR_INVALID_HANDLE, goto fn_fail, "**enumhandle"); \
} \
} while (0)
#define MPIR_ERRTEST_ENUM_ITEM(enum_, index_, err_) \
do { \
if ((index_) < 0 || (index_) >= utarray_len((enum_)->items)) \
{ \
MPIU_ERR_SETANDSTMT(err_, MPI_T_ERR_INVALID_ITEM, goto fn_fail, "**itemindex"); \
} \
} while (0)
#define MPIR_ERRTEST_CVAR_INDEX(index_,err_) \
do { \
if ((index_) < 0 || (index_) >= utarray_len(cvar_table)) \
{ \
MPIU_ERR_SETANDSTMT(err_, MPI_T_ERR_INVALID_INDEX, goto fn_fail, "**cvarindex"); \
} \
} while (0)
#define MPIR_ERRTEST_CVAR_HANDLE(handle_, err_) \
do { \
if ((handle_) == MPI_T_CVAR_HANDLE_NULL) \
{ \
MPIU_ERR_SETANDSTMT(err_, MPI_T_ERR_INVALID_HANDLE, goto fn_fail, "**cvarhandlenull"); \
} \
else if ((handle_)->kind != MPIR_T_CVAR_HANDLE) \
{ \
MPIU_ERR_SETANDSTMT(err_, MPI_T_ERR_INVALID_HANDLE, goto fn_fail, "**cvarhandle"); \
} \
} while (0)
#define MPIR_ERRTEST_PVAR_INDEX(index_,err_) \
do { \
if ((index_) < 0 || (index_) >= utarray_len(pvar_table)) \
{ \
MPIU_ERR_SETANDSTMT(err_, MPI_T_ERR_INVALID_INDEX, goto fn_fail, "**pvarindex"); \
} \
} while (0)
#define MPIR_ERRTEST_PVAR_HANDLE(handle_, err_) \
do { \
if (handle_ == MPI_T_PVAR_HANDLE_NULL) \
{ \
MPIU_ERR_SETANDSTMT(err_,MPI_T_ERR_INVALID_HANDLE, goto fn_fail,"**pvarhandlenull"); \
} \
else if ((handle_)->kind != MPIR_T_PVAR_HANDLE) \
{ \
MPIU_ERR_SETANDSTMT(err_, MPI_T_ERR_INVALID_HANDLE, goto fn_fail, "**pvarhandle"); \
} \
} while (0)
#define MPIR_ERRTEST_PVAR_SESSION(session_,err_) \
do { \
if ((session_) == MPI_T_PVAR_SESSION_NULL) \
{ \
MPIU_ERR_SETANDSTMT(err_,MPI_T_ERR_INVALID_SESSION, goto fn_fail,"**pvarsessionnull"); \
} \
else if ((session_)->kind != MPIR_T_PVAR_SESSION) \
{ \
MPIU_ERR_SETANDSTMT(err_, MPI_T_ERR_INVALID_SESSION, goto fn_fail, "**pvarsession"); \
} \
} while (0)
/* some simple memcpy aliasing checks */
#define MPIU_ERR_CHKMEMCPYANDSTMT(err_,stmt_,src_,dst_,len_) \
MPIU_ERR_CHKANDSTMT3(MPIU_MEM_RANGES_OVERLAP((dst_),(len_),(src_),(len_)),err_,MPI_ERR_INTERN,stmt_,"**memcpyalias","**memcpyalias %p %p %L",(src_),(dst_),(long long)(len_))
...
...
src/mpi_t/errnames.txt
View file @
84ef4e85
**mpitinit: MPI tool information interface is not initialized
**catindex: Category index is invalid
**enumhandlenull: Enum handle is NULL
**enumhandle: Enum handle is invalid
**itemindex: Enum item index is invalid
**cvarindex: Control variable index is invalid
**cvarhandlenull: Control variable handle is NULL
**cvarhandle: Control variable handle is invalid
**pvarindex: Performance variable index is invalid
**pvarhandlenull: Performance variable handle is NULL
**pvarhandle: Performance variable handle is invalid
**pvarsessionnull: Performance variable session is NULL
**pvarsession: Performance variable session is invalid
**mpi_t_init_thread: MPI_T_init_thread failed
**mpi_t_init_thread %d %p: MPI_T_init_thread(required=%d, provided=%p)
**mpi_t_finalize: MPI_T_finalize failed
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment