Merge in the modified thread configure option branch per today's telecon.
Remove the --enable-progress-threads option as this is no longer functional, and hardcode OPAL_ENABLE_PROGRESS_THREADS to 0. Replace the --enable-mpi-threads option with --enable-mpi-thread-multiple as this is clearer as to meaning. This option automatically turns "on" opal thread support if it wasn't already so specified. If the user specifies --disable-opal-multi-threads --enable-mpi-thread-multiple, we will error out with a message Add a new --enable-opal-multi-threads option that turns "on" opal thread support without doing anything wrt mpi-thread-multiple This commit was SVN r22841.
Этот коммит содержится в:
родитель
4990cc41b6
Коммит
b400b84162
12
configure.ac
12
configure.ac
@ -108,6 +108,15 @@ m4_ifdef([project_orte],
|
||||
[AC_SUBST(libopen_rte_so_version)])
|
||||
AC_SUBST(libopen_pal_so_version)
|
||||
|
||||
#
|
||||
# Hardwire OPAL progress threads to be off
|
||||
#
|
||||
OPAL_ENABLE_PROGRESS_THREADS=0
|
||||
enable_progress_threads="no"
|
||||
AC_DEFINE_UNQUOTED([OPAL_ENABLE_PROGRESS_THREADS], [$OPAL_ENABLE_PROGRESS_THREADS],
|
||||
[Hardcode the OPAL progress thread to be off])
|
||||
|
||||
|
||||
# List header files to generate
|
||||
|
||||
AM_CONFIG_HEADER([opal/include/opal_config.h])
|
||||
@ -829,8 +838,9 @@ AC_DEFINE_UNQUOTED([OPAL_ALIGN_WORD_SIZE_INTEGERS], [$results],
|
||||
#
|
||||
# Check out what thread support we have
|
||||
#
|
||||
OPAL_CONFIG_THREADS
|
||||
m4_ifdef([project_ompi], [OMPI_CONFIG_THREADS])
|
||||
|
||||
OMPI_CONFIG_THREADS
|
||||
CFLAGS="$CFLAGS $THREAD_CFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $THREAD_CPPFLAGS"
|
||||
m4_ifdef([project_ompi],
|
||||
|
@ -318,7 +318,7 @@ static int ompi_comm_register_cid (uint32_t cid )
|
||||
if ( regcom->cid > cid ) {
|
||||
break;
|
||||
}
|
||||
#if OPAL_ENABLE_MPI_THREADS
|
||||
#if OMPI_ENABLE_THREAD_MULTIPLE
|
||||
if( regcom->cid == cid ) {
|
||||
/**
|
||||
* The MPI standard state that is the user responsability to
|
||||
@ -331,7 +331,7 @@ static int ompi_comm_register_cid (uint32_t cid )
|
||||
OBJ_RELEASE(newentry);
|
||||
return OMPI_ERROR;
|
||||
}
|
||||
#endif /* OPAL_ENABLE_MPI_THREADS */
|
||||
#endif /* OMPI_ENABLE_THREAD_MULTIPLE */
|
||||
}
|
||||
opal_list_insert_pos (&ompi_registered_comms, item,
|
||||
(opal_list_item_t *)newentry);
|
||||
|
83
ompi/config/ompi_config_threads.m4
Обычный файл
83
ompi/config/ompi_config_threads.m4
Обычный файл
@ -0,0 +1,83 @@
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
AC_DEFUN([OMPI_CONFIG_THREADS],[
|
||||
#
|
||||
# Arguments: none
|
||||
#
|
||||
# Dependencies: None
|
||||
#
|
||||
# Modifies:
|
||||
# none - see called tests
|
||||
#
|
||||
# configure threads
|
||||
#
|
||||
|
||||
#
|
||||
# Thread Multiple
|
||||
#
|
||||
# --enable-mpi-thread-multiple
|
||||
# #if OMPI_ENABLE_THREAD_MULTIPLE == 0 /* Not available */
|
||||
# #if OMPI_ENABLE_THREAD_MULTIPLE == 1 /* Available */
|
||||
#
|
||||
AC_MSG_CHECKING([if want MPI thread support])
|
||||
AC_ARG_ENABLE([mpi_thread_multiple],
|
||||
[AC_HELP_STRING([--enable-mpi-thread-multiple],
|
||||
[Enable thread support for MPI applications (default: disabled)])],
|
||||
[enable_mpi_threads="$enableval"],
|
||||
[enable_mpi_threads="undef"])
|
||||
|
||||
# if they did not want OPAL thread support, then they cannot have this option
|
||||
if test "$enable_mpi_threads" = "yes" -a "$enable_opal_multi_threads" = "no"; then
|
||||
AC_MSG_WARN(["failed"])
|
||||
AC_MSG_WARN(["*** You have requested MPI thread multiple support but thread"])
|
||||
AC_MSG_WARN(["*** support was disabled within the OPAL code base by"])
|
||||
AC_MSG_WARN(["*** --disable-opal-multi-threads on your configure command."])
|
||||
AC_MSG_ERROR(["*** Can not continue."])
|
||||
# if --disable-mpi-thread-multiple
|
||||
elif test "$enable_mpi_threads" = "no"; then
|
||||
ompi_want_mpi_threads=0
|
||||
OMPI_ENABLE_THREAD_MULTIPLE=0
|
||||
AC_MSG_RESULT([Disabled])
|
||||
#if requested and OPAL thread support is enabled
|
||||
elif test "$enable_mpi_threads" = "yes" -a "$enable_opal_multi_threads" = "yes" ; then
|
||||
ompi_want_mpi_threads=1
|
||||
OMPI_ENABLE_THREAD_MULTIPLE=1
|
||||
AC_MSG_RESULT([Enabled])
|
||||
#if requested and OPAL thread support was not explicitly enabled or disabled
|
||||
elif test "$enable_mpi_threads" = "yes" -a "$enable_opal_multi_threads" = "undef" ; then
|
||||
# ensure that OPAL thread support is turned on
|
||||
OPAL_ENABLE_MULTI_THREADS=1
|
||||
enable_opal_multi_threads="yes"
|
||||
AC_DEFINE_UNQUOTED([OPAL_ENABLE_MULTI_THREADS], [$OPAL_ENABLE_MULTI_THREADS],
|
||||
[Whether we should enable support for multiple user threads])
|
||||
ompi_want_mpi_threads=1
|
||||
OMPI_ENABLE_THREAD_MULTIPLE=1
|
||||
AC_MSG_RESULT([Enabled - OPAL thread support automatically enabled])
|
||||
else
|
||||
# Default: disable
|
||||
ompi_want_mpi_threads=0
|
||||
OMPI_ENABLE_THREAD_MULTIPLE=0
|
||||
AC_MSG_RESULT([Disabled])
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([OMPI_ENABLE_THREAD_MULTIPLE], [$ompi_want_mpi_threads],
|
||||
[Enable MPI Thread Multiple])
|
||||
|
||||
])dnl
|
||||
|
@ -175,7 +175,7 @@ int mca_bml_r2_ft_event(int state)
|
||||
* network options on this machine, and post proper modex informaiton.
|
||||
*/
|
||||
if( OMPI_SUCCESS != (ret = mca_btl_base_select(OPAL_ENABLE_PROGRESS_THREADS,
|
||||
OPAL_ENABLE_MPI_THREADS) ) ) {
|
||||
OMPI_ENABLE_THREAD_MULTIPLE) ) ) {
|
||||
opal_output(0, "bml:r2: ft_event(Restart): Failed to select in BTL framework\n");
|
||||
return ret;
|
||||
}
|
||||
@ -275,7 +275,7 @@ int mca_bml_r2_ft_event(int state)
|
||||
* network options on this machine, and post proper modex informaiton.
|
||||
*/
|
||||
if( OMPI_SUCCESS != (ret = mca_btl_base_select(OPAL_ENABLE_PROGRESS_THREADS,
|
||||
OPAL_ENABLE_MPI_THREADS) ) ) {
|
||||
OMPI_ENABLE_THREAD_MULTIPLE) ) ) {
|
||||
opal_output(0, "bml:r2: ft_event(Restart): Failed to select in BTL framework\n");
|
||||
return ret;
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ mca_btl_gm_module_t mca_btl_gm_module = {
|
||||
mca_btl_gm_free,
|
||||
mca_btl_gm_prepare_src,
|
||||
mca_btl_gm_prepare_dst,
|
||||
#if OPAL_ENABLE_MPI_THREADS || OPAL_ENABLE_PROGRESS_THREADS
|
||||
#if OMPI_ENABLE_THREAD_MULTIPLE || OPAL_ENABLE_PROGRESS_THREADS
|
||||
mca_btl_gm_send,
|
||||
NULL, /* send immediate */
|
||||
mca_btl_gm_put,
|
||||
|
@ -16,7 +16,7 @@ AC_DEFUN([MCA_pml_dr_CONFIG],[
|
||||
# support for 64 bits atomics.
|
||||
AS_IF([test $OPAL_ASM_SUPPORT_64BIT -eq 1],
|
||||
[$1],
|
||||
[AS_IF([test $OPAL_ENABLE_PROGRESS_THREADS -eq 1 -o $OPAL_ENABLE_MPI_THREADS -eq 1],
|
||||
[AS_IF([test $OPAL_ENABLE_PROGRESS_THREADS -eq 1 -o $OMPI_ENABLE_THREAD_MULTIPLE -eq 1],
|
||||
[$2],
|
||||
[$1])
|
||||
])
|
||||
|
@ -55,7 +55,7 @@ mca_pml_base_component_2_0_0_t mca_pml_v_component =
|
||||
};
|
||||
|
||||
static bool pml_v_enable_progress_treads = OPAL_ENABLE_PROGRESS_THREADS;
|
||||
static bool pml_v_enable_mpi_threads = OPAL_ENABLE_MPI_THREADS;
|
||||
static bool pml_v_enable_mpi_threads = OMPI_ENABLE_THREAD_MULTIPLE;
|
||||
|
||||
/*******************************************************************************
|
||||
* MCA level functions - parasite setup
|
||||
|
@ -98,7 +98,7 @@ int MPI_Cart_create(MPI_Comm old_comm, int ndims, int *dims,
|
||||
}
|
||||
if (OMPI_SUCCESS !=
|
||||
(err = mca_topo_base_find_available(OPAL_ENABLE_PROGRESS_THREADS,
|
||||
OPAL_ENABLE_MPI_THREADS))) {
|
||||
OMPI_ENABLE_THREAD_MULTIPLE))) {
|
||||
return OMPI_ERRHANDLER_INVOKE(old_comm, err, FUNC_NAME);
|
||||
}
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ int MPI_File_delete(char *filename, MPI_Info info)
|
||||
}
|
||||
if (OMPI_SUCCESS !=
|
||||
(rc = mca_io_base_find_available(OPAL_ENABLE_PROGRESS_THREADS,
|
||||
OPAL_ENABLE_MPI_THREADS))) {
|
||||
OMPI_ENABLE_THREAD_MULTIPLE))) {
|
||||
return OMPI_ERRHANDLER_INVOKE(MPI_FILE_NULL, rc, FUNC_NAME);
|
||||
}
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ int MPI_File_open(MPI_Comm comm, char *filename, int amode,
|
||||
}
|
||||
if (OMPI_SUCCESS !=
|
||||
(rc = mca_io_base_find_available(OPAL_ENABLE_PROGRESS_THREADS,
|
||||
OPAL_ENABLE_MPI_THREADS))) {
|
||||
OMPI_ENABLE_THREAD_MULTIPLE))) {
|
||||
return OMPI_ERRHANDLER_INVOKE(MPI_FILE_NULL, rc, FUNC_NAME);
|
||||
}
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ int MPI_Graph_create(MPI_Comm old_comm, int nnodes, int *index,
|
||||
}
|
||||
if (OMPI_SUCCESS !=
|
||||
(err = mca_topo_base_find_available(OPAL_ENABLE_PROGRESS_THREADS,
|
||||
OPAL_ENABLE_MPI_THREADS))) {
|
||||
OMPI_ENABLE_THREAD_MULTIPLE))) {
|
||||
return OMPI_ERRHANDLER_INVOKE(old_comm, err, FUNC_NAME);
|
||||
}
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ int MPI_Init_thread(int *argc, char ***argv, int required,
|
||||
* = MPI_THREAD_MULTIPLE. Such an implementation may always return provided
|
||||
* = MPI_THREAD_MULTIPLE, irrespective of the value of required.
|
||||
*/
|
||||
#if OPAL_ENABLE_MPI_THREADS
|
||||
#if OMPI_ENABLE_THREAD_MULTIPLE
|
||||
*provided = MPI_THREAD_MULTIPLE;
|
||||
#else
|
||||
*provided = MPI_THREAD_SINGLE;
|
||||
|
@ -49,7 +49,7 @@ int MPI_Is_thread_main(int *flag)
|
||||
|
||||
/* Compare this thread ID to the main thread ID */
|
||||
|
||||
#if OPAL_ENABLE_MPI_THREADS
|
||||
#if OMPI_ENABLE_THREAD_MULTIPLE
|
||||
*flag = (int) opal_thread_self_compare(ompi_mpi_main_thread);
|
||||
#else
|
||||
*flag = 1;
|
||||
|
@ -65,7 +65,7 @@ int MPI_Register_datarep(char *datarep,
|
||||
}
|
||||
if (OMPI_SUCCESS !=
|
||||
(rc = mca_io_base_find_available(OPAL_ENABLE_PROGRESS_THREADS,
|
||||
OPAL_ENABLE_MPI_THREADS))) {
|
||||
OMPI_ENABLE_THREAD_MULTIPLE))) {
|
||||
return OMPI_ERRHANDLER_INVOKE(MPI_FILE_NULL, rc, FUNC_NAME);
|
||||
}
|
||||
}
|
||||
|
@ -373,7 +373,7 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
|
||||
if (OPAL_HAVE_THREAD_SUPPORT == 0) {
|
||||
ompi_mpi_thread_provided = *provided = MPI_THREAD_SINGLE;
|
||||
ompi_mpi_main_thread = NULL;
|
||||
} else if (OPAL_ENABLE_MPI_THREADS == 1) {
|
||||
} else if (OMPI_ENABLE_THREAD_MULTIPLE == 1) {
|
||||
ompi_mpi_thread_provided = *provided = requested;
|
||||
ompi_mpi_main_thread = opal_thread_get_self();
|
||||
} else {
|
||||
@ -509,7 +509,7 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
|
||||
}
|
||||
if (OMPI_SUCCESS !=
|
||||
(ret = ompi_op_base_find_available(OPAL_ENABLE_PROGRESS_THREADS,
|
||||
OPAL_ENABLE_MPI_THREADS))) {
|
||||
OMPI_ENABLE_THREAD_MULTIPLE))) {
|
||||
error = "ompi_op_base_find_available() failed";
|
||||
goto error;
|
||||
}
|
||||
@ -563,20 +563,20 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
|
||||
|
||||
if (OMPI_SUCCESS !=
|
||||
(ret = mca_mpool_base_init(OPAL_ENABLE_PROGRESS_THREADS,
|
||||
OPAL_ENABLE_MPI_THREADS))) {
|
||||
OMPI_ENABLE_THREAD_MULTIPLE))) {
|
||||
error = "mca_mpool_base_init() failed";
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (OMPI_SUCCESS !=
|
||||
(ret = mca_pml_base_select(OPAL_ENABLE_PROGRESS_THREADS,
|
||||
OPAL_ENABLE_MPI_THREADS))) {
|
||||
OMPI_ENABLE_THREAD_MULTIPLE))) {
|
||||
error = "mca_pml_base_select() failed";
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* select buffered send allocator component to be used */
|
||||
ret=mca_pml_base_bsend_init(OPAL_ENABLE_MPI_THREADS);
|
||||
ret=mca_pml_base_bsend_init(OMPI_ENABLE_THREAD_MULTIPLE);
|
||||
if( OMPI_SUCCESS != ret ) {
|
||||
error = "mca_pml_base_bsend_init() failed";
|
||||
goto error;
|
||||
@ -584,14 +584,14 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
|
||||
|
||||
if (OMPI_SUCCESS !=
|
||||
(ret = mca_coll_base_find_available(OPAL_ENABLE_PROGRESS_THREADS,
|
||||
OPAL_ENABLE_MPI_THREADS))) {
|
||||
OMPI_ENABLE_THREAD_MULTIPLE))) {
|
||||
error = "mca_coll_base_find_available() failed";
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (OMPI_SUCCESS !=
|
||||
(ret = ompi_osc_base_find_available(OPAL_ENABLE_PROGRESS_THREADS,
|
||||
OPAL_ENABLE_MPI_THREADS))) {
|
||||
OMPI_ENABLE_THREAD_MULTIPLE))) {
|
||||
error = "ompi_osc_base_find_available() failed";
|
||||
goto error;
|
||||
}
|
||||
|
@ -572,7 +572,7 @@ void ompi_info_do_config(bool want_all)
|
||||
if (OPAL_HAVE_SOLARIS_THREADS || OPAL_HAVE_POSIX_THREADS) {
|
||||
asprintf(&threads, "%s (mpi: %s, progress: %s)", OPAL_HAVE_SOLARIS_THREADS ? "solaris" :
|
||||
(OPAL_HAVE_POSIX_THREADS ? "posix" : "type unknown"),
|
||||
OPAL_ENABLE_MPI_THREADS ? "yes" : "no",
|
||||
OMPI_ENABLE_THREAD_MULTIPLE ? "yes" : "no",
|
||||
OPAL_ENABLE_PROGRESS_THREADS ? "yes" : "no");
|
||||
} else {
|
||||
threads = strdup("no");
|
||||
|
@ -9,7 +9,7 @@ dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
@ -17,7 +17,7 @@ dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
AC_DEFUN([OMPI_CONFIG_THREADS],[
|
||||
AC_DEFUN([OPAL_CONFIG_THREADS],[
|
||||
#
|
||||
# Arguments: none
|
||||
#
|
||||
@ -179,91 +179,45 @@ AM_CONDITIONAL(OPAL_HAVE_POSIX_THREADS, test "$THREAD_TYPE" = "posix")
|
||||
AM_CONDITIONAL(OPAL_HAVE_SOLARIS_THREADS, test "$THREAD_TYPE" = "solaris")
|
||||
|
||||
#
|
||||
# Now configure the whole MPI and progress thread gorp
|
||||
# Now configure the whole OPAL and progress thread gorp
|
||||
#
|
||||
AC_MSG_CHECKING([if want MPI thread support])
|
||||
AC_ARG_ENABLE([mpi-threads],
|
||||
AC_HELP_STRING([--enable-mpi-threads],
|
||||
[Enable threads for MPI applications (default: disabled)]),
|
||||
[enable_mpi_threads="$enableval"])
|
||||
AC_MSG_CHECKING([if want OPAL thread support])
|
||||
AC_ARG_ENABLE([opal-multi-threads],
|
||||
AC_HELP_STRING([--enable-opal-multi-threads],
|
||||
[Enable thread support inside OPAL (default: disabled)]),
|
||||
[enable_opal_multi_threads="$enableval"],
|
||||
[enable_opal_multi_threads="undef"])
|
||||
|
||||
if test "$enable_mpi_threads" = "" ; then
|
||||
if test "$enable_opal_multi_threads" = "undef" ; then
|
||||
dnl # no argument given either way. Default to whether
|
||||
dnl # we have threads or not
|
||||
dnl if test "$THREAD_TYPE" != "none" ; then
|
||||
dnl OPAL_ENABLE_MPI_THREADS=1
|
||||
dnl enable_mpi_threads="yes"
|
||||
dnl OPAL_ENABLE_MULTI_THREADS=1
|
||||
dnl enable_opal_multi_threads="yes"
|
||||
dnl else
|
||||
dnl OPAL_ENABLE_MPI_THREADS=0
|
||||
dnl enable_mpi_threads="no"
|
||||
dnl OPAL_ENABLE_MULTI_THREADS=0
|
||||
dnl enable_opal_multi_threads="no"
|
||||
dnl fi
|
||||
# no argument - default to no
|
||||
OPAL_ENABLE_MPI_THREADS=0
|
||||
enable_mpi_threads="no"
|
||||
elif test "$enable_mpi_threads" = "no" ; then
|
||||
OPAL_ENABLE_MPI_THREADS=0
|
||||
# no argument - default to no, but leave
|
||||
# enable_opal_multi_threads="undef" so we
|
||||
# can later detect that it wasn't specified
|
||||
OPAL_ENABLE_MULTI_THREADS=0
|
||||
elif test "$enable_opal_multi_threads" = "no" ; then
|
||||
OPAL_ENABLE_MULTI_THREADS=0
|
||||
else
|
||||
# they want MPI threads. Make sure we have threads
|
||||
# they want OPAL thread support. Make sure we have threads
|
||||
if test "$THREAD_TYPE" != "none" ; then
|
||||
OPAL_ENABLE_MPI_THREADS=1
|
||||
enable_mpi_threads="yes"
|
||||
OPAL_ENABLE_MULTI_THREADS=1
|
||||
enable_opal_multi_threads="yes"
|
||||
else
|
||||
AC_MSG_ERROR([User requested MPI threads, but no threading model supported])
|
||||
fi
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([OPAL_ENABLE_MPI_THREADS], [$OPAL_ENABLE_MPI_THREADS],
|
||||
[Whether we should enable support for multiple user threads])
|
||||
AC_MSG_RESULT([$enable_mpi_threads])
|
||||
AC_DEFINE_UNQUOTED([OPAL_ENABLE_MULTI_THREADS], [$OPAL_ENABLE_MULTI_THREADS],
|
||||
[Whether we should enable thread support within the OPAL code base])
|
||||
AC_MSG_RESULT([$enable_opal_multi_threads])
|
||||
|
||||
|
||||
AC_MSG_CHECKING([if want asynchronous progress thread support])
|
||||
AC_ARG_ENABLE([progress-threads],
|
||||
AC_HELP_STRING([--enable-progress-threads],
|
||||
[Enable threads asynchronous communication progress (default: disabled)]),
|
||||
[enable_progress_threads="$enableval"])
|
||||
|
||||
if test "$enable_progress_threads" = "" ; then
|
||||
# no argument given either way. Default to no.
|
||||
OPAL_ENABLE_PROGRESS_THREADS=0
|
||||
enable_progress_threads="no"
|
||||
elif test "$enable_progress_threads" = "no" ; then
|
||||
OPAL_ENABLE_PROGRESS_THREADS=0
|
||||
enable_progress_threads="no"
|
||||
else
|
||||
# they want threaded progress
|
||||
if test "$THREAD_TYPE" != "none" ; then
|
||||
OPAL_ENABLE_PROGRESS_THREADS=1
|
||||
enable_progress_threads="yes"
|
||||
else
|
||||
AC_MSG_ERROR([User requested progress threads, but no threading model supported])
|
||||
fi
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([OPAL_ENABLE_PROGRESS_THREADS], [$OPAL_ENABLE_PROGRESS_THREADS],
|
||||
[Whether we should use progress threads rather than polling])
|
||||
AC_MSG_RESULT([$enable_progress_threads])
|
||||
|
||||
AS_IF([test "$enable_progress_threads" = "yes"],
|
||||
[cat <<EOF
|
||||
*******************************************************************************
|
||||
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
|
||||
*******************************************************************************
|
||||
|
||||
Open MPI was specifically configured to enable "progress threads" (via
|
||||
--enable-progress-threads). This feature is currently known not to work
|
||||
-- MPI jobs may crash.
|
||||
|
||||
Note that this feature is only active so that developers can debug it.
|
||||
Use this feature at your own risk.
|
||||
|
||||
(sleeping for 5 seconds to give you a chance to reconsider!)
|
||||
|
||||
*******************************************************************************
|
||||
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
|
||||
*******************************************************************************
|
||||
|
||||
EOF
|
||||
sleep 5])
|
||||
|
||||
#
|
||||
# Fault Tolerance Thread
|
||||
#
|
||||
@ -287,15 +241,15 @@ elif test "$enable_ft_thread" = "no"; then
|
||||
ompi_want_ft_thread=0
|
||||
AC_MSG_RESULT([Disabled])
|
||||
# if default, and no progress or MPI threads
|
||||
elif test "$enable_ft_thread" = "undef" -a "$enable_progress_threads" = "no" -a "$enable_mpi_threads" = "no" ; then
|
||||
elif test "$enable_ft_thread" = "undef" -a "$enable_opal_progress_threads" = "no" -a "$enable_opal_multi_threads" = "no" ; then
|
||||
ompi_want_ft_thread=0
|
||||
AC_MSG_RESULT([Disabled (Progress and MPI Threads Disabled)])
|
||||
# if default, and either progress or MPI threads enabled
|
||||
AC_MSG_RESULT([Disabled (OPAL Thread Support Disabled)])
|
||||
# if default, and MPI threads enabled
|
||||
else
|
||||
# Default: Enable
|
||||
# Make sure we have at least Progress Threads or MPI Threads enabled
|
||||
if test "$enable_progress_threads" = "no" -a "$enable_mpi_threads" = "no"; then
|
||||
AC_MSG_RESULT([Must enable progress or MPI threads to use this option])
|
||||
# Make sure we have OPAL Threads enabled
|
||||
if "$enable_opal_multi_threads" = "no"; then
|
||||
AC_MSG_RESULT([Must enable OPALbasic thread support to use this option])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
@ -303,8 +257,8 @@ else
|
||||
AC_MSG_WARN([**************************************************])
|
||||
AC_MSG_WARN([*** Fault Tolerance with a thread in Open MPI *])
|
||||
AC_MSG_WARN([*** is an experimental, research quality option. *])
|
||||
AC_MSG_WARN([*** It requires progress or MPI threads, and *])
|
||||
AC_MSG_WARN([*** care should be used when enabling these *])
|
||||
AC_MSG_WARN([*** It requires OPAL thread support or progress *])
|
||||
AC_MSG_WARN([*** and care should be used when enabling these *])
|
||||
AC_MSG_WARN([*** options. *])
|
||||
AC_MSG_WARN([**************************************************])
|
||||
fi
|
||||
|
@ -69,7 +69,7 @@
|
||||
/* Do we have posix or solaris thread lib */
|
||||
#define OPAL_HAVE_THREADS (OPAL_HAVE_POSIX_THREADS || OPAL_HAVE_SOLARIS_THREADS)
|
||||
/* Do we have thread support? */
|
||||
#define OPAL_HAVE_THREAD_SUPPORT (OPAL_ENABLE_MPI_THREADS || OPAL_ENABLE_PROGRESS_THREADS)
|
||||
#define OPAL_HAVE_THREAD_SUPPORT (OPAL_ENABLE_MULTI_THREADS || OPAL_ENABLE_PROGRESS_THREADS)
|
||||
|
||||
/*
|
||||
* BEGIN_C_DECLS should be used at the beginning of your declarations,
|
||||
|
@ -517,7 +517,7 @@ void orte_info_do_config(bool want_all)
|
||||
if (OPAL_HAVE_SOLARIS_THREADS || OPAL_HAVE_POSIX_THREADS) {
|
||||
asprintf(&threads, "%s (mpi: %s, progress: %s)", OPAL_HAVE_SOLARIS_THREADS ? "solaris" :
|
||||
(OPAL_HAVE_POSIX_THREADS ? "posix" : "type unknown"),
|
||||
OPAL_ENABLE_MPI_THREADS ? "yes" : "no",
|
||||
OPAL_ENABLE_MULTI_THREADS ? "yes" : "no",
|
||||
OPAL_ENABLE_PROGRESS_THREADS ? "yes" : "no");
|
||||
} else {
|
||||
threads = strdup("no");
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user