Per discussion at Develoepr's Meeting, remove Solaris threads support. Solaris
will just fall back to pthreads, which should be no problem. This commit was SVN r29893.
Этот коммит содержится в:
родитель
6ef938de3f
Коммит
121ca26c59
@ -31,8 +31,6 @@ AC_DEFUN([OPAL_CONFIG_THREADS],[
|
||||
#
|
||||
|
||||
# create templates
|
||||
AH_TEMPLATE([OPAL_HAVE_SOLARIS_THREADS],
|
||||
[Do we have native Solaris threads])
|
||||
AH_TEMPLATE([OPAL_HAVE_POSIX_THREADS],
|
||||
[Do we have POSIX threads])
|
||||
|
||||
@ -48,32 +46,16 @@ else
|
||||
fi
|
||||
export HAVE_POSIX_THREADS
|
||||
|
||||
OMPI_CONFIG_SOLARIS_THREADS(HAVE_SOLARIS_THREADS=1, HAVE_SOLARIS_THREADS=0)
|
||||
AC_MSG_CHECKING([for working Solaris threads package])
|
||||
if test "$HAVE_SOLARIS_THREADS" = "1" ; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
export HAVE_SOLARIS_THREADS
|
||||
|
||||
#
|
||||
# Ask what threading we want (allow solaris / posix right now)
|
||||
# Ask what threading we want (allow posix right now)
|
||||
#
|
||||
AC_MSG_CHECKING([for type of thread support])
|
||||
AC_ARG_WITH(threads,
|
||||
AC_HELP_STRING([--with-threads],
|
||||
[Set thread type (solaris / posix)]),
|
||||
[Set thread type (posix)]),
|
||||
[THREAD_TYPE=$withval])
|
||||
|
||||
if test "$THREAD_TYPE" = "solaris"; then
|
||||
|
||||
if test "$HAVE_SOLARIS_THREADS" = "0"; then
|
||||
AC_MSG_WARN(["*** You have chosen Solaris threads, which are not"])
|
||||
AC_MSG_WARN(["*** available on your system "])
|
||||
AC_MSG_ERROR(["*** Can not continue"])
|
||||
fi
|
||||
elif test "$THREAD_TYPE" = "posix"; then
|
||||
if test "$THREAD_TYPE" = "posix"; then
|
||||
|
||||
if test "$HAVE_POSIX_THREADS" = "0"; then
|
||||
AC_MSG_WARN(["*** You have chosen POSIX threads, which are not"])
|
||||
@ -84,30 +66,15 @@ elif test "$THREAD_TYPE" = "no"; then
|
||||
THREAD_TYPE="none"
|
||||
elif test -z "$THREAD_TYPE" -o "$THREAD_TYPE" = "yes"; then
|
||||
|
||||
# Actual logic here - properly set THREAD_TYPE - we go for system
|
||||
# optimized where ever possible
|
||||
case "$host" in
|
||||
*solaris*)
|
||||
if test "$HAVE_SOLARIS_THREADS" = "1"; then
|
||||
THREAD_TYPE="solaris"
|
||||
elif test "$HAVE_POSIX_THREADS" = "1"; then
|
||||
THREAD_TYPE="posix"
|
||||
else
|
||||
THEAD_TYPE="none found"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if test "$HAVE_POSIX_THREADS" = "1"; then
|
||||
THREAD_TYPE="posix"
|
||||
else
|
||||
THREAD_TYPE="none found"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
else
|
||||
|
||||
AC_MSG_WARN(["*** You have specified a thread type that I do not"])
|
||||
AC_MSG_WARN(["*** understand. Valid options are posix and solaris"])
|
||||
AC_MSG_WARN(["*** understand. Valid options are posix"])
|
||||
AC_MSG_ERROR(["*** Can not continue."])
|
||||
fi
|
||||
AC_MSG_RESULT($THREAD_TYPE)
|
||||
@ -118,19 +85,7 @@ AC_MSG_RESULT($THREAD_TYPE)
|
||||
#
|
||||
# Blah - this should be made better, but I don't know how...
|
||||
#
|
||||
if test "$THREAD_TYPE" = "solaris"; then
|
||||
AC_DEFINE(OPAL_HAVE_SOLARIS_THREADS, 1)
|
||||
AC_DEFINE(OPAL_HAVE_POSIX_THREADS, 0)
|
||||
|
||||
THREAD_CFLAGS="$STHREAD_CFLAGS"
|
||||
THREAD_FCFLAGS="$STHREAD_FCFLAGS"
|
||||
THREAD_CXXFLAGS="$STHREAD_CXXFLAGS"
|
||||
THREAD_CPPFLAGS="$STHREAD_CPPFLAGS"
|
||||
THREAD_CXXCPPFLAGS="$STHREAD_CXXCPPFLAGS"
|
||||
THREAD_LDFLAGS="$STHREAD_LDFLAGS"
|
||||
THREAD_LIBS="$STHREAD_LIBS"
|
||||
elif test "$THREAD_TYPE" = "posix"; then
|
||||
AC_DEFINE(OPAL_HAVE_SOLARIS_THREADS, 0)
|
||||
if test "$THREAD_TYPE" = "posix"; then
|
||||
AC_DEFINE(OPAL_HAVE_POSIX_THREADS, 1)
|
||||
|
||||
THREAD_CFLAGS="$PTHREAD_CFLAGS"
|
||||
@ -143,7 +98,6 @@ elif test "$THREAD_TYPE" = "posix"; then
|
||||
|
||||
OPAL_CHECK_PTHREAD_PIDS
|
||||
else
|
||||
AC_DEFINE(OPAL_HAVE_SOLARIS_THREADS, 0)
|
||||
AC_DEFINE(OPAL_HAVE_POSIX_THREADS, 0)
|
||||
|
||||
TRHEAD_CFLAGS=
|
||||
@ -172,7 +126,6 @@ EOF
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(OPAL_HAVE_POSIX_THREADS, test "$THREAD_TYPE" = "posix")
|
||||
AM_CONDITIONAL(OPAL_HAVE_SOLARIS_THREADS, test "$THREAD_TYPE" = "solaris")
|
||||
|
||||
# Make sure we have threads
|
||||
if test "$THREAD_TYPE" = "none" ; then
|
||||
|
@ -192,9 +192,6 @@ static inline int memchecker_comm(MPI_Comm comm)
|
||||
opal_memchecker_base_isdefined (&comm->c_lock.m_lock_pthread.__m_lock.__status, sizeof(long int));
|
||||
opal_memchecker_base_isdefined (&comm->c_lock.m_lock_pthread.__m_lock.__spinlock, sizeof(int));
|
||||
*/
|
||||
#endif
|
||||
#if OPAL_HAVE_SOLARIS_THREADS
|
||||
opal_memchecker_base_isdefined (&comm->c_lock.m_lock_solaris, sizeof(mutex_t));
|
||||
#endif
|
||||
/*
|
||||
* The storage of a union has the size of the initialized member.
|
||||
|
@ -260,17 +260,15 @@ void ompi_info_do_config(bool want_all)
|
||||
fortran_have_ignore_tkr = strdup("no");
|
||||
}
|
||||
|
||||
if (OPAL_HAVE_SOLARIS_THREADS || OPAL_HAVE_POSIX_THREADS) { /* should just test OPAL_HAVE_THREADS */
|
||||
if (OPAL_HAVE_POSIX_THREADS) { /* should just test OPAL_HAVE_THREADS */
|
||||
#if OMPI_RTE_ORTE
|
||||
(void)asprintf(&threads, "%s (MPI_THREAD_MULTIPLE: %s, OPAL support: %s, OMPI progress: %s, ORTE progress: yes, Event lib: yes)",
|
||||
OPAL_HAVE_SOLARIS_THREADS ? "solaris" :
|
||||
(OPAL_HAVE_POSIX_THREADS ? "posix" : "type unknown"), /* "type unknown" can presumably never happen */
|
||||
OMPI_ENABLE_THREAD_MULTIPLE ? "yes" : "no",
|
||||
OPAL_ENABLE_MULTI_THREADS ? "yes" : "no",
|
||||
OMPI_ENABLE_PROGRESS_THREADS ? "yes" : "no");
|
||||
#else
|
||||
(void)asprintf(&threads, "%s (MPI_THREAD_MULTIPLE: %s, OPAL support: %s, OMPI progress: %s, Event lib: yes)",
|
||||
OPAL_HAVE_SOLARIS_THREADS ? "solaris" :
|
||||
(OPAL_HAVE_POSIX_THREADS ? "posix" : "type unknown"), /* "type unknown" can presumably never happen */
|
||||
OMPI_ENABLE_THREAD_MULTIPLE ? "yes" : "no",
|
||||
OPAL_ENABLE_MULTI_THREADS ? "yes" : "no",
|
||||
|
@ -69,7 +69,7 @@
|
||||
**********************************************************************/
|
||||
|
||||
/* Do we have posix or solaris thread lib */
|
||||
#define OPAL_HAVE_THREADS (OPAL_HAVE_POSIX_THREADS || OPAL_HAVE_SOLARIS_THREADS)
|
||||
#define OPAL_HAVE_THREADS (OPAL_HAVE_POSIX_THREADS)
|
||||
|
||||
/*
|
||||
* BEGIN_C_DECLS should be used at the beginning of your declarations,
|
||||
|
@ -25,9 +25,6 @@ AM_CPPFLAGS += \
|
||||
-DMALLOC_HOOKS=1 \
|
||||
-I$(srcdir)/sysdeps/pthread
|
||||
endif
|
||||
if OPAL_HAVE_SOLARIS_THREADS
|
||||
AM_CPPFLAGS += -I$(srcdir)/sysdeps/solaris
|
||||
endif
|
||||
# this must come *after* the threads -Is
|
||||
AM_CPPFLAGS += -I$(srcdir)/sysdeps/generic
|
||||
|
||||
|
@ -29,9 +29,6 @@
|
||||
#endif
|
||||
#if OPAL_HAVE_POSIX_THREADS
|
||||
#include <pthread.h>
|
||||
#elif OPAL_HAVE_SOLARIS_THREADS
|
||||
#include <thread.h>
|
||||
#include <synch.h>
|
||||
#endif
|
||||
|
||||
#include "opal/threads/mutex.h"
|
||||
|
@ -55,8 +55,6 @@ static void opal_mutex_construct(opal_mutex_t *m)
|
||||
|
||||
#endif /* OPAL_ENABLE_DEBUG */
|
||||
|
||||
#elif OPAL_HAVE_SOLARIS_THREADS
|
||||
mutex_init(&m->m_lock_solaris, USYNC_THREAD, NULL);
|
||||
#endif
|
||||
|
||||
#if OPAL_ENABLE_DEBUG
|
||||
@ -74,8 +72,6 @@ static void opal_mutex_destruct(opal_mutex_t *m)
|
||||
{
|
||||
#if OPAL_HAVE_POSIX_THREADS
|
||||
pthread_mutex_destroy(&m->m_lock_pthread);
|
||||
#elif OPAL_HAVE_SOLARIS_THREADS
|
||||
mutex_destroy(&m->m_lock_solaris);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -40,9 +40,6 @@
|
||||
#endif
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#elif OPAL_HAVE_SOLARIS_THREADS
|
||||
#include <thread.h>
|
||||
#include <synch.h>
|
||||
#endif
|
||||
|
||||
#include "opal/class/opal_object.h"
|
||||
@ -55,8 +52,6 @@ struct opal_mutex_t {
|
||||
|
||||
#if OPAL_HAVE_POSIX_THREADS
|
||||
pthread_mutex_t m_lock_pthread;
|
||||
#elif OPAL_HAVE_SOLARIS_THREADS
|
||||
mutex_t m_lock_solaris;
|
||||
#endif
|
||||
|
||||
#if OPAL_ENABLE_DEBUG
|
||||
@ -124,28 +119,6 @@ static inline void opal_mutex_unlock(opal_mutex_t *m)
|
||||
#endif
|
||||
}
|
||||
|
||||
#elif OPAL_HAVE_SOLARIS_THREADS
|
||||
|
||||
/************************************************************************
|
||||
* Solaris threads
|
||||
************************************************************************/
|
||||
|
||||
|
||||
static inline int opal_mutex_trylock(opal_mutex_t *m)
|
||||
{
|
||||
return mutex_trylock(&m->m_lock_solaris);
|
||||
}
|
||||
|
||||
static inline void opal_mutex_lock(opal_mutex_t *m)
|
||||
{
|
||||
mutex_lock(&m->m_lock_solaris);
|
||||
}
|
||||
|
||||
static inline void opal_mutex_unlock(opal_mutex_t *m)
|
||||
{
|
||||
mutex_unlock(&m->m_lock_solaris);
|
||||
}
|
||||
|
||||
#elif OPAL_HAVE_ATOMIC_SPINLOCKS
|
||||
|
||||
/************************************************************************
|
||||
|
@ -39,8 +39,6 @@ static void opal_thread_construct(opal_thread_t *t)
|
||||
t->t_run = 0;
|
||||
#if OPAL_HAVE_POSIX_THREADS
|
||||
t->t_handle = (pthread_t) -1;
|
||||
#elif OPAL_HAVE_SOLARIS_THREADS
|
||||
t->t_handle = (thread_t) -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -93,56 +91,6 @@ void opal_thread_kill(opal_thread_t *t, int sig)
|
||||
}
|
||||
|
||||
|
||||
#elif OPAL_HAVE_SOLARIS_THREADS
|
||||
|
||||
/************************************************************************
|
||||
* Solaris threads
|
||||
************************************************************************/
|
||||
|
||||
int opal_thread_start(opal_thread_t *t)
|
||||
{
|
||||
int rc;
|
||||
|
||||
if (OPAL_ENABLE_DEBUG) {
|
||||
if (NULL == t->t_run || t->t_handle != (thread_t) -1) {
|
||||
return OPAL_ERR_BAD_PARAM;
|
||||
}
|
||||
}
|
||||
|
||||
rc = thr_create(NULL, 0, (void*(*)(void*)) t->t_run, t, NULL,
|
||||
&t->t_handle);
|
||||
|
||||
return (rc == 0) ? OPAL_SUCCESS : OPAL_ERROR;
|
||||
}
|
||||
|
||||
|
||||
int opal_thread_join(opal_thread_t *t, void **thr_return)
|
||||
{
|
||||
int rc = thr_join(t->t_handle, NULL, thr_return);
|
||||
t->t_handle = (thread_t) -1;
|
||||
return (rc == 0) ? OPAL_SUCCESS : OPAL_ERROR;
|
||||
}
|
||||
|
||||
|
||||
bool opal_thread_self_compare(opal_thread_t *t)
|
||||
{
|
||||
return t->t_handle == thr_self();
|
||||
}
|
||||
|
||||
|
||||
opal_thread_t *opal_thread_get_self(void)
|
||||
{
|
||||
opal_thread_t *t = OBJ_NEW(opal_thread_t);
|
||||
t->t_handle = thr_self();
|
||||
return t;
|
||||
}
|
||||
|
||||
void opal_thread_kill(opal_thread_t *t, int sig)
|
||||
{
|
||||
thr_kill(t->t_handle, sig);
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
|
||||
/************************************************************************
|
||||
|
@ -25,8 +25,6 @@
|
||||
|
||||
#if OPAL_HAVE_POSIX_THREADS
|
||||
#include <pthread.h>
|
||||
#elif OPAL_HAVE_SOLARIS_THREADS
|
||||
#include <thread.h>
|
||||
#endif
|
||||
#ifdef HAVE_SIGNAL_H
|
||||
#include <signal.h>
|
||||
@ -52,8 +50,6 @@ struct opal_thread_t {
|
||||
void* t_arg;
|
||||
#ifdef OPAL_HAVE_POSIX_THREADS
|
||||
pthread_t t_handle;
|
||||
#elif OPAL_HAVE_SOLARIS_THREADS
|
||||
thread_t t_handle;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include "opal/threads/tsd.h"
|
||||
|
||||
#if !OPAL_HAVE_POSIX_THREADS && !OPAL_HAVE_SOLARIS_THREADS
|
||||
#if !OPAL_HAVE_POSIX_THREADS
|
||||
|
||||
#define TSD_ENTRIES 32
|
||||
|
||||
|
@ -17,8 +17,6 @@
|
||||
|
||||
#if OPAL_HAVE_POSIX_THREADS
|
||||
#include <pthread.h>
|
||||
#elif OPAL_HAVE_SOLARIS_THREADS
|
||||
#include <thread.h>
|
||||
#endif
|
||||
|
||||
#include "opal/constants.h"
|
||||
@ -166,35 +164,6 @@ opal_tsd_getspecific(opal_tsd_key_t key, void **valuep)
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
#elif OPAL_HAVE_SOLARIS_THREADS
|
||||
|
||||
typedef thread_key_t opal_tsd_key_t;
|
||||
|
||||
static inline int
|
||||
opal_tsd_key_create(opal_tsd_key_t *key,
|
||||
opal_tsd_destructor_t destructor)
|
||||
{
|
||||
return thr_keycreate(key, destructor);
|
||||
}
|
||||
|
||||
static inline int
|
||||
opal_tsd_key_delete(opal_tsd_key_t key)
|
||||
{
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
static inline int
|
||||
opal_tsd_setspecific(opal_tsd_key_t key, void *value)
|
||||
{
|
||||
return thr_setspecific(key, value);
|
||||
}
|
||||
|
||||
static inline int
|
||||
opal_tsd_getspecific(opal_tsd_key_t key, void **valuep)
|
||||
{
|
||||
return thr_getspecific(key, valuep);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
typedef int opal_tsd_key_t;
|
||||
|
@ -354,8 +354,8 @@ void orte_info_do_config(bool want_all)
|
||||
symbol_visibility = OPAL_C_HAVE_VISIBILITY ? "yes" : "no";
|
||||
|
||||
/* setup strings that require allocation */
|
||||
if (OPAL_HAVE_SOLARIS_THREADS || OPAL_HAVE_POSIX_THREADS) { /* should just test OPAL_HAVE_THREADS */
|
||||
asprintf(&threads, "%s (OPAL: %s, ORTE progress: yes, Event lib: yes)", OPAL_HAVE_SOLARIS_THREADS ? "solaris" :
|
||||
if (OPAL_HAVE_POSIX_THREADS) { /* should just test OPAL_HAVE_THREADS */
|
||||
asprintf(&threads, "%s (OPAL: %s, ORTE progress: yes, Event lib: yes)",
|
||||
(OPAL_HAVE_POSIX_THREADS ? "posix" : "type unknown"), /* "type unknown" can presumably never happen */
|
||||
OPAL_ENABLE_MULTI_THREADS ? "yes" : "no");
|
||||
} else {
|
||||
|
@ -254,17 +254,15 @@ void oshmem_info_do_config(bool want_all)
|
||||
fortran_have_ignore_tkr = strdup("no");
|
||||
}
|
||||
|
||||
if (OPAL_HAVE_SOLARIS_THREADS || OPAL_HAVE_POSIX_THREADS) { /* should just test OPAL_HAVE_THREADS */
|
||||
if (OPAL_HAVE_POSIX_THREADS) { /* should just test OPAL_HAVE_THREADS */
|
||||
#if OMPI_RTE_ORTE
|
||||
(void)asprintf(&threads, "%s (MPI_THREAD_MULTIPLE: %s, OPAL support: %s, OMPI progress: %s, ORTE progress: yes, Event lib: yes)",
|
||||
OPAL_HAVE_SOLARIS_THREADS ? "solaris" :
|
||||
(OPAL_HAVE_POSIX_THREADS ? "posix" : "type unknown"), /* "type unknown" can presumably never happen */
|
||||
OMPI_ENABLE_THREAD_MULTIPLE ? "yes" : "no",
|
||||
OPAL_ENABLE_MULTI_THREADS ? "yes" : "no",
|
||||
OMPI_ENABLE_PROGRESS_THREADS ? "yes" : "no");
|
||||
#else
|
||||
(void)asprintf(&threads, "%s (MPI_THREAD_MULTIPLE: %s, OPAL support: %s, OMPI progress: %s, Event lib: yes)",
|
||||
OPAL_HAVE_SOLARIS_THREADS ? "solaris" :
|
||||
(OPAL_HAVE_POSIX_THREADS ? "posix" : "type unknown"), /* "type unknown" can presumably never happen */
|
||||
OMPI_ENABLE_THREAD_MULTIPLE ? "yes" : "no",
|
||||
OPAL_ENABLE_MULTI_THREADS ? "yes" : "no",
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user