move mca parameter registration into own .c and .h files
This commit was SVN r14493.
Этот коммит содержится в:
родитель
8c2385416f
Коммит
cae24fcde1
@ -9,7 +9,7 @@
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved.
|
||||
# Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
|
||||
#
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
@ -32,11 +32,13 @@ udapl_sources = \
|
||||
btl_udapl.c \
|
||||
btl_udapl.h \
|
||||
btl_udapl_component.c \
|
||||
btl_udapl_eager_rdma.h \
|
||||
btl_udapl_endpoint.c \
|
||||
btl_udapl_endpoint.h \
|
||||
btl_udapl_frag.c \
|
||||
btl_udapl_frag.h \
|
||||
btl_udapl_eager_rdma.h \
|
||||
btl_udapl_mca.c \
|
||||
btl_udapl_mca.h \
|
||||
btl_udapl_proc.c \
|
||||
btl_udapl_proc.h
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006 Sandia National Laboratories. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
|
||||
*
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -137,7 +137,7 @@ mca_btl_udapl_init(DAT_NAME_PTR ia_name, mca_btl_udapl_module_t* btl)
|
||||
|
||||
/* open the uDAPL interface */
|
||||
btl->udapl_evd_async = DAT_HANDLE_NULL;
|
||||
rc = dat_ia_open(ia_name, mca_btl_udapl_component.udapl_evd_qlen,
|
||||
rc = dat_ia_open(ia_name, mca_btl_udapl_module.udapl_evd_qlen,
|
||||
&btl->udapl_evd_async, &btl->udapl_ia);
|
||||
if(DAT_SUCCESS != rc) {
|
||||
char* major;
|
||||
@ -182,7 +182,7 @@ mca_btl_udapl_init(DAT_NAME_PTR ia_name, mca_btl_udapl_module_t* btl)
|
||||
|
||||
/* set up evd's */
|
||||
rc = dat_evd_create(btl->udapl_ia,
|
||||
mca_btl_udapl_component.udapl_evd_qlen, DAT_HANDLE_NULL,
|
||||
mca_btl_udapl_module.udapl_evd_qlen, DAT_HANDLE_NULL,
|
||||
DAT_EVD_DTO_FLAG | DAT_EVD_RMR_BIND_FLAG, &btl->udapl_evd_dto);
|
||||
if(DAT_SUCCESS != rc) {
|
||||
char* major;
|
||||
@ -196,7 +196,7 @@ mca_btl_udapl_init(DAT_NAME_PTR ia_name, mca_btl_udapl_module_t* btl)
|
||||
}
|
||||
|
||||
rc = dat_evd_create(btl->udapl_ia,
|
||||
mca_btl_udapl_component.udapl_evd_qlen, DAT_HANDLE_NULL,
|
||||
mca_btl_udapl_module.udapl_evd_qlen, DAT_HANDLE_NULL,
|
||||
DAT_EVD_CR_FLAG | DAT_EVD_CONNECTION_FLAG, &btl->udapl_evd_conn);
|
||||
if(DAT_SUCCESS != rc) {
|
||||
char* major;
|
||||
|
@ -9,7 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
|
||||
*
|
||||
* $COPYRIGHT$
|
||||
@ -57,13 +57,6 @@ struct mca_btl_udapl_component_t {
|
||||
size_t udapl_num_btls; /**< number of hcas available to the uDAPL component */
|
||||
size_t udapl_max_btls; /**< maximum number of supported hcas */
|
||||
struct mca_btl_udapl_module_t **udapl_btls; /**< array of available BTL modules */
|
||||
size_t udapl_evd_qlen;
|
||||
size_t udapl_max_request_dtos; /**< maximum number of outstanding consumer
|
||||
submitted sends and rdma operations, see
|
||||
section 6.6.6 of uDAPL Spec */
|
||||
size_t udapl_max_recv_dtos; /**< maximum number of outstanding consumer
|
||||
submitted recv operations, see section 6.6.6
|
||||
of uDAPL Spec */
|
||||
int32_t udapl_num_recvs; /**< number of recv buffers to keep posted */
|
||||
int32_t udapl_num_sends; /**< number of sends to post on endpoint */
|
||||
int32_t udapl_sr_win; /**< number of fragments recieved before
|
||||
@ -143,6 +136,14 @@ struct mca_btl_udapl_module_t {
|
||||
* with eager rdma
|
||||
* connections
|
||||
*/
|
||||
/* module specific limits */
|
||||
int udapl_evd_qlen;
|
||||
int udapl_max_request_dtos; /**< maximum number of outstanding consumer
|
||||
submitted sends and rdma operations, see
|
||||
section 6.6.6 of uDAPL Spec */
|
||||
int udapl_max_recv_dtos; /**< maximum number of outstanding consumer
|
||||
submitted recv operations, see section
|
||||
6.6.6 of uDAPL Spec */
|
||||
};
|
||||
typedef struct mca_btl_udapl_module_t mca_btl_udapl_module_t;
|
||||
extern mca_btl_udapl_module_t mca_btl_udapl_module;
|
||||
|
@ -11,7 +11,7 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006 Sandia National Laboratories. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
|
||||
*
|
||||
* $COPYRIGHT$
|
||||
@ -39,6 +39,7 @@
|
||||
#include "btl_udapl.h"
|
||||
#include "btl_udapl_frag.h"
|
||||
#include "btl_udapl_endpoint.h"
|
||||
#include "btl_udapl_mca.h"
|
||||
#include "btl_udapl_proc.h"
|
||||
#include "ompi/mca/btl/base/base.h"
|
||||
#include "ompi/mca/btl/base/btl_base_error.h"
|
||||
@ -141,6 +142,8 @@ static inline int mca_btl_udapl_param_register_int(
|
||||
|
||||
int mca_btl_udapl_component_open(void)
|
||||
{
|
||||
int rc = OMPI_SUCCESS;
|
||||
|
||||
/* initialize state */
|
||||
mca_btl_udapl_component.udapl_num_btls=0;
|
||||
mca_btl_udapl_component.udapl_btls=NULL;
|
||||
@ -149,58 +152,8 @@ int mca_btl_udapl_component_open(void)
|
||||
OBJ_CONSTRUCT(&mca_btl_udapl_component.udapl_procs, opal_list_t);
|
||||
OBJ_CONSTRUCT(&mca_btl_udapl_component.udapl_lock, opal_mutex_t);
|
||||
|
||||
/* register uDAPL component parameters */
|
||||
mca_btl_udapl_component.udapl_free_list_num =
|
||||
mca_btl_udapl_param_register_int("free_list_num", 8);
|
||||
mca_btl_udapl_component.udapl_free_list_max =
|
||||
mca_btl_udapl_param_register_int("free_list_max", -1);
|
||||
mca_btl_udapl_component.udapl_free_list_inc =
|
||||
mca_btl_udapl_param_register_int("free_list_inc", 8);
|
||||
mca_btl_udapl_component.udapl_mpool_name =
|
||||
mca_btl_udapl_param_register_string("mpool", "rdma");
|
||||
mca_btl_udapl_component.udapl_max_btls =
|
||||
mca_btl_udapl_param_register_int("max_modules", 8);
|
||||
mca_btl_udapl_component.udapl_evd_qlen =
|
||||
mca_btl_udapl_param_register_int("evd_qlen", 32);
|
||||
mca_btl_udapl_component.udapl_max_request_dtos =
|
||||
mca_btl_udapl_param_register_int("max_request_dtos", 18);
|
||||
mca_btl_udapl_component.udapl_max_recv_dtos =
|
||||
mca_btl_udapl_param_register_int("max_recv_dtos", 18);
|
||||
mca_btl_udapl_component.udapl_num_recvs =
|
||||
mca_btl_udapl_param_register_int("num_recvs", 8);
|
||||
mca_btl_udapl_component.udapl_num_sends =
|
||||
mca_btl_udapl_param_register_int("num_sends", 7);
|
||||
mca_btl_udapl_component.udapl_sr_win =
|
||||
mca_btl_udapl_param_register_int("sr_win", 4);
|
||||
mca_btl_udapl_component.udapl_eager_rdma_num =
|
||||
mca_btl_udapl_param_register_int("eager_rdma_num", 8);
|
||||
mca_btl_udapl_component.udapl_max_eager_rdma_peers =
|
||||
mca_btl_udapl_param_register_int("max_eager_rdma_peers", 16);
|
||||
mca_btl_udapl_component.udapl_eager_rdma_win =
|
||||
mca_btl_udapl_param_register_int("eager_rdma_win", 4);
|
||||
mca_btl_udapl_component.udapl_timeout =
|
||||
mca_btl_udapl_param_register_int("timeout", 10000000);
|
||||
mca_btl_udapl_component.udapl_eager_rdma_guarantee =
|
||||
mca_btl_udapl_param_register_int("eager_rdma_guarantee", 0);
|
||||
|
||||
/* register uDAPL module parameters */
|
||||
mca_btl_udapl_module.super.btl_exclusivity =
|
||||
mca_btl_udapl_param_register_int ("exclusivity",
|
||||
MCA_BTL_EXCLUSIVITY_DEFAULT - 10);
|
||||
mca_btl_udapl_module.super.btl_eager_limit =
|
||||
mca_btl_udapl_param_register_int ("eager_limit", 32*1024);
|
||||
mca_btl_udapl_module.super.btl_min_send_size =
|
||||
mca_btl_udapl_param_register_int ("min_send_size", 16*1024);
|
||||
mca_btl_udapl_module.super.btl_max_send_size =
|
||||
mca_btl_udapl_param_register_int ("max_send_size", 64*1024);
|
||||
mca_btl_udapl_module.super.btl_min_rdma_size =
|
||||
mca_btl_udapl_param_register_int("min_rdma_size", 512*1024);
|
||||
mca_btl_udapl_module.super.btl_max_rdma_size =
|
||||
mca_btl_udapl_param_register_int("max_rdma_size", 128*1024);
|
||||
mca_btl_udapl_module.super.btl_flags =
|
||||
mca_btl_udapl_param_register_int("flags", MCA_BTL_FLAGS_PUT);
|
||||
mca_btl_udapl_module.super.btl_bandwidth =
|
||||
mca_btl_udapl_param_register_int("bandwidth", 225);
|
||||
/* register uDAPL MCA parameters */
|
||||
rc = mca_btl_udapl_register_mca_params();
|
||||
|
||||
/* compute udapl_eager_frag_size and udapl_max_frag_size */
|
||||
mca_btl_udapl_component.udapl_eager_frag_size =
|
||||
@ -218,7 +171,7 @@ int mca_btl_udapl_component_open(void)
|
||||
sizeof(mca_btl_udapl_frag_eager_rdma_t) +
|
||||
mca_btl_udapl_component.udapl_eager_frag_size;
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006 Sandia National Laboratories. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
|
||||
*
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -430,9 +430,9 @@ int mca_btl_udapl_endpoint_get_params(mca_btl_udapl_module_t* btl,
|
||||
|
||||
/* Set values from mca parameters */
|
||||
(*ep_attr).max_recv_dtos =
|
||||
mca_btl_udapl_component.udapl_max_recv_dtos;
|
||||
btl->udapl_max_recv_dtos;
|
||||
(*ep_attr).max_request_dtos =
|
||||
mca_btl_udapl_component.udapl_max_request_dtos;
|
||||
btl->udapl_max_request_dtos;
|
||||
|
||||
/* close the dummy endpoint */
|
||||
rc = dat_ep_free(dummy_ep);
|
||||
|
291
ompi/mca/btl/udapl/btl_udapl_mca.c
Обычный файл
291
ompi/mca/btl/udapl/btl_udapl_mca.c
Обычный файл
@ -0,0 +1,291 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "opal/util/output.h"
|
||||
#include "opal/mca/base/mca_base_param.h"
|
||||
#include "btl_udapl.h"
|
||||
#include "btl_udapl_mca.h"
|
||||
#include <string.h>
|
||||
|
||||
/*
|
||||
* Utility routine for string parameter registration.
|
||||
*
|
||||
* @param param_name (IN) MCA parameter name
|
||||
* @param param_desc (IN) MCA parameter description
|
||||
* @param default_value (IN) MCA parameter default value
|
||||
* @param out_value (OUT) value of MCA parameter; either default,
|
||||
* or value as determined from typical
|
||||
* MCA parameter setting methods
|
||||
* @param flags (IN) MCA parameter boundary flag
|
||||
* @return OMPI_SUCCESS or OMPI_ERR_BAD_PARAM
|
||||
*/
|
||||
static inline int mca_btl_udapl_reg_string(const char* param_name,
|
||||
const char* param_desc,
|
||||
const char* default_value,
|
||||
char **out_value, int flags)
|
||||
{
|
||||
char *value;
|
||||
|
||||
mca_base_param_reg_string(&mca_btl_udapl_component.super.btl_version,
|
||||
param_name, param_desc, false, false, default_value, &value);
|
||||
|
||||
if (NULL == value) {
|
||||
BTL_ERROR(("ERROR: MCA Parameter %s : Value (NULL) out of range : "
|
||||
"Default value (%s)\n \t Parameter Description : %s",
|
||||
param_name, default_value, param_desc));
|
||||
return OMPI_ERR_BAD_PARAM;
|
||||
}
|
||||
|
||||
if ((flags & REGSTR_EMPTY_NOT_OK) && 0 == strlen(value)) {
|
||||
BTL_ERROR(("ERROR: MCA Parameter %s : Value (%s) out of range : "
|
||||
"Default value (%s)\n \t Parameter Description : %s",
|
||||
param_name, value, default_value, param_desc));
|
||||
return OMPI_ERR_BAD_PARAM;
|
||||
}
|
||||
|
||||
*out_value = value;
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Utility routine for integer parameter registration.
|
||||
*
|
||||
* @param param_name (IN) MCA parameter name
|
||||
* @param param_desc (IN) MCA parameter description
|
||||
* @param default_value (IN) MCA parameter default value
|
||||
* @param out_value (OUT) value of MCA parameter; either default,
|
||||
* or value as determined from typical
|
||||
* MCA parameter setting methods
|
||||
* @param flags (IN) MCA parameter boundary flag
|
||||
* @return OMPI_SUCCESS or OMPI_ERR_BAD_PARAM
|
||||
*/
|
||||
static inline int mca_btl_udapl_reg_int(const char* param_name,
|
||||
const char* param_desc,
|
||||
int default_value, int *out_value,
|
||||
int flags)
|
||||
{
|
||||
int value;
|
||||
|
||||
mca_base_param_reg_int(&mca_btl_udapl_component.super.btl_version,
|
||||
param_name, param_desc, false, false, default_value, &value);
|
||||
|
||||
if ((flags & REGINT_NEG_ONE_OK) && -1 == value) {
|
||||
*out_value = value;
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
if (((flags & REGINT_GE_ZERO) && value < 0) ||
|
||||
((flags & REGINT_GE_ONE) && value < 1) ||
|
||||
((flags & REGINT_NONZERO) && 0 == value)) {
|
||||
BTL_ERROR(("ERROR: MCA Parameter %s : Value (%d) out of range : "
|
||||
"Default value (%d)\n \t Parameter Description : %s\n",
|
||||
param_name, value, default_value, param_desc));
|
||||
return OMPI_ERR_BAD_PARAM;
|
||||
}
|
||||
*out_value = value;
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Register and check all MCA parameters
|
||||
*
|
||||
* @return OMPI_SUCCESS or OMPI_ERR_BAD_PARAM
|
||||
*/
|
||||
int mca_btl_udapl_register_mca_params(void)
|
||||
{
|
||||
int ival, rc, tmp_rc;
|
||||
|
||||
rc = OMPI_SUCCESS;
|
||||
|
||||
/* register uDAPL component parameters */
|
||||
CHECK_PARAM_REGISTER_RETURN_VALUE(mca_btl_udapl_reg_int("free_list_num",
|
||||
"Initial size of free lists (must be >= 1).",
|
||||
8,
|
||||
&mca_btl_udapl_component.udapl_free_list_num,
|
||||
REGINT_GE_ONE), tmp_rc, rc);
|
||||
|
||||
CHECK_PARAM_REGISTER_RETURN_VALUE(mca_btl_udapl_reg_int("free_list_max",
|
||||
"Maximum size of free lists "
|
||||
"(-1 = infinite, otherwise must be >= 1).",
|
||||
-1,
|
||||
&mca_btl_udapl_component.udapl_free_list_max,
|
||||
REGINT_NEG_ONE_OK | REGINT_GE_ONE), tmp_rc, rc);
|
||||
|
||||
CHECK_PARAM_REGISTER_RETURN_VALUE(mca_btl_udapl_reg_int("free_list_inc",
|
||||
"Increment size of free lists (must be >= 1).",
|
||||
8,
|
||||
&mca_btl_udapl_component.udapl_free_list_inc,
|
||||
REGINT_GE_ONE), tmp_rc, rc);
|
||||
|
||||
CHECK_PARAM_REGISTER_RETURN_VALUE(mca_btl_udapl_reg_string("mpool",
|
||||
"Name of the memory pool to be used.",
|
||||
"rdma",
|
||||
&mca_btl_udapl_component.udapl_mpool_name,
|
||||
REGSTR_EMPTY_NOT_OK), tmp_rc, rc);
|
||||
|
||||
CHECK_PARAM_REGISTER_RETURN_VALUE(mca_btl_udapl_reg_int("max_modules",
|
||||
"Maximum number of supported HCAs.",
|
||||
8,
|
||||
&ival,
|
||||
REGINT_GE_ONE), tmp_rc, rc);
|
||||
mca_btl_udapl_component.udapl_max_btls = (uint32_t) ival;
|
||||
|
||||
CHECK_PARAM_REGISTER_RETURN_VALUE(mca_btl_udapl_reg_int("num_recvs",
|
||||
"Total number of receive buffers to keep posted "
|
||||
"per endpoint (must be >= 1).",
|
||||
8,
|
||||
&mca_btl_udapl_component.udapl_num_recvs,
|
||||
REGINT_GE_ONE), tmp_rc, rc);
|
||||
|
||||
CHECK_PARAM_REGISTER_RETURN_VALUE(mca_btl_udapl_reg_int("num_sends",
|
||||
"Maximum number of sends to post on an endpoint "
|
||||
"(must be >= 1).",
|
||||
7,
|
||||
&mca_btl_udapl_component.udapl_num_sends,
|
||||
REGINT_GE_ONE), tmp_rc, rc);
|
||||
|
||||
CHECK_PARAM_REGISTER_RETURN_VALUE(mca_btl_udapl_reg_int("sr_win",
|
||||
"Window size at which point an explicit "
|
||||
"credit message will be generated (must be >= 1).",
|
||||
4,
|
||||
&mca_btl_udapl_component.udapl_sr_win,
|
||||
REGINT_GE_ONE), tmp_rc, rc);
|
||||
|
||||
CHECK_PARAM_REGISTER_RETURN_VALUE(mca_btl_udapl_reg_int("eager_rdma_num",
|
||||
"Number of RDMA buffers to allocate "
|
||||
"for small messages (must be >= 1).",
|
||||
32,
|
||||
&mca_btl_udapl_component.udapl_eager_rdma_num,
|
||||
REGINT_GE_ONE), tmp_rc, rc);
|
||||
|
||||
CHECK_PARAM_REGISTER_RETURN_VALUE(mca_btl_udapl_reg_int("max_eager_rdma_peers",
|
||||
"Maximum number of peers allowed to use "
|
||||
"RDMA for short messages (independently RDMA will "
|
||||
"still be used for large messages, (must be >= 0; "
|
||||
"if zero then RDMA will not be used for short messages).",
|
||||
16,
|
||||
&mca_btl_udapl_component.udapl_max_eager_rdma_peers,
|
||||
REGINT_GE_ZERO), tmp_rc, rc);
|
||||
|
||||
CHECK_PARAM_REGISTER_RETURN_VALUE(mca_btl_udapl_reg_int("eager_rdma_win",
|
||||
"Window size at which point an explicit "
|
||||
"credit message will be generated (must be >= 1).",
|
||||
28,
|
||||
&mca_btl_udapl_component.udapl_eager_rdma_win,
|
||||
REGINT_GE_ONE), tmp_rc, rc);
|
||||
|
||||
CHECK_PARAM_REGISTER_RETURN_VALUE(mca_btl_udapl_reg_int("timeout",
|
||||
"Connection timeout, in microseconds.",
|
||||
MCA_BTL_UDAPL_CONN_TIMEOUT_DEFAULT,
|
||||
&ival,
|
||||
REGINT_GE_ONE), tmp_rc, rc);
|
||||
mca_btl_udapl_component.udapl_timeout = (uint32_t) ival;
|
||||
|
||||
CHECK_PARAM_REGISTER_RETURN_VALUE(mca_btl_udapl_reg_int("eager_rdma_guarantee",
|
||||
"If the interface card in use guarantees front to back order "
|
||||
"of data written then this flag should remain as set by "
|
||||
"default (off).",
|
||||
0,
|
||||
&mca_btl_udapl_component.udapl_eager_rdma_guarantee,
|
||||
REGINT_GE_ZERO), tmp_rc, rc);
|
||||
|
||||
/* register uDAPL module parameters */
|
||||
CHECK_PARAM_REGISTER_RETURN_VALUE(mca_btl_udapl_reg_int("evd_qlen",
|
||||
"The event dispatcher queue length.",
|
||||
MCA_BTL_UDAPL_DTO_EVD_QLEN_DEFAULT,
|
||||
(int*)&mca_btl_udapl_module.udapl_evd_qlen,
|
||||
REGINT_GE_ONE), tmp_rc, rc);
|
||||
|
||||
CHECK_PARAM_REGISTER_RETURN_VALUE(mca_btl_udapl_reg_int("max_request_dtos",
|
||||
"Maximum number of outstanding "
|
||||
"submitted sends and rdma operations per endpoint, (see Section "
|
||||
"6.6.6 of uDAPL Spec.).",
|
||||
MCA_BTL_UDAPL_MAX_REQUEST_DTOS_DEFAULT,
|
||||
(int*)&mca_btl_udapl_module.udapl_max_request_dtos,
|
||||
REGINT_GE_ONE), tmp_rc, rc);
|
||||
|
||||
CHECK_PARAM_REGISTER_RETURN_VALUE(mca_btl_udapl_reg_int("max_recv_dtos",
|
||||
"Maximum number of outstanding "
|
||||
"submitted receive operations per endpoint, (see Section "
|
||||
"6.6.6 of uDAPL Spec.).",
|
||||
MCA_BTL_UDAPL_MAX_RECV_DTOS_DEFAULT,
|
||||
(int*)&mca_btl_udapl_module.udapl_max_recv_dtos,
|
||||
REGINT_GE_ONE), tmp_rc, rc);
|
||||
|
||||
CHECK_PARAM_REGISTER_RETURN_VALUE(mca_btl_udapl_reg_int("exclusivity",
|
||||
"uDAPL BTL exclusivity (must be >= 0).",
|
||||
(MCA_BTL_EXCLUSIVITY_DEFAULT - 10),
|
||||
&ival,
|
||||
REGINT_GE_ZERO), tmp_rc, rc);
|
||||
mca_btl_udapl_module.super.btl_exclusivity = (uint32_t) ival;
|
||||
|
||||
CHECK_PARAM_REGISTER_RETURN_VALUE(mca_btl_udapl_reg_int("eager_limit",
|
||||
"Eager send limit, in bytes (must be >= 1).",
|
||||
(8 * 1024),
|
||||
&ival,
|
||||
REGINT_GE_ONE), tmp_rc, rc);
|
||||
mca_btl_udapl_module.super.btl_eager_limit = (uint32_t) ival;
|
||||
|
||||
CHECK_PARAM_REGISTER_RETURN_VALUE(mca_btl_udapl_reg_int("min_send_size",
|
||||
"Minimum send size, in bytes (must be >= 1).",
|
||||
(16 * 1024),
|
||||
&ival,
|
||||
REGINT_GE_ONE), tmp_rc, rc);
|
||||
mca_btl_udapl_module.super.btl_min_send_size = (uint32_t) ival;
|
||||
|
||||
CHECK_PARAM_REGISTER_RETURN_VALUE(mca_btl_udapl_reg_int("max_send_size",
|
||||
"Maximum send size, in bytes (must be >= 1).",
|
||||
(64 * 1024),
|
||||
&ival,
|
||||
REGINT_GE_ONE), tmp_rc, rc);
|
||||
mca_btl_udapl_module.super.btl_max_send_size = (uint32_t) ival;
|
||||
|
||||
CHECK_PARAM_REGISTER_RETURN_VALUE(mca_btl_udapl_reg_int("min_rdma_size",
|
||||
"Minimum RDMA size, in bytes (must be >= 1).",
|
||||
(512 * 1024),
|
||||
&ival,
|
||||
REGINT_GE_ONE), tmp_rc, rc);
|
||||
mca_btl_udapl_module.super.btl_min_rdma_size = (uint32_t) ival;
|
||||
|
||||
CHECK_PARAM_REGISTER_RETURN_VALUE(mca_btl_udapl_reg_int("max_rdma_size",
|
||||
"Maximum RDMA size, in bytes (must be >= 1).",
|
||||
(128 * 1024),
|
||||
&ival,
|
||||
REGINT_GE_ONE), tmp_rc, rc);
|
||||
mca_btl_udapl_module.super.btl_max_rdma_size = (uint32_t) ival;
|
||||
|
||||
CHECK_PARAM_REGISTER_RETURN_VALUE(mca_btl_udapl_reg_int("flags",
|
||||
"BTL flags, added together: PUT=2 (cannot be 0).",
|
||||
MCA_BTL_FLAGS_PUT,
|
||||
&ival,
|
||||
REGINT_GE_ZERO), tmp_rc, rc);
|
||||
mca_btl_udapl_module.super.btl_flags = (uint32_t) ival;
|
||||
|
||||
CHECK_PARAM_REGISTER_RETURN_VALUE(mca_btl_udapl_reg_int("bandwidth",
|
||||
"Approximate maximum bandwidth of network (must be >= 1).",
|
||||
225,
|
||||
&ival,
|
||||
REGINT_GE_ONE), tmp_rc, rc);
|
||||
mca_btl_udapl_module.super.btl_bandwidth = (uint32_t) ival;
|
||||
|
||||
return rc;
|
||||
}
|
67
ompi/mca/btl/udapl/btl_udapl_mca.h
Обычный файл
67
ompi/mca/btl/udapl/btl_udapl_mca.h
Обычный файл
@ -0,0 +1,67 @@
|
||||
/*
|
||||
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#ifndef MCA_BTL_UDAPL_MCA_H
|
||||
#define MCA_BTL_UDAPL_MCA_H
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Define Integer Boundaries */
|
||||
#define REGINT_NEG_ONE_OK 0x01 /* value = -1 is valid */
|
||||
#define REGINT_GE_ZERO 0x02 /* value >= 0 is valid */
|
||||
#define REGINT_GE_ONE 0x04 /* value > 1 is valid */
|
||||
#define REGINT_NONZERO 0x08 /* value != 0 is valid */
|
||||
|
||||
/* Define String Boundaries */
|
||||
#define REGSTR_EMPTY_OK 0x01 /* empty string is valid */
|
||||
#define REGSTR_EMPTY_NOT_OK 0x02 /* empty string is not valid */
|
||||
|
||||
/* Define default parameter values that need to be known beyond the
|
||||
* initial setting; for example, if a parameter is tuned dynamically
|
||||
* by the BTL it would not be advisable to do so if the user has
|
||||
* modified the default.
|
||||
*/
|
||||
#define MCA_BTL_UDAPL_ASYNC_EVD_QLEN_DEFAULT 256
|
||||
#define MCA_BTL_UDAPL_CONN_EVD_QLEN_DEFAULT 256
|
||||
#define MCA_BTL_UDAPL_DTO_EVD_QLEN_DEFAULT 256
|
||||
#define MCA_BTL_UDAPL_CONN_TIMEOUT_DEFAULT 10000000
|
||||
#define MCA_BTL_UDAPL_CONN_TIMEOUT_INC 200000 /* connection timeout
|
||||
* is in microseconds;
|
||||
* this incremental
|
||||
* value is equivalent
|
||||
* to .2 seconds
|
||||
*/
|
||||
#define MCA_BTL_UDAPL_CONN_TIMEOUT_MAX 2147483647
|
||||
#define MCA_BTL_UDAPL_MAX_RECV_DTOS_DEFAULT 8
|
||||
#define MCA_BTL_UDAPL_MAX_REQUEST_DTOS_DEFAULT 76
|
||||
#define MCA_BTL_UDAPL_NUM_RECVS_DEFAULT 8
|
||||
|
||||
|
||||
#define CHECK_PARAM_REGISTER_RETURN_VALUE(expr, tmp_rc, rc) \
|
||||
{ \
|
||||
tmp_rc = (expr); \
|
||||
if (OMPI_SUCCESS != tmp_rc) { \
|
||||
rc = tmp_rc; \
|
||||
} \
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to register MCA params and check for sane values
|
||||
*/
|
||||
|
||||
int mca_btl_udapl_register_mca_params(void);
|
||||
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
#endif
|
Загрузка…
x
Ссылка в новой задаче
Block a user