1
1

* Remove unneeded SRQ test -- we no longer support OFED builds that don't

have the SRQ interface.
  * Instead of setting AC_DEFINEs per MCA component, set per test.  THe
    answers can never be difference, and this will speed sed just a teeny
    bit

This commit was SVN r14856.
Этот коммит содержится в:
Brian Barrett 2007-06-05 01:49:26 +00:00
родитель 8b71f5ceac
Коммит a446af5b6b
4 изменённых файлов: 12 добавлений и 32 удалений

Просмотреть файл

@ -83,7 +83,7 @@ AC_DEFUN([_OMPI_CHECK_MX_CONFIG],[
AC_MSG_CHECKING(for MX_API)
AS_IF([test x"$have_recent_api" = "xyes"],
[AC_DEFINE_UNQUOTED([OMPI_MCA_]m4_translit([$1], [a-z], [A-Z])[_API_VERSION], $mx_api_ver,
[AC_DEFINE_UNQUOTED([OMPI_MX_API_VERSION], $mx_api_ver,
[Version of the MX API to use])
unset mx_api_ver have_mx_api_ver_msg found val msg
$2],

Просмотреть файл

@ -97,34 +97,14 @@ AC_DEFUN([OMPI_CHECK_OPENIB],[
[AC_MSG_WARN([Can not determine number of args to ibv_create_cq.])
AC_MSG_WARN([Not building component.])
ompi_check_openib_happy="no"],
[AC_DEFINE_UNQUOTED([OMPI_MCA_]m4_translit([$1], [a-z], [A-Z])[_IBV_CREATE_CQ_ARGS],
[AC_DEFINE_UNQUOTED([OMPI_IBV_CREATE_CQ_ARGS],
[$ompi_cv_func_ibv_create_cq_args],
[Number of arguments to ibv_create_cq])])])
AS_IF([test "$ompi_check_openib_happy" = "yes"],
[AC_CHECK_DECLS([IBV_EVENT_CLIENT_REREGISTER], [], [],
[#include <infiniband/verbs.h>])
AC_CHECK_FUNCS([ibv_create_srq],
[ompi_check_openib_have_srq=1],
[ompi_check_openib_have_srq=0])
AC_DEFINE_UNQUOTED([OMPI_MCA_]m4_translit([$1], [a-z], [A-Z])[_HAVE_SRQ],
[$ompi_check_openib_have_srq],
[Whether install of OpenFabrics includes shared receive queue support])
AC_CHECK_FUNCS([ibv_get_device_list],
[ompi_check_openib_have_device_list=1],
[ompi_check_openib_have_device_list=0])
AC_DEFINE_UNQUOTED([OMPI_MCA_]m4_translit([$1], [a-z], [A-Z])[_HAVE_DEVICE_LIST],
[$ompi_check_openib_have_device_list],
[Whether install of OpenFabrics includes ibv_get_device_list API])
AC_CHECK_FUNCS([ibv_resize_cq],
[ompi_check_openib_have_resize_cq=1],
[ompi_check_openib_have_resize_cq=0])
AC_DEFINE_UNQUOTED([OMPI_MCA_]m4_translit([$1], [a-z], [A-Z])[_HAVE_RESIZE_CQ],
[$ompi_check_openib_have_resize_cq],
[Whether install of OpenFabrics includes resize completion queue support])])
AC_CHECK_FUNCS([ibv_get_device_list ibv_resize_cq])])
CPPFLAGS="$ompi_check_openib_$1_save_CPPFLAGS"
LDFLAGS="$ompi_check_openib_$1_save_LDFLAGS"

Просмотреть файл

@ -267,7 +267,7 @@ static int mca_btl_openib_size_queues( struct mca_btl_openib_module_t* openib_bt
if(min_cq_size > (int32_t) mca_btl_openib_component.ib_cq_size) {
mca_btl_openib_component.ib_cq_size = min_cq_size > openib_btl->hca->ib_dev_attr.max_cq ?
openib_btl->hca->ib_dev_attr.max_cq : min_cq_size;
#if OMPI_MCA_BTL_OPENIB_HAVE_RESIZE_CQ
#ifdef HAVE_IBV_RESIZE_CQ
if(!first_time) {
rc = ibv_resize_cq(openib_btl->ib_cq[BTL_OPENIB_LP_QP], mca_btl_openib_component.ib_cq_size);
if(rc) {
@ -1000,7 +1000,7 @@ int mca_btl_openib_create_cq_srq(mca_btl_openib_module_t *openib_btl)
/* Create the low and high priority queue pairs */
#if OMPI_ENABLE_PROGRESS_THREADS == 1
#if OMPI_MCA_BTL_OPENIB_IBV_CREATE_CQ_ARGS == 3
#if OMPI_IBV_CREATE_CQ_ARGS == 3
openib_btl->ib_cq[BTL_OPENIB_LP_QP] =
ibv_create_cq(openib_btl->hca->ib_dev_context,
mca_btl_openib_component.ib_cq_size, openib_btl->hca->ib_channel);
@ -1010,7 +1010,7 @@ int mca_btl_openib_create_cq_srq(mca_btl_openib_module_t *openib_btl)
mca_btl_openib_component.ib_cq_size, openib_btl, openib_btl->hca->ib_channel, 0);
#endif
#else /* OMPI_ENABLE_PROGRESS_THREADS DISABLED */
#if OMPI_MCA_BTL_OPENIB_IBV_CREATE_CQ_ARGS == 3
#if OMPI_IBV_CREATE_CQ_ARGS == 3
openib_btl->ib_cq[BTL_OPENIB_LP_QP] =
ibv_create_cq(openib_btl->hca->ib_dev_context,
mca_btl_openib_component.ib_cq_size, NULL);
@ -1034,7 +1034,7 @@ int mca_btl_openib_create_cq_srq(mca_btl_openib_module_t *openib_btl)
return OMPI_ERROR;
}
#if OMPI_MCA_BTL_OPENIB_IBV_CREATE_CQ_ARGS == 3
#if OMPI_IBV_CREATE_CQ_ARGS == 3
openib_btl->ib_cq[BTL_OPENIB_HP_QP] =
ibv_create_cq(openib_btl->hca->ib_dev_context,
mca_btl_openib_component.ib_cq_size, openib_btl->hca->ib_channel);
@ -1044,7 +1044,7 @@ int mca_btl_openib_create_cq_srq(mca_btl_openib_module_t *openib_btl)
mca_btl_openib_component.ib_cq_size, openib_btl, openib_btl->hca->ib_channel, 0);
#endif
#else /* OMPI_ENABLE_PROGRESS_THREADS DISABLED */
#if OMPI_MCA_BTL_OPENIB_IBV_CREATE_CQ_ARGS == 3
#if OMPI_IBV_CREATE_CQ_ARGS == 3
openib_btl->ib_cq[BTL_OPENIB_HP_QP] =
ibv_create_cq(openib_btl->hca->ib_dev_context,
mca_btl_openib_component.ib_cq_size, NULL);

Просмотреть файл

@ -645,7 +645,7 @@ btl_openib_component_init(int *num_btl_modules,
mca_btl_openib_module_t * openib_btl;
mca_btl_base_selected_module_t* ib_selected;
opal_list_item_t* item;
#if OMPI_MCA_BTL_OPENIB_HAVE_DEVICE_LIST == 0
#if !defined(HAVE_IBV_GET_DEVICE_LIST)
struct dlist *dev_list;
struct ibv_device* ib_dev;
#endif
@ -689,7 +689,7 @@ btl_openib_component_init(int *num_btl_modules,
}
#endif
#if OMPI_MCA_BTL_OPENIB_HAVE_DEVICE_LIST
#ifdef HAVE_IBV_GET_DEVICE_LIST
ib_devs = ibv_get_device_list(&num_devs);
#else
/* Determine the number of hca's available on the host */
@ -712,7 +712,7 @@ btl_openib_component_init(int *num_btl_modules,
return NULL;
}
#if OMPI_MCA_BTL_OPENIB_HAVE_DEVICE_LIST == 0
#if !defined(HAVE_IBV_GET_DEVICE_LIST)
/* Allocate space for the ib devices */
ib_devs = (struct ibv_device**) malloc(num_devs * sizeof(struct ibv_dev*));
if(NULL == ib_devs) {
@ -912,7 +912,7 @@ btl_openib_component_init(int *num_btl_modules,
btl_openib_modex_send();
*num_btl_modules = mca_btl_openib_component.ib_num_btls;
#if OMPI_MCA_BTL_OPENIB_HAVE_DEVICE_LIST
#ifdef HAVE_IBV_GET_DEVICE_LIST
ibv_free_device_list(ib_devs);
#else
free(ib_devs);