This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "MPICH primary repository". The branch, master has been updated via 88affa5941155e68ead5eedd59ce093f6d2fb625 (commit) via 62c11077417fb00077b7c99d10a2210480775b35 (commit) via 2858b7ef5d24b8ef0a9f18b5c0cd7c2dd0b2eae2 (commit) from cc4f192f5e7e492c1d92459ac1ef640641abcf3c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://git.mpich.org/mpich.git/commitdiff/88affa5941155e68ead5eedd59ce093f6d... commit 88affa5941155e68ead5eedd59ce093f6d2fb625 Author: Pavan Balaji <[email protected]> Date: Tue Aug 18 13:40:29 2015 -0500 Consistently add error checking in all threading code. Signed-off-by: Ken Raffenetti <[email protected]> diff --git a/src/util/thread/mpiu_thread_posix_funcs.h b/src/util/thread/mpiu_thread_posix_funcs.h index 8263735..326c3bf 100644 --- a/src/util/thread/mpiu_thread_posix_funcs.h +++ b/src/util/thread/mpiu_thread_posix_funcs.h @@ -102,6 +102,9 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind); \ MPIU_DBG_MSG_P(THREAD,TYPICAL,"About to destroy MPIU_Thread_mutex %p", (mutex_ptr_)); \ err__ = pthread_mutex_destroy(&(mutex_ptr_)->mutex); \ + if (unlikely(err__)) \ + MPL_internal_sys_error_printf("pthread_mutex_destroy", err__, \ + " %s:%d\n", __FILE__, __LINE__); \ *(int *)(err_ptr_) = err__; \ } while (0) @@ -147,6 +150,9 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind); int err__; \ \ err__ = pthread_cond_init((cond_ptr_), NULL); \ + if (unlikely(err__)) \ + MPL_internal_sys_error_printf("pthread_cond_init", err__, \ + " %s:%d\n", __FILE__, __LINE__); \ MPIU_DBG_MSG_P(THREAD,TYPICAL,"Created MPIU_Thread_cond %p", (cond_ptr_)); \ *(int *)(err_ptr_) = err__; \ } while (0) @@ -157,6 +163,9 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind); \ MPIU_DBG_MSG_P(THREAD,TYPICAL,"About to destroy MPIU_Thread_cond %p", (cond_ptr_)); \ err__ = pthread_cond_destroy(cond_ptr_); \ + if (unlikely(err__)) \ + MPL_internal_sys_error_printf("pthread_cond_destroy", err__, \ + " %s:%d\n", __FILE__, __LINE__); \ *(int *)(err_ptr_) = err__; \ } while (0) @@ -173,6 +182,9 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind); err__ = pthread_cond_wait((cond_ptr_), &(mutex_ptr_)->mutex); \ OPA_decr_int(&(mutex_ptr_)->num_queued_threads); \ } while (err__ == EINTR); \ + if (unlikely(err__)) \ + MPL_internal_sys_error_printf("pthread_cond_wait", err__, \ + " %s:%d\n", __FILE__, __LINE__); \ \ *(int *)(err_ptr_) = err__; \ MPIU_Assert_fmt_msg(err__ == 0, \ @@ -186,6 +198,9 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind); \ MPIU_DBG_MSG_P(THREAD,TYPICAL,"About to cond_broadcast on MPIU_Thread_cond %p", (cond_ptr_)); \ err__ = pthread_cond_broadcast(cond_ptr_); \ + if (unlikely(err__)) \ + MPL_internal_sys_error_printf("pthread_cond_broadcast", err__, \ + " %s:%d\n", __FILE__, __LINE__); \ \ *(int *)(err_ptr_) = err__; \ MPIU_Assert_fmt_msg(err__ == 0, \ @@ -198,6 +213,9 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind); \ MPIU_DBG_MSG_P(THREAD,TYPICAL,"About to cond_signal on MPIU_Thread_cond %p", (cond_ptr_)); \ err__ = pthread_cond_signal(cond_ptr_); \ + if (unlikely(err__)) \ + MPL_internal_sys_error_printf("pthread_cond_signal", err__, \ + " %s:%d\n", __FILE__, __LINE__); \ \ *(int *)(err_ptr_) = err__; \ MPIU_Assert_fmt_msg(err__ == 0, \ @@ -214,6 +232,9 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind); int err__; \ \ err__ = pthread_key_create((tls_ptr_), (exit_func_ptr_)); \ + if (unlikely(err__)) \ + MPL_internal_sys_error_printf("pthread_key_create", err__, \ + " %s:%d\n", __FILE__, __LINE__); \ \ *(int *)(err_ptr_) = err__; \ } while (0) @@ -223,6 +244,9 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind); int err__; \ \ err__ = pthread_key_delete(*(tls_ptr_)); \ + if (unlikely(err__)) \ + MPL_internal_sys_error_printf("pthread_key_delete", err__, \ + " %s:%d\n", __FILE__, __LINE__); \ \ *(int *)(err_ptr_) = err__; \ } while (0) @@ -232,6 +256,9 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind); int err__; \ \ err__ = pthread_setspecific(*(tls_ptr_), (value_)); \ + if (unlikely(err__)) \ + MPL_internal_sys_error_printf("pthread_setspecific", err__, \ + " %s:%d\n", __FILE__, __LINE__); \ \ *(int *)(err_ptr_) = err__; \ MPIU_Assert_fmt_msg(err__ == 0, \ http://git.mpich.org/mpich.git/commitdiff/62c11077417fb00077b7c99d10a2210480... commit 62c11077417fb00077b7c99d10a2210480775b35 Author: Pavan Balaji <[email protected]> Date: Tue Aug 18 13:37:19 2015 -0500 Make error checking unlikely. Improves performance when locks are used in the critical path. Signed-off-by: Ken Raffenetti <[email protected]> diff --git a/src/util/thread/mpiu_thread_posix_funcs.h b/src/util/thread/mpiu_thread_posix_funcs.h index 8100581..8263735 100644 --- a/src/util/thread/mpiu_thread_posix_funcs.h +++ b/src/util/thread/mpiu_thread_posix_funcs.h @@ -69,7 +69,7 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind); \ OPA_store_int(&(mutex_ptr_)->num_queued_threads, 0); \ err__ = pthread_mutex_init(&(mutex_ptr_)->mutex, NULL); \ - if (err__) \ + if (unlikely(err__)) \ MPL_internal_sys_error_printf("pthread_mutex_init", err__, \ " %s:%d\n", __FILE__, __LINE__); \ *(int *)(err_ptr_) = err__; \ @@ -87,7 +87,7 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind); pthread_mutexattr_init(&attr__); \ pthread_mutexattr_settype(&attr__, MPICH_PTHREAD_MUTEX_ERRORCHECK_VALUE); \ err__ = pthread_mutex_init(&(mutex_ptr_)->mutex, &attr__); \ - if (err__) \ + if (unlikely(err__)) \ MPL_internal_sys_error_printf("pthread_mutex_init", err__, \ " %s:%d\n", __FILE__, __LINE__); \ *(int *)(err_ptr_) = err__; \ @@ -113,7 +113,7 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind); OPA_incr_int(&(mutex_ptr_)->num_queued_threads); \ err__ = pthread_mutex_lock(&(mutex_ptr_)->mutex); \ OPA_decr_int(&(mutex_ptr_)->num_queued_threads); \ - if (err__) { \ + if (unlikely(err__)) { \ MPIU_DBG_MSG_S(THREAD,TERSE," mutex lock error: %s", MPIU_Strerror(err__)); \ MPL_internal_sys_error_printf("pthread_mutex_lock", err__, \ " %s:%d\n", __FILE__, __LINE__); \ @@ -129,7 +129,7 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind); \ MPIU_DBG_MSG_P(THREAD,VERBOSE,"MPIU_Thread_mutex_unlock %p", (mutex_ptr_)); \ err__ = pthread_mutex_unlock(&(mutex_ptr_)->mutex); \ - if (err__) { \ + if (unlikely(err__)) { \ MPIU_DBG_MSG_S(THREAD,TERSE," mutex unlock error: %s", MPIU_Strerror(err__)); \ MPL_internal_sys_error_printf("pthread_mutex_unlock", err__, \ " %s:%d\n", __FILE__, __LINE__); \ http://git.mpich.org/mpich.git/commitdiff/2858b7ef5d24b8ef0a9f18b5c0cd7c2dd0... commit 2858b7ef5d24b8ef0a9f18b5c0cd7c2dd0b2eae2 Author: Pavan Balaji <[email protected]> Date: Tue Aug 18 13:22:28 2015 -0500 Bug-fix: Part of adioi.h code was outside the header macro protection. Signed-off-by: Rob Latham <[email protected]> diff --git a/src/mpi/romio/adio/include/adioi.h b/src/mpi/romio/adio/include/adioi.h index 4e8e35f..96a63f9 100644 --- a/src/mpi/romio/adio/include/adioi.h +++ b/src/mpi/romio/adio/include/adioi.h @@ -1076,12 +1076,12 @@ void *ADIOI_IO_Thread_Func(void *vptr_args); #define PATH_MAX 65535 #endif -#endif - - #if (HAVE_DECL_PWRITE == 0) #include <sys/types.h> #include <unistd.h> ssize_t pread(int fd, void *buf, size_t count, off_t offset); ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset); + #endif + +#endif /* ADIOI_INCLUDE */ ----------------------------------------------------------------------- Summary of changes: src/mpi/romio/adio/include/adioi.h | 6 ++-- src/util/thread/mpiu_thread_posix_funcs.h | 35 +++++++++++++++++++++++++--- 2 files changed, 34 insertions(+), 7 deletions(-) hooks/post-receive -- MPICH primary repository